I managed to do this in Windows Phone 8.1, but there was a bit of space in the text box with the save button and the top headers above.
<Grid> <Grid.RowDefinitions> <RowDefinition Height="*" /> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <TextBox x:Name="text" ManipulationDelta="textList_ManipulationDelta" ManipulationMode="Scale" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" TextWrapping="Wrap" AcceptsReturn="True" > </TextBox> <Rectangle x:Name="rectRed" Fill="Red" Grid.Row="2" Height="10" /> <Rectangle HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="1" Fill="#30000000" /> <StackPanel x:Name="stackAppBar" Orientation="Horizontal" Grid.Row="1" HorizontalAlignment="Center"> <AppBarButton Icon="Save" Label="Save" IsCompact="true" x:Name="buttonSave" Click="buttonSave_Click"/> </StackPanel> </Grid> async void UCSetup_Loaded(object sender, RoutedEventArgs e) { // put text in box string s = await IO.ReadSetupFile(); text.Text = s; InputPane.GetForCurrentView().Showing += UCSetup_Showing; InputPane.GetForCurrentView().Hiding += UCSetup_Hiding; } void UCSetup_Hiding(InputPane sender, InputPaneVisibilityEventArgs args) { var size = args.OccludedRect; rectRed.Height = size.Height; } void UCSetup_Showing(InputPane sender, InputPaneVisibilityEventArgs args) { var size = args.OccludedRect; rectRed.Height = size.Height; }
source share