Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Kinnara authored Oct 21, 2023
1 parent c3678c3 commit 44a8836
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 40 deletions.
22 changes: 9 additions & 13 deletions ModernWpf.Controls/CommandBarFlyout/CommandBarFlyout.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,8 @@
x:Name="LayoutRoot"
Background="{TemplateBinding Background}"
Padding="{TemplateBinding Padding}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}"
SnapsToDevicePixels="True">
<VisualStateManager.VisualStateGroups>
Expand All @@ -481,19 +483,13 @@
<VisualState x:Name="FullWidthOpenUp" />
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Grid>
<Border
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}" />
<ScrollViewer
Content="{TemplateBinding Content}"
Margin="{TemplateBinding BorderThickness}"
Padding="0,4,0,4"
HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Grid>
<ScrollViewer
Content="{TemplateBinding Content}"
Margin="{TemplateBinding BorderThickness}"
Padding="0,4,0,4"
HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border>
</ControlTemplate>
</Setter.Value>
Expand Down
16 changes: 7 additions & 9 deletions ModernWpf/Styles/Calendar.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,15 @@
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border
x:Name="Border"
Background="{TemplateBinding Background}"
BorderBrush="{DynamicResource CalendarViewNavigationButtonBorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Margin="{TemplateBinding Padding}">
<Border
x:Name="Border"
BorderBrush="{DynamicResource CalendarViewNavigationButtonBorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
<ContentPresenter
x:Name="Text"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
</Border>
<ContentPresenter
x:Name="Text"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
Expand Down
33 changes: 15 additions & 18 deletions ModernWpf/Styles/ComboBox.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -471,26 +471,23 @@
<Border
x:Name="PopupBorder"
Background="{DynamicResource ComboBoxDropDownBackground}"
BorderBrush="{DynamicResource ComboBoxDropDownBorderBrush}"
BorderThickness="{DynamicResource ComboBoxDropdownBorderThickness}"
Margin="0,-0.5,0,-1"
Padding="{DynamicResource ComboBoxDropdownBorderPadding}"
HorizontalAlignment="Stretch"
CornerRadius="{DynamicResource OverlayCornerRadius}">
<Border
BorderBrush="{DynamicResource ComboBoxDropDownBorderBrush}"
BorderThickness="{DynamicResource ComboBoxDropdownBorderThickness}"
Margin="0,-0.5,0,-1"
Padding="{DynamicResource ComboBoxDropdownBorderPadding}"
CornerRadius="{Binding ElementName=PopupBorder, Path=CornerRadius}">
<ScrollViewer
x:Name="ScrollViewer"
Foreground="{DynamicResource ComboBoxDropDownForeground}"
HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}">
<ItemsPresenter
Margin="{DynamicResource ComboBoxDropdownContentMargin}"
KeyboardNavigation.DirectionalNavigation="Contained"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</ScrollViewer>
</Border>
<ScrollViewer
x:Name="ScrollViewer"
Foreground="{DynamicResource ComboBoxDropDownForeground}"
HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}">
<ItemsPresenter
Margin="{DynamicResource ComboBoxDropdownContentMargin}"
KeyboardNavigation.DirectionalNavigation="Contained"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</ScrollViewer>
</Border>
</primitives:ThemeShadowChrome>
</Popup>
Expand Down

0 comments on commit 44a8836

Please sign in to comment.