|
658 | 658 | <Style TargetType="{x:Type local:DrawerHost}">
|
659 | 659 | <Setter Property="local:ShadowAssist.ShadowDepth" Value="Depth3" />
|
660 | 660 | <Setter Property="LeftDrawerBackground" Value="{DynamicResource MaterialDesignPaper}" />
|
| 661 | + <Setter Property="RightDrawerBackground" Value="{DynamicResource MaterialDesignPaper}" /> |
661 | 662 | <Setter Property="IsTabStop" Value="False" />
|
662 | 663 | <Setter Property="Template">
|
663 | 664 | <Setter.Value>
|
|
776 | 777 | <VisualStateGroup.Transitions>
|
777 | 778 | <VisualTransition From="RightDrawerClosed" To="RightDrawerOpen">
|
778 | 779 | <Storyboard>
|
779 |
| - <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="X" Storyboard.TargetName="RightDrawerTranslateTransform"> |
780 |
| - <EasingDoubleKeyFrame Value="0" KeyTime="0:0:0.4"> |
781 |
| - <EasingDoubleKeyFrame.EasingFunction> |
| 780 | + <ThicknessAnimationUsingKeyFrames Storyboard.TargetProperty="Margin" Storyboard.TargetName="RightDrawerGrid"> |
| 781 | + <EasingThicknessKeyFrame Value="0" KeyTime="0:0:0.4"> |
| 782 | + <EasingThicknessKeyFrame.EasingFunction> |
782 | 783 | <SineEase EasingMode="EaseOut" />
|
783 |
| - </EasingDoubleKeyFrame.EasingFunction> |
784 |
| - </EasingDoubleKeyFrame> |
785 |
| - </DoubleAnimationUsingKeyFrames> |
| 784 | + </EasingThicknessKeyFrame.EasingFunction> |
| 785 | + </EasingThicknessKeyFrame> |
| 786 | + </ThicknessAnimationUsingKeyFrames> |
786 | 787 | <DoubleAnimation Storyboard.TargetName="RightDrawerShadow" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:0.04" />
|
787 | 788 | </Storyboard>
|
788 | 789 | </VisualTransition>
|
789 | 790 | <VisualTransition From="RightDrawerOpen" To="RightDrawerClosed">
|
790 | 791 | <Storyboard>
|
791 |
| - <DoubleAnimation Storyboard.TargetProperty="X" Storyboard.TargetName="RightDrawerTranslateTransform" Duration="0:0:0.4"> |
792 |
| - <DoubleAnimation.EasingFunction> |
| 792 | + <ThicknessAnimation Storyboard.TargetProperty="Margin" Storyboard.TargetName="RightDrawerGrid" Duration="0:0:0.4"> |
| 793 | + <ThicknessAnimation.EasingFunction> |
793 | 794 | <SineEase EasingMode="EaseOut" />
|
794 |
| - </DoubleAnimation.EasingFunction> |
795 |
| - </DoubleAnimation> |
| 795 | + </ThicknessAnimation.EasingFunction> |
| 796 | + </ThicknessAnimation> |
796 | 797 | <DoubleAnimationUsingKeyFrames Storyboard.TargetName="RightDrawerShadow" Storyboard.TargetProperty="Opacity">
|
797 | 798 | <EasingDoubleKeyFrame Value="1" KeyTime="0:0:0.36" />
|
798 | 799 | <EasingDoubleKeyFrame Value="0" KeyTime="0:0:0.4">
|
|
807 | 808 | <VisualState x:Name="RightDrawerOpen">
|
808 | 809 | <Storyboard>
|
809 | 810 | <DoubleAnimation Storyboard.TargetName="RightDrawerShadow" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0" />
|
810 |
| - <DoubleAnimation Storyboard.TargetProperty="X" Storyboard.TargetName="RightDrawerTranslateTransform" To="0" Duration="0"/> |
| 811 | + <ThicknessAnimation Storyboard.TargetProperty="Margin" Storyboard.TargetName="RightDrawerGrid" To="0 0 0 0" Duration="0"/> |
811 | 812 | </Storyboard>
|
812 | 813 | </VisualState>
|
813 | 814 | <VisualState x:Name="RightDrawerClosed">
|
814 | 815 | <Storyboard>
|
815 | 816 | <DoubleAnimation Storyboard.TargetName="RightDrawerShadow" Storyboard.TargetProperty="Opacity" From="0" To="0" Duration="0" />
|
816 |
| - <DoubleAnimation Storyboard.TargetProperty="X" Storyboard.TargetName="RightDrawerTranslateTransform" Duration="0"/> |
| 817 | + <ThicknessAnimation Storyboard.TargetProperty="Margin" Storyboard.TargetName="RightDrawerGrid" Duration="0"/> |
817 | 818 | </Storyboard>
|
818 | 819 | </VisualState>
|
819 | 820 | </VisualStateGroup>
|
|
841 | 842 | </AdornerDecorator>
|
842 | 843 | <ContentPresenter Content="{TemplateBinding LeftDrawerContent}" ContentTemplate="{TemplateBinding LeftDrawerContentTemplate}" ContentStringFormat="{TemplateBinding LeftDrawerContentStringFormat}" />
|
843 | 844 | </Grid>
|
844 |
| - <Grid VerticalAlignment="Stretch" HorizontalAlignment="Right"> |
845 |
| - <Grid.RenderTransform> |
846 |
| - <TranslateTransform x:Name="RightDrawerTranslateTransform" |
847 |
| - X="{Binding ElementName=RootGrid, Path=ActualWidth, Converter={StaticResource DrawerOffsetConverter}, ConverterParameter={StaticResource True}}" /> |
848 |
| - </Grid.RenderTransform> |
| 845 | + <Grid VerticalAlignment="Stretch" HorizontalAlignment="Right" |
| 846 | + x:Name="RightDrawerGrid" |
| 847 | + Margin="{Binding RelativeSource={RelativeSource Self}, Path=ActualWidth, Converter={StaticResource DrawerOffsetConverter}, ConverterParameter={StaticResource True}}"> |
849 | 848 | <AdornerDecorator>
|
850 | 849 | <AdornerDecorator.CacheMode>
|
851 | 850 | <BitmapCache EnableClearType="True" SnapsToDevicePixels="True"/>
|
|
0 commit comments