summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.UAP/PageControlStyle.xaml
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Platform.UAP/PageControlStyle.xaml')
-rw-r--r--Xamarin.Forms.Platform.UAP/PageControlStyle.xaml42
1 files changed, 42 insertions, 0 deletions
diff --git a/Xamarin.Forms.Platform.UAP/PageControlStyle.xaml b/Xamarin.Forms.Platform.UAP/PageControlStyle.xaml
new file mode 100644
index 00000000..bd199487
--- /dev/null
+++ b/Xamarin.Forms.Platform.UAP/PageControlStyle.xaml
@@ -0,0 +1,42 @@
+<ResourceDictionary
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:uwp="using:Xamarin.Forms.Platform.UWP">
+ <Style TargetType="uwp:PageControl">
+ <Setter Property="ContentMargin" Value="0" />
+ <Setter Property="TitleBrush" Value="{ThemeResource DefaultTextForegroundThemeBrush}" />
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="uwp:PageControl">
+ <Grid Background="{TemplateBinding Background}">
+
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="*" />
+ <RowDefinition Height="Auto" />
+ </Grid.RowDefinitions>
+
+ <Grid x:Name="TitleBar" Background="{TemplateBinding ToolbarBackground}" HorizontalAlignment="Stretch">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto"></ColumnDefinition>
+ <ColumnDefinition Width="*"></ColumnDefinition>
+ </Grid.ColumnDefinitions>
+
+ <Border Height="{ThemeResource TitleBarHeight}" Visibility="{TemplateBinding TitleVisibility}">
+ <TextBlock Text="{Binding Title}" VerticalAlignment="Center" Padding="10,0,0,0" Foreground="{TemplateBinding TitleBrush}" Style="{ThemeResource TitleTextBlockStyle}" />
+ </Border>
+
+ <Border x:Name="TopCommandBarArea" Grid.Column="1" HorizontalAlignment="Stretch">
+ <uwp:FormsCommandBar x:Name="CommandBar" Background="{TemplateBinding ToolbarBackground}" Height="{ThemeResource TitleBarHeight}" />
+ </Border>
+ </Grid>
+
+ <ContentPresenter Margin="{TemplateBinding ContentMargin}" ContentTransitions="{TemplateBinding ContentTransitions}" x:Name="presenter" Grid.Row="1" />
+
+ <Border x:Name="BottomCommandBarArea" Grid.Row="2" HorizontalAlignment="Stretch"></Border>
+ </Grid>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+</ResourceDictionary> \ No newline at end of file