1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <Styles xmlns="https://github.com/avaloniaui"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:components="using:InABox.Avalonia.Components">
- <Style Selector="components|ButtonStrip">
- <Setter Property="Template">
- <ControlTemplate>
- <ScrollViewer VerticalScrollBarVisibility="Disabled"
- HorizontalScrollBarVisibility="Auto"
- BorderBrush="{TemplateBinding BorderBrush}"
- CornerRadius="{TemplateBinding CornerRadius}">
- <ItemsControl ItemsSource="{TemplateBinding Items}">
- <ItemsControl.ItemsPanel>
- <ItemsPanelTemplate>
- <StackPanel Orientation="Horizontal" Spacing="{Binding $parent[components:ButtonStrip].ItemSpacing}"/>
- </ItemsPanelTemplate>
- </ItemsControl.ItemsPanel>
- </ItemsControl>
- </ScrollViewer>
- </ControlTemplate>
- </Setter>
- <Setter Property="Background" Value="{DynamicResource PrsButtonBackground}"/>
- <Setter Property="Foreground" Value="{DynamicResource PrsButtonForeground}"/>
- <Setter Property="SelectedBackground" Value="{DynamicResource PrsTileBackground}"/>
- <Setter Property="SelectedForeground" Value="{DynamicResource PrsTileForeground}"/>
- </Style>
- <Style Selector="components|ButtonStrip components|ButtonStripItem">
- <Setter Property="Template">
- <ControlTemplate>
- <Button Classes="NoHover Standard"
- CommandParameter="{TemplateBinding}"
- Command="{TemplateBinding Command}"
- Content="{TemplateBinding Text}">
- <Button.Styles>
- <Style Selector="Button.Standard">
- <Setter Property="Background" Value="{TemplateBinding Background}"/>
- <Setter Property="Foreground" Value="{TemplateBinding Foreground}"/>
- <Setter Property="FontSize" Value="{DynamicResource PrsFontSizeExtraSmall}"/>
- <Setter Property="Margin" Value="0"/>
- </Style>
- </Button.Styles>
- </Button>
- </ControlTemplate>
- </Setter>
- </Style>
- <Style Selector="components|ButtonStrip > components|ButtonStripItem">
- <Setter Property="Background" Value="{Binding $parent[components:ButtonStrip].Background}"/>
- <Setter Property="Foreground" Value="{Binding $parent[components:ButtonStrip].Foreground}"/>
- </Style>
- <Style Selector="components|ButtonStrip > components|ButtonStripItem:selected">
- <Setter Property="Background" Value="{Binding $parent[components:ButtonStrip].SelectedBackground}"/>
- <Setter Property="Foreground" Value="{Binding $parent[components:ButtonStrip].SelectedForeground}"/>
- </Style>
- </Styles>
|