feat: square.
This commit is contained in:
@@ -64,6 +64,15 @@
|
|||||||
<u:Avatar Classes="Large" />
|
<u:Avatar Classes="Large" />
|
||||||
<u:Avatar Classes="ExtraLarge" />
|
<u:Avatar Classes="ExtraLarge" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<u:Avatar Classes="Square ExtraExtraSmall Green" />
|
||||||
|
<u:Avatar Classes="Square ExtraSmall Green" />
|
||||||
|
<u:Avatar Classes="Square Small Green" />
|
||||||
|
<u:Avatar Classes="Square Default Green" />
|
||||||
|
<u:Avatar Classes="Square Medium Green" />
|
||||||
|
<u:Avatar Classes="Square Large Green" />
|
||||||
|
<u:Avatar Classes="Square ExtraLarge Green" />
|
||||||
|
</StackPanel>
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<u:AvatarGroup MaxCount="3">
|
<u:AvatarGroup MaxCount="3">
|
||||||
<u:Avatar Classes="Red" Content="LL" />
|
<u:Avatar Classes="Red" Content="LL" />
|
||||||
|
|||||||
@@ -12,19 +12,19 @@
|
|||||||
<Setter Property="Width" Value="48" />
|
<Setter Property="Width" Value="48" />
|
||||||
<Setter Property="Height" Value="{Binding $self.Width}" />
|
<Setter Property="Height" Value="{Binding $self.Width}" />
|
||||||
<Setter Property="Cursor" Value="Hand" />
|
<Setter Property="Cursor" Value="Hand" />
|
||||||
|
<Setter Property="CornerRadius" Value="100" />
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<ControlTemplate TargetType="{x:Type u:Avatar}">
|
<ControlTemplate TargetType="{x:Type u:Avatar}">
|
||||||
|
<Border
|
||||||
|
CornerRadius="{TemplateBinding CornerRadius}"
|
||||||
|
ClipToBounds="True">
|
||||||
<Panel>
|
<Panel>
|
||||||
<Panel.Clip>
|
<Border
|
||||||
<EllipseGeometry
|
IsVisible="{TemplateBinding Source, Converter={x:Static ObjectConverters.IsNull}}"
|
||||||
Center="{Binding #PART_Ellipse.Bounds.Center}"
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
RadiusX="{Binding #PART_Ellipse.Bounds.Width, Converter={StaticResource DivideByTwoConverter}}"
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
RadiusY="{Binding #PART_Ellipse.Bounds.Height, Converter={StaticResource DivideByTwoConverter}}" />
|
CornerRadius="{TemplateBinding CornerRadius}"
|
||||||
</Panel.Clip>
|
Background="{TemplateBinding Background}" />
|
||||||
<Ellipse Name="PART_Ellipse" />
|
|
||||||
<Ellipse
|
|
||||||
Fill="{TemplateBinding Background}"
|
|
||||||
IsVisible="{TemplateBinding Source, Converter={x:Static ObjectConverters.IsNull}}" />
|
|
||||||
<ContentPresenter
|
<ContentPresenter
|
||||||
Name="PART_ContentPresenter"
|
Name="PART_ContentPresenter"
|
||||||
IsVisible="{TemplateBinding Source, Converter={x:Static ObjectConverters.IsNull}}"
|
IsVisible="{TemplateBinding Source, Converter={x:Static ObjectConverters.IsNull}}"
|
||||||
@@ -45,6 +45,7 @@
|
|||||||
<ContentPresenter DockPanel.Dock="Bottom" />
|
<ContentPresenter DockPanel.Dock="Bottom" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
</Panel>
|
</Panel>
|
||||||
|
</Border>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter>
|
</Setter>
|
||||||
<Style Selector="^:pointerover /template/ ContentPresenter#PART_HoverMask">
|
<Style Selector="^:pointerover /template/ ContentPresenter#PART_HoverMask">
|
||||||
@@ -100,6 +101,11 @@
|
|||||||
<Style Selector="^.Grey">
|
<Style Selector="^.Grey">
|
||||||
<Setter Property="Background" Value="{DynamicResource SemiGrey3}" />
|
<Setter Property="Background" Value="{DynamicResource SemiGrey3}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
<Style Selector="^.Square">
|
||||||
|
<Setter Property="CornerRadius" Value="3" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^.ExtraExtraSmall">
|
<Style Selector="^.ExtraExtraSmall">
|
||||||
<Setter Property="Width" Value="20" />
|
<Setter Property="Width" Value="20" />
|
||||||
<Setter Property="FontSize" Value="10" />
|
<Setter Property="FontSize" Value="10" />
|
||||||
@@ -123,10 +129,16 @@
|
|||||||
<Style Selector="^.Large">
|
<Style Selector="^.Large">
|
||||||
<Setter Property="Width" Value="72" />
|
<Setter Property="Width" Value="72" />
|
||||||
<Setter Property="FontSize" Value="32" />
|
<Setter Property="FontSize" Value="32" />
|
||||||
|
<Style Selector="^.Square">
|
||||||
|
<Setter Property="CornerRadius" Value="6" />
|
||||||
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.ExtraLarge">
|
<Style Selector="^.ExtraLarge">
|
||||||
<Setter Property="Width" Value="128" />
|
<Setter Property="Width" Value="128" />
|
||||||
<Setter Property="FontSize" Value="64" />
|
<Setter Property="FontSize" Value="64" />
|
||||||
|
<Style Selector="^.Square">
|
||||||
|
<Setter Property="CornerRadius" Value="12" />
|
||||||
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user