2

I'm trying to make a circle shaped button and i can't manage to set its height to be the same as its width. Here's the code i tried:

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="MozaikMuzeum_Xamarin.View.CatalogPage" Title="Katalógus" BackgroundColor="White">
  <ContentPage.Content>  
    <Grid>
     <Grid.RowDefinitions>
        <RowDefinition Height="Auto" />
        <RowDefinition Height="*" />
        <RowDefinition Height="100" />
      </Grid.RowDefinitions>

      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="Auto" />
        <ColumnDefinition Width="*" />
        <ColumnDefinition Width="100" />
      </Grid.ColumnDefinitions>
      <Button Text="Ajánló"
           Grid.Row="0" Grid.Column="0"
           TextColor="Black"
           x:Name="Button"
              BindingContext="{x:Reference Name=Button}"
       BorderWidth="4"
              BorderColor="Black"
              BackgroundColor="#FFF"
              BorderRadius="50"
              HeightRequest="{Binding Width}"
        >

      </Button>
    </Grid>
  </ContentPage.Content>
</ContentPage>
Bálint Bozsóki
  • 115
  • 1
  • 3
  • 10
  • 1
    Have a look [here](http://stackoverflow.com/questions/38033673/how-do-you-put-a-square-in-center-of-screenusing-xaml/38036738#38036738) – Funk Jul 12 '16 at 12:03
  • Thank you, I've found the solution to my problem on the page you have suggested. – Bálint Bozsóki Jul 12 '16 at 14:06

0 Answers0