detect/detect.gui/Controls/StateItem.axaml

36 lines
1.5 KiB
Plaintext
Raw Normal View History

2024-11-13 17:09:15 +08:00
<UserControl 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"
xmlns:controls="clr-namespace:detect.gui.Controls"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="detect.gui.Controls.StateItem">
<Viewbox>
<Grid>
<Border Width="128"
Height="128"
Background="Transparent">
<Border CornerRadius="500"
Margin="10"
Background="{Binding $parent[controls:StateItem].ItemColor}">
<Border Margin="15"
CornerRadius="500"
Background="{StaticResource Light}">
</Border>
</Border>
</Border>
<TextBlock HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{Binding $parent[controls:StateItem].Text}"
FontSize="44"
Foreground="Black">
<TextBlock.RenderTransform>
<TransformGroup>
<RotateTransform Angle="-45" />
</TransformGroup>
</TextBlock.RenderTransform>
</TextBlock>
</Grid>
</Viewbox>
</UserControl>