Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Button sizes become small in a stackpanel

$
0
0

Good Day 

i have buttons and i have defined them like this

<Grid><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><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><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" /></k:KinectTileButton></StackPanel></Grid>

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  

thanks 


Vuyiswa Maseko


Viewing all articles
Browse latest Browse all 18858

Trending Articles