Hi all,
Please see my code as below.
The left Viewbox in Grid works well. But the right Viewbox in listbox does not work.
What I want is that when resize window and decrease the height of window, then the ico should become smaller and smaller.
so, how do I make the Viewbox in listbox work?
<GridWidth="200"HorizontalAlignment="Left">
<ViewboxStretch="Uniform"MaxHeight="68">
<ImageSource="MyIco.ico"MaxHeight="68"/>
</Viewbox>
</Grid>
<ListBoxMargin="200,0,0,0"ItemsSource="{Binding Students}"ScrollViewer.HorizontalScrollBarVisibility="Disabled"ScrollViewer.VerticalScrollBarVisibility="Disabled"VerticalContentAlignment="Stretch">
<ListBox.ItemTemplate>
<DataTemplate>
<ViewboxStretch="Uniform"MaxHeight="68">
<ImageSource="MyIco.ico"MaxHeight="68"/>
</Viewbox>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>