How to stretch the image of (1* 66 ) pixel
-
Hi, In a WPF Application using XAML, I have 2 images, which needs to be oriental of horizantal. One is of width 784 * 66 and other is 1 * 66. while, design time, since my window is auto it shows properly, but during runtime, the window is of 1280 width... so, the image 1 * 66 should stretch and cover the rest (1280 - (784 + 1)) |____________________________|_| should become |____________________________|_______________________| which means , my firstimage should have the same width (784) and the second image should stretch to cover the rest even though its only one pixel. <Grid HorizontalAlignment="Left" Height="66" Name="grdTopImages"> <Grid.ColumnDefinitions> <ColumnDefinition Width="*" /> <ColumnDefinition Width="Auto" MinWidth="1" /> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="66" /> </Grid.RowDefinitions> <Image Name="imgClientPhoto" Grid.Column="0" Grid.Row="0" Source="/Honeywell.eHTMP;component/Resources/_left.gif"></Image> <Image Name="imgExtraImg" Grid.Column="1" Grid.Row="0" Stretch="Fill" Source="/Honeywell.eHTMP;component/Resources/_right.gif"></Image> </Grid> Please help me Thanks Ramm
-
Hi, In a WPF Application using XAML, I have 2 images, which needs to be oriental of horizantal. One is of width 784 * 66 and other is 1 * 66. while, design time, since my window is auto it shows properly, but during runtime, the window is of 1280 width... so, the image 1 * 66 should stretch and cover the rest (1280 - (784 + 1)) |____________________________|_| should become |____________________________|_______________________| which means , my firstimage should have the same width (784) and the second image should stretch to cover the rest even though its only one pixel. <Grid HorizontalAlignment="Left" Height="66" Name="grdTopImages"> <Grid.ColumnDefinitions> <ColumnDefinition Width="*" /> <ColumnDefinition Width="Auto" MinWidth="1" /> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="66" /> </Grid.RowDefinitions> <Image Name="imgClientPhoto" Grid.Column="0" Grid.Row="0" Source="/Honeywell.eHTMP;component/Resources/_left.gif"></Image> <Image Name="imgExtraImg" Grid.Column="1" Grid.Row="0" Stretch="Fill" Source="/Honeywell.eHTMP;component/Resources/_right.gif"></Image> </Grid> Please help me Thanks Ramm
Hi Guys, I could solve it, <ColumnDefinition Width="*" /> <ColumnDefinition Width="Auto" MinWidth="1" /> should be the other way width property <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="*" MinWidth="1" /> Thanks a lot Ramm