feat: set flyout default font weight, add more demos.
This commit is contained in:
parent
06ab6cd7d5
commit
d3ca12854e
@ -7,17 +7,107 @@
|
|||||||
d:DesignHeight="450"
|
d:DesignHeight="450"
|
||||||
d:DesignWidth="800"
|
d:DesignWidth="800"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<StackPanel>
|
<Grid
|
||||||
<StackPanel>
|
HorizontalAlignment="Center"
|
||||||
<Button Content="Hello">
|
VerticalAlignment="Center"
|
||||||
<Button.Flyout>
|
ColumnDefinitions="* * * * *"
|
||||||
<Flyout Placement="Top" ShowMode="Standard">
|
RowDefinitions="* * * * *">
|
||||||
<StackPanel>
|
<Button
|
||||||
<TextBlock>Hello World</TextBlock>
|
Grid.Row="0"
|
||||||
</StackPanel>
|
Grid.Column="1"
|
||||||
</Flyout>
|
Content="Top Left">
|
||||||
</Button.Flyout>
|
<Button.Flyout>
|
||||||
</Button>
|
<Flyout Content="TopEdgeAlignedLeft" Placement="TopEdgeAlignedLeft" />
|
||||||
</StackPanel>
|
</Button.Flyout>
|
||||||
</StackPanel>
|
</Button>
|
||||||
|
<Button
|
||||||
|
Grid.Row="0"
|
||||||
|
Grid.Column="2"
|
||||||
|
Content="Top">
|
||||||
|
<Button.Flyout>
|
||||||
|
<Flyout Content="Top" Placement="Top" />
|
||||||
|
</Button.Flyout>
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
Grid.Row="0"
|
||||||
|
Grid.Column="3"
|
||||||
|
Content="Top Right">
|
||||||
|
<Button.Flyout>
|
||||||
|
<Flyout Content="TopEdgeAlignedRight" Placement="TopEdgeAlignedRight" />
|
||||||
|
</Button.Flyout>
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
Grid.Row="1"
|
||||||
|
Grid.Column="0"
|
||||||
|
Content="Left Top">
|
||||||
|
<Button.Flyout>
|
||||||
|
<Flyout Content="LeftEdgeAlignedTop" Placement="LeftEdgeAlignedTop" />
|
||||||
|
</Button.Flyout>
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
Grid.Row="1"
|
||||||
|
Grid.Column="4"
|
||||||
|
Content="Right Top">
|
||||||
|
<Button.Flyout>
|
||||||
|
<Flyout Content="RightEdgeAlignedTop" Placement="RightEdgeAlignedTop" />
|
||||||
|
</Button.Flyout>
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
Grid.Row="2"
|
||||||
|
Grid.Column="0"
|
||||||
|
Content="Left">
|
||||||
|
<Button.Flyout>
|
||||||
|
<Flyout Content="Left" Placement="Left" />
|
||||||
|
</Button.Flyout>
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
Grid.Row="2"
|
||||||
|
Grid.Column="4"
|
||||||
|
Content="Right">
|
||||||
|
<Button.Flyout>
|
||||||
|
<Flyout Content="Right" Placement="Right" />
|
||||||
|
</Button.Flyout>
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
Grid.Row="3"
|
||||||
|
Grid.Column="0"
|
||||||
|
Content="Left Bottom">
|
||||||
|
<Button.Flyout>
|
||||||
|
<Flyout Content="LeftEdgeAlignedBottom" Placement="LeftEdgeAlignedBottom" />
|
||||||
|
</Button.Flyout>
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
Grid.Row="3"
|
||||||
|
Grid.Column="4"
|
||||||
|
Content="Right Bottom">
|
||||||
|
<Button.Flyout>
|
||||||
|
<Flyout Content="RightEdgeAlignedBottom" Placement="RightEdgeAlignedBottom" />
|
||||||
|
</Button.Flyout>
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
Grid.Row="4"
|
||||||
|
Grid.Column="1"
|
||||||
|
Content="Bottom Left">
|
||||||
|
<Button.Flyout>
|
||||||
|
<Flyout Content="BottomEdgeAlignedLeft" Placement="BottomEdgeAlignedLeft" />
|
||||||
|
</Button.Flyout>
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
Grid.Row="4"
|
||||||
|
Grid.Column="2"
|
||||||
|
Content="Bottom">
|
||||||
|
<Button.Flyout>
|
||||||
|
<Flyout Content="Bottom" Placement="Bottom" />
|
||||||
|
</Button.Flyout>
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
Grid.Row="4"
|
||||||
|
Grid.Column="3"
|
||||||
|
Content="Bottom Right">
|
||||||
|
<Button.Flyout>
|
||||||
|
<Flyout Content="BottomEdgeAlignedRight" Placement="BottomEdgeAlignedRight" />
|
||||||
|
</Button.Flyout>
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
<Setter Property="FlyoutPresenter.HorizontalContentAlignment" Value="Stretch" />
|
<Setter Property="FlyoutPresenter.HorizontalContentAlignment" Value="Stretch" />
|
||||||
<Setter Property="FlyoutPresenter.VerticalContentAlignment" Value="Stretch" />
|
<Setter Property="FlyoutPresenter.VerticalContentAlignment" Value="Stretch" />
|
||||||
<Setter Property="FlyoutPresenter.UseLayoutRounding" Value="False" />
|
<Setter Property="FlyoutPresenter.UseLayoutRounding" Value="False" />
|
||||||
|
<Setter Property="FlyoutPresenter.FontWeight" Value="{DynamicResource FlyoutFontWeight}" />
|
||||||
<Setter Property="FlyoutPresenter.Background" Value="{DynamicResource FlyoutBackground}" />
|
<Setter Property="FlyoutPresenter.Background" Value="{DynamicResource FlyoutBackground}" />
|
||||||
<Setter Property="FlyoutPresenter.BorderBrush" Value="{DynamicResource FlyoutBorderBrush}" />
|
<Setter Property="FlyoutPresenter.BorderBrush" Value="{DynamicResource FlyoutBorderBrush}" />
|
||||||
<Setter Property="FlyoutPresenter.BorderThickness" Value="{DynamicResource FlyoutBorderThickness}" />
|
<Setter Property="FlyoutPresenter.BorderThickness" Value="{DynamicResource FlyoutBorderThickness}" />
|
||||||
@ -35,7 +36,8 @@
|
|||||||
HorizontalContentAlignment="Stretch"
|
HorizontalContentAlignment="Stretch"
|
||||||
VerticalContentAlignment="Stretch"
|
VerticalContentAlignment="Stretch"
|
||||||
Content="{TemplateBinding Content}"
|
Content="{TemplateBinding Content}"
|
||||||
ContentTemplate="{TemplateBinding ContentTemplate}" />
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||||
|
FontWeight="{TemplateBinding FontWeight}" />
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</Border>
|
</Border>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
x:Key="FlyoutBorderBrush"
|
x:Key="FlyoutBorderBrush"
|
||||||
Opacity="0.08"
|
Opacity="0.08"
|
||||||
Color="#1C1F23" />
|
Color="#1C1F23" />
|
||||||
|
<FontWeight x:Key="FlyoutFontWeight">400</FontWeight>
|
||||||
<Thickness x:Key="FlyoutBorderThickness">1</Thickness>
|
<Thickness x:Key="FlyoutBorderThickness">1</Thickness>
|
||||||
<BoxShadows x:Key="FlyoutBorderBoxShadow">0 0 8 0 #1A000000</BoxShadows>
|
<BoxShadows x:Key="FlyoutBorderBoxShadow">0 0 8 0 #1A000000</BoxShadows>
|
||||||
<sys:Double x:Key="FlyoutMinHeight">100</sys:Double>
|
<sys:Double x:Key="FlyoutMinHeight">100</sys:Double>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user