| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <Styles xmlns="https://github.com/avaloniaui"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- 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>
- <DynamicResource ResourceKey="PrsBorderThickness" />
- </Setter.Value>
- </Setter>
- <Setter Property="Background" Value="{DynamicResource PrsButtonBackground}"/>
- <Setter Property="Foreground" Value="{DynamicResource PrsButtonForeground}" />
- <Setter Property="CornerRadius" Value="{DynamicResource PrsCornerRadius}" />
- <Setter Property="Padding" Value="10" />
- </Style>
- <Style Selector="timeSelector|TimeSelectorView TimePickerPresenter /template/ Grid#AcceptDismissGrid">
- <Setter Property="IsVisible" Value="False"/>
- </Style>
- </Styles>
|