0

In a WPF Application using XAML,

I have 2 images, which needs to be oriented horizontally. 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.

Please help me

 <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> 

Thanks Ramm

1 Answer 1

1

You've got your column definitions the wrong way around. Should be:

<ColumnDefinition Width="Auto" /> <ColumnDefinition Width="*" /> 

This means the first column is as big as it needs to be, and the second column takes up whatever's left.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.