Button sizes become small in a stackpanel

Posted by Vuyiswamb under WPF on 4/14/2013 | Points: 10 | Views : 1248 | Status : [Member] [MVP] [Administrator] | Replies : 0
Good Day

i have buttons and i have defined them like this

<StackPanel HorizontalAlignment="Center" VerticalAlignment="Stretch" Orientation="Horizontal" Height="400">

<k:KinectTileButton Background="{x:Null}" BorderBrush="{x:Null}" Style="{x:Null}" x:Name="btnA" Click="btnA_Click" MinHeight="400" MinWidth="350" Width="198" >

<Image Source="../Images/A.png" />

<k:KinectTileButton Background="{x:Null}" Style="{x:Null}" BorderBrush="{x:Null}" MinHeight="400" MinWidth="350" Width="198" x:Name="btnB" Click="btnB_Click" >

<Image Source="/SchoolPlay1;component/Alphabets101/Images/B.png" />
<k:KinectTileButton Background="{x:Null}" Style="{x:Null}" BorderBrush="{x:Null}" x:Name="btnc" Click="btnC_Click" MinHeight="400" MinWidth="350" Width="198" >

<Image Source="/SchoolPlay1;component/Alphabets101/Images/C.png" />


and m gridlayout has the following properties

   <Grid  x:Name="LayoutRoot" MinHeight="768" MinWidth="1024" >

and my Page does not have with and height set as i want to cater for different resolutions.

if i remove the stackPanel , my buttons bring big nicely , but i need then in a Stackpanel kind of control so that they will be aligned in order , but when i have the stack panel in the , the buttons become small, can anyone help regarding this below is the example image



Thank you for posting at Dotnetfunda


(No response found.)

Login to post response