2022-12-21 17:12:11 +08:00
|
|
|
<UserControl
|
|
|
|
x:Class="Semi.Avalonia.Demo.Pages.FlyoutDemo"
|
|
|
|
xmlns="https://github.com/avaloniaui"
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
d:DesignHeight="450"
|
|
|
|
d:DesignWidth="800"
|
|
|
|
mc:Ignorable="d">
|
2022-12-24 15:04:02 +08:00
|
|
|
<UserControl.Styles>
|
|
|
|
<Style Selector="Button">
|
|
|
|
<Setter Property="Margin" Value="8" />
|
2024-03-22 20:37:01 +08:00
|
|
|
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
2022-12-24 15:04:02 +08:00
|
|
|
</Style>
|
|
|
|
</UserControl.Styles>
|
2022-12-24 14:59:42 +08:00
|
|
|
<Grid
|
|
|
|
HorizontalAlignment="Center"
|
|
|
|
VerticalAlignment="Center"
|
2023-04-23 01:10:23 +08:00
|
|
|
ColumnDefinitions="*, *, *, *, *"
|
2023-05-09 19:13:56 +08:00
|
|
|
RowDefinitions="*, *, *, *, *, *">
|
2022-12-24 14:59:42 +08:00
|
|
|
<Button
|
|
|
|
Grid.Row="0"
|
|
|
|
Grid.Column="1"
|
|
|
|
Content="Top Left">
|
|
|
|
<Button.Flyout>
|
|
|
|
<Flyout Content="TopEdgeAlignedLeft" Placement="TopEdgeAlignedLeft" />
|
|
|
|
</Button.Flyout>
|
|
|
|
</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>
|
2023-05-09 19:13:56 +08:00
|
|
|
|
|
|
|
<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>
|
2023-08-29 23:46:57 +08:00
|
|
|
<Label Classes="Red" Theme="{StaticResource TagLabel}">Red</Label>
|
|
|
|
<Label Classes="Pink" Theme="{StaticResource TagLabel}">Pink</Label>
|
|
|
|
<Label Classes="Purple" Theme="{StaticResource TagLabel}">Purple</Label>
|
|
|
|
<Label Classes="Violet" Theme="{StaticResource TagLabel}">Violet</Label>
|
|
|
|
<Label Classes="Indigo" Theme="{StaticResource TagLabel}">Indigo</Label>
|
2023-05-09 19:13:56 +08:00
|
|
|
<Label Classes="Blue" Theme="{StaticResource TagLabel}">Blue</Label>
|
2023-08-29 23:46:57 +08:00
|
|
|
<Label Classes="LightBlue" Theme="{StaticResource TagLabel}">LightBlue</Label>
|
2023-05-09 19:13:56 +08:00
|
|
|
<Label Classes="Cyan" Theme="{StaticResource TagLabel}">Cyan</Label>
|
2023-08-29 23:46:57 +08:00
|
|
|
<Label Classes="Teal" Theme="{StaticResource TagLabel}">Teal</Label>
|
2023-05-09 19:13:56 +08:00
|
|
|
<Label Classes="Green" Theme="{StaticResource TagLabel}">Green</Label>
|
|
|
|
<Label Classes="LightGreen" Theme="{StaticResource TagLabel}">LightGreen</Label>
|
|
|
|
<Label Classes="Lime" Theme="{StaticResource TagLabel}">Lime</Label>
|
|
|
|
<Label Classes="Yellow" Theme="{StaticResource TagLabel}">Yellow</Label>
|
2023-08-29 23:46:57 +08:00
|
|
|
<Label Classes="Amber" Theme="{StaticResource TagLabel}">Amber</Label>
|
|
|
|
<Label Classes="Orange" Theme="{StaticResource TagLabel}">Orange</Label>
|
|
|
|
<Label Classes="Grey" Theme="{StaticResource TagLabel}">Grey</Label>
|
2023-05-09 19:13:56 +08:00
|
|
|
<Label Classes="White" Theme="{StaticResource TagLabel}">White</Label>
|
|
|
|
</StackPanel>
|
|
|
|
</Flyout>
|
|
|
|
</Button.Flyout>
|
|
|
|
</Button>
|
2022-12-24 14:59:42 +08:00
|
|
|
</Grid>
|
|
|
|
|
2023-05-09 19:13:56 +08:00
|
|
|
|
|
|
|
</UserControl>
|