-
-
Notifications
You must be signed in to change notification settings - Fork 521
/
TestIcon.xaml
31 lines (31 loc) · 1.75 KB
/
TestIcon.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<UserControl x:Class="FluentTest.TestIcon"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:FluentTest"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Width="{Binding IconSize, RelativeSource={RelativeSource Mode=Self}}"
Height="{Binding IconSize, RelativeSource={RelativeSource Mode=Self}}"
d:DesignHeight="{Binding Tag, RelativeSource={RelativeSource Mode=Self}}"
d:DesignWidth="{Binding Tag, RelativeSource={RelativeSource Mode=Self}}"
BorderThickness="0"
mc:Ignorable="d">
<UserControl.Style>
<Style TargetType="UserControl">
<Setter Property="BorderBrush" Value="Black" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Margin" Value="0" />
<Setter Property="Padding" Value="1" />
<Setter Property="Tag" Value="24" />
</Style>
</UserControl.Style>
<Grid>
<Border Background="{Binding IconBrush, RelativeSource={RelativeSource AncestorType=UserControl}}"
BorderBrush="{Binding BorderBrush, RelativeSource={RelativeSource AncestorType=UserControl}}"
BorderThickness="{Binding IconBorderThickness, RelativeSource={RelativeSource AncestorType=UserControl}}">
<TextBlock HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{Binding IconSize, RelativeSource={RelativeSource AncestorType=UserControl}}" />
</Border>
</Grid>
</UserControl>