<StackPanel Orientation="Horizontal" Margin="10,43,0,0">
<RichTextBlock x:Name="MYRTB" HorizontalAlignment="Center" VerticalAlignment="Top" Foreground="#FFEE0000" UseLayoutRounding="True">
<Paragraph Foreground="#FFFD0000">
<Run Text="Testtest"/>
</Paragraph>
</RichTextBlock>
<ListView x:Name="MyListViewNr1">
<ListViewItem Content="ListView Entry 1"/>
<ListViewItem Content="ListView Entry 2"/>
<ListViewItem Content="ListView Entry 2888"/>
</ListView>
</StackPanel>
I am trying to make this StackPanel fill the screen of my WinRT app. I'm already using the "automatic" property for width and height, but when I add a Listview Entry or a Paragraph to the RichTextBlock that is long enough then the text will just go outside of the screen.
If I use Vertical Orientation for the StackPanel the WIDTH is automatically adjusted but not the height, what means if there are enought listview entries they will just go "under" the screen.
Is there actually a way to do this via XAML or do I need to do this via Code (using C# here). If so, how can I access the CURRENT width/height of my app, since I want to make it automatically resize for different resolutions as well as orientation (landscape/portrait).
Thank you in advance!