feat: add avalonia FlyoutPresenter style.
This commit is contained in:
1 parent
371732575c
commit
3b02ece0b5
2 files changed
+51
No files matched your search
@@ -0,0 +1,50 @@
|
|||||||
|
<ResourceDictionary xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
x:ClassModifier="internal"
|
||||||
|
xmlns:hc="https://handyorg.github.io/handycontrol">
|
||||||
|
|
||||||
|
<ControlTheme x:Key="{x:Type FlyoutPresenter}"
|
||||||
|
TargetType="FlyoutPresenter">
|
||||||
|
<Setter Property="HorizontalContentAlignment"
|
||||||
|
Value="Stretch" />
|
||||||
|
<Setter Property="VerticalContentAlignment"
|
||||||
|
Value="Stretch" />
|
||||||
|
<Setter Property="Background"
|
||||||
|
Value="{DynamicResource RegionBrush}" />
|
||||||
|
<Setter Property="BorderBrush"
|
||||||
|
Value="{DynamicResource BorderBrush}" />
|
||||||
|
<Setter Property="BorderThickness"
|
||||||
|
Value="1" />
|
||||||
|
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility"
|
||||||
|
Value="Auto" />
|
||||||
|
<Setter Property="ScrollViewer.VerticalScrollBarVisibility"
|
||||||
|
Value="Auto" />
|
||||||
|
<Setter Property="hc:BorderElement.CornerRadius"
|
||||||
|
Value="{StaticResource DefaultCornerRadius}" />
|
||||||
|
<Setter Property="CornerRadius"
|
||||||
|
Value="{Binding $self.(hc:BorderElement.CornerRadius)}" />
|
||||||
|
<Setter Property="Template">
|
||||||
|
<ControlTemplate>
|
||||||
|
<Border Effect="{StaticResource EffectShadow2}"
|
||||||
|
Margin="8"
|
||||||
|
Background="{TemplateBinding Background}"
|
||||||
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
|
CornerRadius="{TemplateBinding CornerRadius}">
|
||||||
|
<ScrollViewer HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
|
||||||
|
VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
|
||||||
|
<ContentPresenter x:Name="PART_ContentPresenter"
|
||||||
|
Margin="{TemplateBinding Padding}"
|
||||||
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||||
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||||
|
HorizontalContentAlignment="Stretch"
|
||||||
|
VerticalContentAlignment="Stretch"
|
||||||
|
Content="{TemplateBinding Content}"
|
||||||
|
ContentTemplate="{TemplateBinding ContentTemplate}" />
|
||||||
|
</ScrollViewer>
|
||||||
|
</Border>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter>
|
||||||
|
</ControlTheme>
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
||||||
@@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/AdornerLayer.axaml" />
|
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/AdornerLayer.axaml" />
|
||||||
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/DataValidationErrors.axaml" />
|
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/DataValidationErrors.axaml" />
|
||||||
|
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/FlyoutPresenter.axaml" />
|
||||||
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/MenuFlyoutPresenter.axaml" />
|
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/MenuFlyoutPresenter.axaml" />
|
||||||
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/TransitioningContentControl.axaml" />
|
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/TransitioningContentControl.axaml" />
|
||||||
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/PopupRoot.axaml" />
|
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/PopupRoot.axaml" />
|
||||||
|
|||||||
Reference in new issue
Block a user