|
@@ -3,6 +3,33 @@
|
|
|
xmlns:components="using:InABox.Avalonia.Components"
|
|
|
xmlns:timeSelector="using:InABox.Avalonia.Components.TimeSelector">
|
|
|
<Style Selector="components|TimeSelectorButton">
|
|
|
+ <Style.Resources>
|
|
|
+ <components:TimeSelectorTimeSpanFormatter x:Key="timeFormatter"/>
|
|
|
+ </Style.Resources>
|
|
|
+ <Setter Property="Template">
|
|
|
+ <ControlTemplate>
|
|
|
+ <Button Classes="Standard"
|
|
|
+ Command="{Binding $parent[components:TimeSelectorButton].ClickCommand}">
|
|
|
+ <Button.Styles>
|
|
|
+ <Style Selector="Button.Standard">
|
|
|
+ <Setter Property="CornerRadius" Value="{TemplateBinding CornerRadius}"/>
|
|
|
+ <Setter Property="Padding" Value="{TemplateBinding Padding}"/>
|
|
|
+ <Setter Property="Margin" Value="{TemplateBinding Margin}"/>
|
|
|
+ <Setter Property="Background" Value="{TemplateBinding Background}"/>
|
|
|
+ <Setter Property="Foreground" Value="{TemplateBinding Foreground}"/>
|
|
|
+ <Setter Property="BorderBrush" Value="{TemplateBinding BorderBrush}"/>
|
|
|
+ <Setter Property="BorderThickness" Value="{TemplateBinding BorderThickness}"/>
|
|
|
+ </Style>
|
|
|
+ </Button.Styles>
|
|
|
+ <Button.Content>
|
|
|
+ <MultiBinding Converter="{StaticResource timeFormatter}">
|
|
|
+ <Binding Path="$parent[components:TimeSelectorButton].Time"/>
|
|
|
+ <Binding Path="$parent[components:TimeSelectorButton]"/>
|
|
|
+ </MultiBinding>
|
|
|
+ </Button.Content>
|
|
|
+ </Button>
|
|
|
+ </ControlTemplate>
|
|
|
+ </Setter>
|
|
|
<Setter Property="BorderBrush" Value="{DynamicResource PrsButtonBorder}" />
|
|
|
<Setter Property="BorderThickness">
|
|
|
<Setter.Value>
|