|
2591 | 2591 | <RepeatButton
|
2592 | 2592 | x:Name="PopupUpSpinButton"
|
2593 | 2593 | Content="{StaticResource ChevronUp}"
|
2594 |
| - Style="{StaticResource NumberBoxPopupSpinButtonStyle}" /> |
| 2594 | + Style="{DynamicResource NumberBoxPopupSpinButtonStyle}" /> |
2595 | 2595 |
|
2596 | 2596 | <RepeatButton
|
2597 | 2597 | x:Name="PopupDownSpinButton"
|
2598 | 2598 | Grid.Row="1"
|
2599 | 2599 | Content="{StaticResource ChevronDown}"
|
2600 |
| - Style="{StaticResource NumberBoxPopupSpinButtonStyle}" /> |
| 2600 | + Style="{DynamicResource NumberBoxPopupSpinButtonStyle}" /> |
2601 | 2601 | </Grid>
|
2602 | 2602 | </Border>
|
2603 | 2603 | </ui:ThemeShadowChrome>
|
|
2692 | 2692 | </Setter>
|
2693 | 2693 | </Style>
|
2694 | 2694 | <!--#endregion-->
|
| 2695 | + |
| 2696 | + <Thickness x:Key="MenuFlyoutScrollerMargin">0,4,0,4</Thickness> |
| 2697 | + |
| 2698 | + <Style x:Key="ContextMenuStyleBase" TargetType="ContextMenu"> |
| 2699 | + <Setter Property="Background" Value="{DynamicResource MenuFlyoutPresenterBackground}" /> |
| 2700 | + <Setter Property="BorderBrush" Value="{DynamicResource MenuFlyoutPresenterBorderBrush}" /> |
| 2701 | + <Setter Property="BorderThickness" Value="{DynamicResource MenuFlyoutPresenterBorderThemeThickness}" /> |
| 2702 | + <Setter Property="Padding" Value="{DynamicResource MenuFlyoutPresenterThemePadding}" /> |
| 2703 | + <Setter Property="FontFamily" Value="{DynamicResource ContentControlThemeFontFamily}" /> |
| 2704 | + <Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" /> |
| 2705 | + <Setter Property="FontStyle" Value="Normal" /> |
| 2706 | + <Setter Property="FontWeight" Value="Normal" /> |
| 2707 | + <Setter Property="Grid.IsSharedSizeScope" Value="true" /> |
| 2708 | + <Setter Property="HasDropShadow" Value="{DynamicResource {x:Static SystemParameters.DropShadowKey}}" /> |
| 2709 | + <!--<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />--> |
| 2710 | + <!--<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />--> |
| 2711 | + <!--<Setter Property="ScrollViewer.PanningMode" Value="VerticalOnly" />--> |
| 2712 | + <Setter Property="Stylus.IsFlicksEnabled" Value="False" /> |
| 2713 | + <Setter Property="MaxWidth" Value="{DynamicResource FlyoutThemeMaxWidth}" /> |
| 2714 | + <Setter Property="MinHeight" Value="{DynamicResource MenuFlyoutThemeMinHeight}" /> |
| 2715 | + <Setter Property="ui:ControlHelper.CornerRadius" Value="{DynamicResource OverlayCornerRadius}" /> |
| 2716 | + <Setter Property="Template"> |
| 2717 | + <Setter.Value> |
| 2718 | + <ControlTemplate TargetType="ContextMenu"> |
| 2719 | + <ui:ThemeShadowChrome |
| 2720 | + x:Name="Shdw" |
| 2721 | + IsShadowEnabled="{TemplateBinding HasDropShadow}" |
| 2722 | + CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius}" |
| 2723 | + SnapsToDevicePixels="True"> |
| 2724 | + <Border |
| 2725 | + Background="{TemplateBinding Background}" |
| 2726 | + CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius}"> |
| 2727 | + <Grid> |
| 2728 | + <ScrollViewer |
| 2729 | + x:Name="ContextMenuScrollViewer" |
| 2730 | + Style="{DynamicResource {ComponentResourceKey ResourceId=MenuScrollViewer, |
| 2731 | + TypeInTargetAssembly={x:Type FrameworkElement}}}" |
| 2732 | + Margin="{TemplateBinding Padding}" |
| 2733 | + MinWidth="{DynamicResource FlyoutThemeMinWidth}"> |
| 2734 | + <ItemsPresenter |
| 2735 | + RenderOptions.ClearTypeHint="Enabled" |
| 2736 | + Margin="{StaticResource MenuFlyoutScrollerMargin}" |
| 2737 | + KeyboardNavigation.DirectionalNavigation="Cycle" |
| 2738 | + SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" /> |
| 2739 | + </ScrollViewer> |
| 2740 | + <Border |
| 2741 | + x:Name="ContextMenuBorder" |
| 2742 | + BorderBrush="{TemplateBinding BorderBrush}" |
| 2743 | + BorderThickness="{TemplateBinding BorderThickness}" |
| 2744 | + CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius}" /> |
| 2745 | + </Grid> |
| 2746 | + </Border> |
| 2747 | + </ui:ThemeShadowChrome> |
| 2748 | + </ControlTemplate> |
| 2749 | + </Setter.Value> |
| 2750 | + </Setter> |
| 2751 | + </Style> |
| 2752 | + |
| 2753 | + <Style x:Key="DefaultContextMenuStyle" TargetType="ContextMenu" BasedOn="{StaticResource ContextMenuStyleBase}"> |
| 2754 | + <Setter Property="OverridesDefaultStyle" Value="True" /> |
| 2755 | + </Style> |
| 2756 | + |
| 2757 | + <Style TargetType="ContextMenu" BasedOn="{StaticResource DefaultContextMenuStyle}" /> |
| 2758 | + |
2695 | 2759 | </ResourceDictionary>
|
0 commit comments