feat: add LightFlyout theme.
This commit is contained in:
parent
37746e38f7
commit
a36a088983
@ -16,7 +16,7 @@
|
|||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
ColumnDefinitions="*, *, *, *, *"
|
ColumnDefinitions="*, *, *, *, *"
|
||||||
RowDefinitions="*, *, *, *, *">
|
RowDefinitions="*, *, *, *, *, *">
|
||||||
<Button
|
<Button
|
||||||
Grid.Row="0"
|
Grid.Row="0"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
@ -113,6 +113,44 @@
|
|||||||
<Flyout Content="BottomEdgeAlignedRight" Placement="BottomEdgeAlignedRight" />
|
<Flyout Content="BottomEdgeAlignedRight" Placement="BottomEdgeAlignedRight" />
|
||||||
</Button.Flyout>
|
</Button.Flyout>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
Grid.Row="2"
|
||||||
|
Grid.Column="2"
|
||||||
|
Content="Center">
|
||||||
|
<Button.Flyout>
|
||||||
|
<Flyout Content="Center" Placement="Center" />
|
||||||
|
</Button.Flyout>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
Grid.Row="5"
|
||||||
|
Grid.Column="2" Content="LightFlyout">
|
||||||
|
<Button.Flyout>
|
||||||
|
<Flyout FlyoutPresenterTheme="{StaticResource LightFlyout}" Placement="Top">
|
||||||
|
<StackPanel>
|
||||||
|
<Label Classes="Amber" Theme="{StaticResource TagLabel}">Amber</Label>
|
||||||
|
<Label Classes="Blue" Theme="{StaticResource TagLabel}">Blue</Label>
|
||||||
|
<Label Classes="Cyan" Theme="{StaticResource TagLabel}">Cyan</Label>
|
||||||
|
<Label Classes="Green" Theme="{StaticResource TagLabel}">Green</Label>
|
||||||
|
<Label Classes="Grey" Theme="{StaticResource TagLabel}">Grey</Label>
|
||||||
|
<Label Classes="Indigo" Theme="{StaticResource TagLabel}">Indigo</Label>
|
||||||
|
<Label Classes="LightBlue" Theme="{StaticResource TagLabel}">LightBlue</Label>
|
||||||
|
<Label Classes="LightGreen" Theme="{StaticResource TagLabel}">LightGreen</Label>
|
||||||
|
<Label Classes="Lime" Theme="{StaticResource TagLabel}">Lime</Label>
|
||||||
|
<Label Classes="Orange" Theme="{StaticResource TagLabel}">Orange</Label>
|
||||||
|
<Label Classes="Pink" Theme="{StaticResource TagLabel}">Pink</Label>
|
||||||
|
<Label Classes="Purple" Theme="{StaticResource TagLabel}">Purple</Label>
|
||||||
|
<Label Classes="Red" Theme="{StaticResource TagLabel}">Red</Label>
|
||||||
|
<Label Classes="Teal" Theme="{StaticResource TagLabel}">Teal</Label>
|
||||||
|
<Label Classes="Violet" Theme="{StaticResource TagLabel}">Violet</Label>
|
||||||
|
<Label Classes="Yellow" Theme="{StaticResource TagLabel}">Yellow</Label>
|
||||||
|
<Label Classes="White" Theme="{StaticResource TagLabel}">White</Label>
|
||||||
|
</StackPanel>
|
||||||
|
</Flyout>
|
||||||
|
</Button.Flyout>
|
||||||
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</UserControl>
|
|
||||||
|
</UserControl>
|
@ -46,4 +46,49 @@
|
|||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter>
|
</Setter>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
|
<ControlTheme x:Key="LightFlyout" TargetType="FlyoutPresenter">
|
||||||
|
<Setter Property="FlyoutPresenter.HorizontalContentAlignment" Value="Stretch" />
|
||||||
|
<Setter Property="FlyoutPresenter.VerticalContentAlignment" Value="Stretch" />
|
||||||
|
<Setter Property="FlyoutPresenter.UseLayoutRounding" Value="False" />
|
||||||
|
<Setter Property="FlyoutPresenter.FontWeight" Value="{DynamicResource FlyoutFontWeight}" />
|
||||||
|
<Setter Property="FlyoutPresenter.Background" Value="Transparent" />
|
||||||
|
<Setter Property="FlyoutPresenter.BorderBrush" Value="{DynamicResource FlyoutBorderBrush}" />
|
||||||
|
<Setter Property="FlyoutPresenter.BorderThickness" Value="{DynamicResource FlyoutBorderThickness}" />
|
||||||
|
<Setter Property="FlyoutPresenter.Padding" Value="{DynamicResource FlyoutPadding}" />
|
||||||
|
<Setter Property="FlyoutPresenter.MinWidth" Value="{DynamicResource FlyoutMinWidth}" />
|
||||||
|
<Setter Property="FlyoutPresenter.MaxWidth" Value="{DynamicResource FlyoutMaxWidth}" />
|
||||||
|
<Setter Property="FlyoutPresenter.MinHeight" Value="{DynamicResource FlyoutMinHeight}" />
|
||||||
|
<Setter Property="FlyoutPresenter.MaxHeight" Value="{DynamicResource FlyoutMaxHeight}" />
|
||||||
|
<Setter Property="FlyoutPresenter.Foreground" Value="{DynamicResource FlyoutForeground}" />
|
||||||
|
<Setter Property="FlyoutPresenter.ClipToBounds" Value="False" />
|
||||||
|
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
|
||||||
|
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
|
||||||
|
<Setter Property="FlyoutPresenter.CornerRadius" Value="{DynamicResource FlyoutCornerRadius}" />
|
||||||
|
<Setter Property="FlyoutPresenter.Margin" Value="4" />
|
||||||
|
<Setter Property="FlyoutPresenter.Template">
|
||||||
|
<ControlTemplate TargetType="FlyoutPresenter">
|
||||||
|
<Border
|
||||||
|
Name="LayoutRoot"
|
||||||
|
Background="{TemplateBinding Background}"
|
||||||
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
|
BoxShadow="{DynamicResource FlyoutBorderBoxShadow}"
|
||||||
|
ClipToBounds="False"
|
||||||
|
CornerRadius="{TemplateBinding CornerRadius}"
|
||||||
|
UseLayoutRounding="False">
|
||||||
|
<ScrollViewer HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
|
||||||
|
<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>
|
</ResourceDictionary>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user