diff options
author | Samantha Houts <samantha@teamredwall.com> | 2016-08-30 10:46:14 -0700 |
---|---|---|
committer | Jason Smith <jason.smith@xamarin.com> | 2016-08-30 10:46:14 -0700 |
commit | 5e553f6195e66e48688b8ab324f1bab1e9251f0a (patch) | |
tree | f8843e5e9e8afe89a05a1cc91c3b7fa05588bac7 /Xamarin.Forms.Platform.UAP/TabbedPageStyle.xaml | |
parent | f551654b1cfe654c579ca50978445e7cb93f287d (diff) | |
download | xamarin-forms-5e553f6195e66e48688b8ab324f1bab1e9251f0a.tar.gz xamarin-forms-5e553f6195e66e48688b8ab324f1bab1e9251f0a.tar.bz2 xamarin-forms-5e553f6195e66e48688b8ab324f1bab1e9251f0a.zip |
Platform Specifics (#301)
* Playing around with how the platform specifics interfaces etc. might work
* Sample implementation of iOS navigation translucency
* Very slightly reduced code
* Better vendor stuff
* Drop single-implemenation interfaces
* Generics on NavigationPage
* On-demand vendor stuff
* Remove functionally duplicate classes and make ControlGallery work again
* Namespace all the things. XAML test.
* Can use Effect to attach platform specific
* Attach Effect on PropertyChanging for XAML support!
* Rename IConfigPlatform interfaces for readability
* Some renaming to match the documents
* Split class files
* Clear out test-only code
* Re-namespace
* Added On method to rendered Elements
* Allow for removal of platform suffix, convenience methods on specific platforms
* Creating a gallery page for specifics
* Add rudimentary Platform Specifics gallery; make CollapseStyle work on UWP;
Add CollapsedPaneWidth specific property
* Toolbar now working with both collapse styles
* MDP now displaying Content title; toolbar routing around title
* Add a gallery for the iOS NavigationPage stuff
* Add Navigation Page as detail page to verify it works with new Toolbar options
* Make titlebar/toolbar background colors consistent
* ToolbarPlacement now working on NavigationPage
* Toolbar Placement working for tabbed and nav pages
* Fix bug where phone doesn't get default toolbar placement on start
* [Core] Add PS WindowSoftInputModeAdjust
[Core] Make Application extendable
* Toolbar placement now working on Nav, Tabbed, and Master pages on desktop/phone
Remove unnecessary style indirection
Fix build errors
* [A] Add PlatformConfigurationExtensions
* SetSoftInputMode test page
* [A] SetSoftInputMode
Known issue: Status bar color does not work in AdjustResize mode
* [Core] Add PS Blur
* [iOS] Configure renderer for blur
* Add test page
* Move to blur VisualElement for broader support
* Move test pages to gallery
* Update docs
* Use lazy initializer for PlatformConfigurationRegistry
Diffstat (limited to 'Xamarin.Forms.Platform.UAP/TabbedPageStyle.xaml')
-rw-r--r-- | Xamarin.Forms.Platform.UAP/TabbedPageStyle.xaml | 199 |
1 files changed, 199 insertions, 0 deletions
diff --git a/Xamarin.Forms.Platform.UAP/TabbedPageStyle.xaml b/Xamarin.Forms.Platform.UAP/TabbedPageStyle.xaml new file mode 100644 index 00000000..6d54a073 --- /dev/null +++ b/Xamarin.Forms.Platform.UAP/TabbedPageStyle.xaml @@ -0,0 +1,199 @@ +<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 x:Key="TabbedPageStyle" TargetType="uwp:FormsPivot"> + <Setter Property="HeaderTemplate"> + <Setter.Value> + <DataTemplate> + <TextBlock Name="TabbedPageHeaderTextBlock" Text="{Binding Title}" Style="{ThemeResource BodyTextBlockStyle}" /> + </DataTemplate> + </Setter.Value> + </Setter> + + <Setter Property="ItemTemplate"> + <Setter.Value> + <DataTemplate> + <uwp:TabbedPagePresenter Content="{Binding}" ContentTemplate="{ThemeResource ContainedPageTemplate}" /> + </DataTemplate> + </Setter.Value> + </Setter> + + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="uwp:FormsPivot"> + <Grid x:Name="RootElement" Background="{TemplateBinding Background}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="{TemplateBinding VerticalAlignment}"> + + <Grid.RowDefinitions> + <RowDefinition Height="Auto"/> + <RowDefinition Height="*"/> + <RowDefinition Height="Auto"/> + </Grid.RowDefinitions> + <VisualStateManager.VisualStateGroups> + <VisualStateGroup x:Name="NavigationButtonsVisibility"> + <VisualState x:Name="NavigationButtonsHidden"/> + <VisualState x:Name="NavigationButtonsVisible"> + <Storyboard> + <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="NextButton"> + <DiscreteObjectKeyFrame KeyTime="0" Value="1"/> + </ObjectAnimationUsingKeyFrames> + <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="IsEnabled" Storyboard.TargetName="NextButton"> + <DiscreteObjectKeyFrame KeyTime="0" Value="True"/> + </ObjectAnimationUsingKeyFrames> + <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PreviousButton"> + <DiscreteObjectKeyFrame KeyTime="0" Value="1"/> + </ObjectAnimationUsingKeyFrames> + <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="IsEnabled" Storyboard.TargetName="PreviousButton"> + <DiscreteObjectKeyFrame KeyTime="0" Value="True"/> + </ObjectAnimationUsingKeyFrames> + </Storyboard> + </VisualState> + </VisualStateGroup> + <VisualStateGroup x:Name="HeaderStates"> + <VisualState x:Name="HeaderDynamic"/> + <VisualState x:Name="HeaderStatic"> + <Storyboard> + <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="Header"> + <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/> + </ObjectAnimationUsingKeyFrames> + <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="StaticHeader"> + <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/> + </ObjectAnimationUsingKeyFrames> + </Storyboard> + </VisualState> + </VisualStateGroup> + </VisualStateManager.VisualStateGroups> + + <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 ToolbarForeground}" Style="{ThemeResource TitleTextBlockStyle}" /> + </Border> + + <Border x:Name="TopCommandBarArea" Grid.Column="1" HorizontalAlignment="Stretch"> + <uwp:FormsCommandBar x:Name="CommandBar" VerticalContentAlignment="Top" Background="{TemplateBinding ToolbarBackground}" Height="{ThemeResource TitleBarHeight}" /> + </Border> + </Grid> + + <Grid Grid.Row="1"> + <Grid.Resources> + <ControlTemplate x:Key="NextTemplate" TargetType="Button"> + <Border x:Name="Root" BorderBrush="{ThemeResource SystemControlForegroundTransparentBrush}" BorderThickness="{ThemeResource PivotNavButtonBorderThemeThickness}" Background="{ThemeResource SystemControlBackgroundBaseMediumLowBrush}"> + <VisualStateManager.VisualStateGroups> + <VisualStateGroup x:Name="CommonStates"> + <VisualState x:Name="Normal"/> + <VisualState x:Name="PointerOver"> + <Storyboard> + <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="Root"> + <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightBaseMediumBrush}"/> + </ObjectAnimationUsingKeyFrames> + <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="Arrow"> + <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightAltAltMediumHighBrush}"/> + </ObjectAnimationUsingKeyFrames> + </Storyboard> + </VisualState> + <VisualState x:Name="Pressed"> + <Storyboard> + <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="Root"> + <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightBaseMediumHighBrush}"/> + </ObjectAnimationUsingKeyFrames> + <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="Arrow"> + <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightAltAltMediumHighBrush}"/> + </ObjectAnimationUsingKeyFrames> + </Storyboard> + </VisualState> + </VisualStateGroup> + </VisualStateManager.VisualStateGroups> + <FontIcon x:Name="Arrow" Foreground="{ThemeResource SystemControlForegroundAltMediumHighBrush}" FontSize="12" FontFamily="{ThemeResource SymbolThemeFontFamily}" Glyph="" HorizontalAlignment="Center" MirroredWhenRightToLeft="True" UseLayoutRounding="False" VerticalAlignment="Center"/> + </Border> + </ControlTemplate> + <ControlTemplate x:Key="PreviousTemplate" TargetType="Button"> + <Border x:Name="Root" BorderBrush="{ThemeResource SystemControlForegroundTransparentBrush}" BorderThickness="{ThemeResource PivotNavButtonBorderThemeThickness}" Background="{ThemeResource SystemControlBackgroundBaseMediumLowBrush}"> + <VisualStateManager.VisualStateGroups> + <VisualStateGroup x:Name="CommonStates"> + <VisualState x:Name="Normal"/> + <VisualState x:Name="PointerOver"> + <Storyboard> + <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="Root"> + <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightBaseMediumBrush}"/> + </ObjectAnimationUsingKeyFrames> + <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="Arrow"> + <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightAltAltMediumHighBrush}"/> + </ObjectAnimationUsingKeyFrames> + </Storyboard> + </VisualState> + <VisualState x:Name="Pressed"> + <Storyboard> + <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="Root"> + <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightBaseMediumHighBrush}"/> + </ObjectAnimationUsingKeyFrames> + <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="Arrow"> + <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightAltAltMediumHighBrush}"/> + </ObjectAnimationUsingKeyFrames> + </Storyboard> + </VisualState> + </VisualStateGroup> + </VisualStateManager.VisualStateGroups> + <FontIcon x:Name="Arrow" Foreground="{ThemeResource SystemControlForegroundAltMediumHighBrush}" FontSize="12" FontFamily="{ThemeResource SymbolThemeFontFamily}" Glyph="" HorizontalAlignment="Center" MirroredWhenRightToLeft="True" UseLayoutRounding="False" VerticalAlignment="Center"/> + </Border> + </ControlTemplate> + </Grid.Resources> + <ScrollViewer x:Name="ScrollViewer" BringIntoViewOnFocusChange="False" HorizontalSnapPointsAlignment="Center" HorizontalSnapPointsType="MandatorySingle" HorizontalScrollBarVisibility="Hidden" Margin="{TemplateBinding Padding}" Template="{StaticResource ScrollViewerScrollBarlessTemplate}" VerticalSnapPointsType="None" VerticalScrollBarVisibility="Disabled" VerticalScrollMode="Disabled" VerticalContentAlignment="Stretch" ZoomMode="Disabled"> + <PivotPanel x:Name="Panel" VerticalAlignment="Stretch"> + <Grid x:Name="PivotLayoutElement"> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="Auto"/> + <ColumnDefinition Width="*"/> + <ColumnDefinition Width="Auto"/> + </Grid.ColumnDefinitions> + <Grid.RowDefinitions> + <RowDefinition Height="Auto"/> + <RowDefinition Height="*"/> + </Grid.RowDefinitions> + <Grid.RenderTransform> + <CompositeTransform x:Name="PivotLayoutElementTranslateTransform"/> + </Grid.RenderTransform> + <ContentPresenter x:Name="LeftHeaderPresenter" ContentTemplate="{TemplateBinding LeftHeaderTemplate}" Content="{TemplateBinding LeftHeader}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/> + <ContentControl x:Name="HeaderClipper" Grid.Column="1" HorizontalContentAlignment="Stretch" UseSystemFocusVisuals="True"> + <ContentControl.Clip> + <RectangleGeometry x:Name="HeaderClipperGeometry"/> + </ContentControl.Clip> + <Grid Name="TabbedPageHeaderGrid" Background="{TemplateBinding ToolbarBackground}"> + <PivotHeaderPanel x:Name="StaticHeader" Visibility="Collapsed"/> + <PivotHeaderPanel x:Name="Header"> + <PivotHeaderPanel.RenderTransform> + <TransformGroup> + <CompositeTransform x:Name="HeaderTranslateTransform"/> + <CompositeTransform x:Name="HeaderOffsetTranslateTransform"/> + </TransformGroup> + </PivotHeaderPanel.RenderTransform> + </PivotHeaderPanel> + </Grid> + </ContentControl> + <Button x:Name="PreviousButton" Background="Transparent" Grid.Column="1" HorizontalAlignment="Left" Height="36" IsTabStop="False" IsEnabled="False" Margin="{ThemeResource PivotNavButtonMargin}" Opacity="0" Template="{StaticResource PreviousTemplate}" UseSystemFocusVisuals="False" VerticalAlignment="Top" Width="20"/> + <Button x:Name="NextButton" Background="Transparent" Grid.Column="1" HorizontalAlignment="Right" Height="36" IsTabStop="False" IsEnabled="False" Margin="{ThemeResource PivotNavButtonMargin}" Opacity="0" Template="{StaticResource NextTemplate}" UseSystemFocusVisuals="False" VerticalAlignment="Top" Width="20"/> + <ContentPresenter x:Name="RightHeaderPresenter" ContentTemplate="{TemplateBinding RightHeaderTemplate}" Content="{TemplateBinding RightHeader}" Grid.Column="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/> + <ItemsPresenter x:Name="PivotItemPresenter" Grid.ColumnSpan="3" Grid.Row="1"> + <ItemsPresenter.RenderTransform> + <TransformGroup> + <TranslateTransform x:Name="ItemsPresenterTranslateTransform"/> + <CompositeTransform x:Name="ItemsPresenterCompositeTransform"/> + </TransformGroup> + </ItemsPresenter.RenderTransform> + </ItemsPresenter> + </Grid> + </PivotPanel> + </ScrollViewer> + </Grid> + + <Border x:Name="BottomCommandBarArea" Grid.Row="2" HorizontalAlignment="Stretch"></Border> + </Grid> + </ControlTemplate> + </Setter.Value> + </Setter> + </Style> +</ResourceDictionary>
\ No newline at end of file |