committed by
GitHub
163 changed files with 1371 additions and 843 deletions
@ -1,14 +1,10 @@ |
|||||
using System; |
namespace ControlCatalog.Models |
||||
using System.Collections.Generic; |
|
||||
using System.Text; |
|
||||
|
|
||||
namespace ControlCatalog.Models |
|
||||
{ |
{ |
||||
public enum CatalogTheme |
public enum CatalogTheme |
||||
{ |
{ |
||||
FluentLight, |
FluentLight, |
||||
FluentDark, |
FluentDark, |
||||
DefaultLight, |
SimpleLight, |
||||
DefaultDark |
SimpleDark |
||||
} |
} |
||||
} |
} |
||||
|
|||||
@ -1,6 +1,5 @@ |
|||||
<Application xmlns="https://github.com/avaloniaui"> |
<Application xmlns="https://github.com/avaloniaui"> |
||||
<Application.Styles> |
<Application.Styles> |
||||
<StyleInclude Source="resm:Avalonia.Themes.Default.DefaultTheme.xaml?assembly=Avalonia.Themes.Default"/> |
<SimpleTheme Mode="Light" /> |
||||
<StyleInclude Source="resm:Avalonia.Themes.Default.Accents.BaseLight.xaml?assembly=Avalonia.Themes.Default"/> |
|
||||
</Application.Styles> |
</Application.Styles> |
||||
</Application> |
</Application> |
||||
|
|||||
@ -1,6 +1,5 @@ |
|||||
<Application xmlns="https://github.com/avaloniaui"> |
<Application xmlns="https://github.com/avaloniaui"> |
||||
<Application.Styles> |
<Application.Styles> |
||||
<StyleInclude Source="resm:Avalonia.Themes.Default.DefaultTheme.xaml?assembly=Avalonia.Themes.Default"/> |
<SimpleTheme Mode="Light" /> |
||||
<StyleInclude Source="resm:Avalonia.Themes.Default.Accents.BaseLight.xaml?assembly=Avalonia.Themes.Default"/> |
|
||||
</Application.Styles> |
</Application.Styles> |
||||
</Application> |
</Application> |
||||
|
|||||
@ -1,9 +1,7 @@ |
|||||
<Application |
<Application xmlns="https://github.com/avaloniaui" |
||||
xmlns="https://github.com/avaloniaui" |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
x:Class="VirtualizationDemo.App"> |
||||
x:Class="VirtualizationDemo.App"> |
<Application.Styles> |
||||
<Application.Styles> |
<SimpleTheme /> |
||||
<StyleInclude Source="avares://Avalonia.Themes.Default/DefaultTheme.xaml"/> |
</Application.Styles> |
||||
<StyleInclude Source="avares://Avalonia.Themes.Default/Accents/BaseLight.xaml"/> |
</Application> |
||||
</Application.Styles> |
|
||||
</Application> |
|
||||
|
|||||
@ -1,6 +1,5 @@ |
|||||
<Application xmlns="https://github.com/avaloniaui"> |
<Application xmlns="https://github.com/avaloniaui"> |
||||
<Application.Styles> |
<Application.Styles> |
||||
<StyleInclude Source="resm:Avalonia.Themes.Default.DefaultTheme.xaml?assembly=Avalonia.Themes.Default"/> |
<SimpleTheme Mode="Light" /> |
||||
<StyleInclude Source="resm:Avalonia.Themes.Default.Accents.BaseLight.xaml?assembly=Avalonia.Themes.Default"/> |
|
||||
</Application.Styles> |
</Application.Styles> |
||||
</Application> |
</Application> |
||||
|
|||||
@ -1,188 +0,0 @@ |
|||||
<Styles xmlns="https://github.com/avaloniaui" |
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|
||||
x:CompileBindings="True"> |
|
||||
|
|
||||
<Style Selector="Thumb.ColorSliderThumbStyle"> |
|
||||
<Setter Property="BorderThickness" Value="0" /> |
|
||||
<Setter Property="Template"> |
|
||||
<Setter.Value> |
|
||||
<ControlTemplate> |
|
||||
<Border Background="{TemplateBinding Background}" |
|
||||
BorderBrush="{TemplateBinding BorderBrush}" |
|
||||
BorderThickness="{TemplateBinding BorderThickness}" |
|
||||
CornerRadius="10" /> |
|
||||
</ControlTemplate> |
|
||||
</Setter.Value> |
|
||||
</Setter> |
|
||||
</Style> |
|
||||
|
|
||||
<Style Selector="ColorSlider:horizontal"> |
|
||||
<Setter Property="BorderThickness" Value="0" /> |
|
||||
<Setter Property="CornerRadius" Value="10" /> |
|
||||
<Setter Property="Height" Value="20" /> |
|
||||
<Setter Property="Template"> |
|
||||
<ControlTemplate TargetType="{x:Type ColorSlider}"> |
|
||||
<Border BorderThickness="{TemplateBinding BorderThickness}" |
|
||||
BorderBrush="{TemplateBinding BorderBrush}" |
|
||||
CornerRadius="{TemplateBinding CornerRadius}"> |
|
||||
<Grid Margin="{TemplateBinding Padding}"> |
|
||||
<Rectangle HorizontalAlignment="Stretch" |
|
||||
VerticalAlignment="Stretch" |
|
||||
Fill="{StaticResource ColorControlCheckeredBackgroundBrush}" |
|
||||
RadiusX="{TemplateBinding CornerRadius, Converter={StaticResource TopLeftCornerRadiusConverter}}" |
|
||||
RadiusY="{TemplateBinding CornerRadius, Converter={StaticResource BottomRightCornerRadiusConverter}}" /> |
|
||||
<Rectangle HorizontalAlignment="Stretch" |
|
||||
VerticalAlignment="Stretch" |
|
||||
Fill="{TemplateBinding Background}" |
|
||||
RadiusX="{TemplateBinding CornerRadius, Converter={StaticResource TopLeftCornerRadiusConverter}}" |
|
||||
RadiusY="{TemplateBinding CornerRadius, Converter={StaticResource BottomRightCornerRadiusConverter}}" /> |
|
||||
<Track Name="PART_Track" |
|
||||
HorizontalAlignment="Stretch" |
|
||||
VerticalAlignment="Stretch" |
|
||||
Minimum="{TemplateBinding Minimum}" |
|
||||
Maximum="{TemplateBinding Maximum}" |
|
||||
Value="{TemplateBinding Value, Mode=TwoWay}" |
|
||||
IsDirectionReversed="{TemplateBinding IsDirectionReversed}" |
|
||||
Orientation="Horizontal"> |
|
||||
<Track.DecreaseButton> |
|
||||
<RepeatButton Name="PART_DecreaseButton" |
|
||||
Background="Transparent" |
|
||||
Focusable="False" |
|
||||
HorizontalAlignment="Stretch" |
|
||||
VerticalAlignment="Stretch"> |
|
||||
<RepeatButton.Template> |
|
||||
<ControlTemplate> |
|
||||
<Border Name="FocusTarget" |
|
||||
Background="Transparent" |
|
||||
Margin="0,-10" /> |
|
||||
</ControlTemplate> |
|
||||
</RepeatButton.Template> |
|
||||
</RepeatButton> |
|
||||
</Track.DecreaseButton> |
|
||||
<Track.IncreaseButton> |
|
||||
<RepeatButton Name="PART_IncreaseButton" |
|
||||
Background="Transparent" |
|
||||
Focusable="False" |
|
||||
HorizontalAlignment="Stretch" |
|
||||
VerticalAlignment="Stretch"> |
|
||||
<RepeatButton.Template> |
|
||||
<ControlTemplate> |
|
||||
<Border Name="FocusTarget" |
|
||||
Background="Transparent" |
|
||||
Margin="0,-10" /> |
|
||||
</ControlTemplate> |
|
||||
</RepeatButton.Template> |
|
||||
</RepeatButton> |
|
||||
</Track.IncreaseButton> |
|
||||
<Thumb Classes="ColorSliderThumbStyle" |
|
||||
Name="ColorSliderThumb" |
|
||||
Margin="0" |
|
||||
Padding="0" |
|
||||
DataContext="{TemplateBinding Value}" |
|
||||
Height="{TemplateBinding Height}" |
|
||||
Width="{TemplateBinding Height}" /> |
|
||||
</Track> |
|
||||
</Grid> |
|
||||
</Border> |
|
||||
</ControlTemplate> |
|
||||
</Setter> |
|
||||
</Style> |
|
||||
|
|
||||
<Style Selector="ColorSlider:vertical"> |
|
||||
<Setter Property="BorderThickness" Value="0" /> |
|
||||
<Setter Property="CornerRadius" Value="10" /> |
|
||||
<Setter Property="Width" Value="20" /> |
|
||||
<Setter Property="Template"> |
|
||||
<ControlTemplate TargetType="{x:Type ColorSlider}"> |
|
||||
<Border BorderThickness="{TemplateBinding BorderThickness}" |
|
||||
BorderBrush="{TemplateBinding BorderBrush}" |
|
||||
CornerRadius="{TemplateBinding CornerRadius}"> |
|
||||
<Grid Margin="{TemplateBinding Padding}"> |
|
||||
<Rectangle HorizontalAlignment="Stretch" |
|
||||
VerticalAlignment="Stretch" |
|
||||
Fill="{StaticResource ColorControlCheckeredBackgroundBrush}" |
|
||||
RadiusX="{TemplateBinding CornerRadius, Converter={StaticResource TopLeftCornerRadiusConverter}}" |
|
||||
RadiusY="{TemplateBinding CornerRadius, Converter={StaticResource BottomRightCornerRadiusConverter}}" /> |
|
||||
<Rectangle HorizontalAlignment="Stretch" |
|
||||
VerticalAlignment="Stretch" |
|
||||
Fill="{TemplateBinding Background}" |
|
||||
RadiusX="{TemplateBinding CornerRadius, Converter={StaticResource TopLeftCornerRadiusConverter}}" |
|
||||
RadiusY="{TemplateBinding CornerRadius, Converter={StaticResource BottomRightCornerRadiusConverter}}" /> |
|
||||
<Track Name="PART_Track" |
|
||||
HorizontalAlignment="Stretch" |
|
||||
VerticalAlignment="Stretch" |
|
||||
Minimum="{TemplateBinding Minimum}" |
|
||||
Maximum="{TemplateBinding Maximum}" |
|
||||
Value="{TemplateBinding Value, Mode=TwoWay}" |
|
||||
IsDirectionReversed="{TemplateBinding IsDirectionReversed}" |
|
||||
Orientation="Vertical"> |
|
||||
<Track.DecreaseButton> |
|
||||
<RepeatButton Name="PART_DecreaseButton" |
|
||||
Background="Transparent" |
|
||||
Focusable="False" |
|
||||
HorizontalAlignment="Stretch" |
|
||||
VerticalAlignment="Stretch"> |
|
||||
<RepeatButton.Template> |
|
||||
<ControlTemplate> |
|
||||
<Border Name="FocusTarget" |
|
||||
Background="Transparent" |
|
||||
Margin="0,-10" /> |
|
||||
</ControlTemplate> |
|
||||
</RepeatButton.Template> |
|
||||
</RepeatButton> |
|
||||
</Track.DecreaseButton> |
|
||||
<Track.IncreaseButton> |
|
||||
<RepeatButton Name="PART_IncreaseButton" |
|
||||
Background="Transparent" |
|
||||
Focusable="False" |
|
||||
HorizontalAlignment="Stretch" |
|
||||
VerticalAlignment="Stretch"> |
|
||||
<RepeatButton.Template> |
|
||||
<ControlTemplate> |
|
||||
<Border Name="FocusTarget" |
|
||||
Background="Transparent" |
|
||||
Margin="0,-10" /> |
|
||||
</ControlTemplate> |
|
||||
</RepeatButton.Template> |
|
||||
</RepeatButton> |
|
||||
</Track.IncreaseButton> |
|
||||
<Thumb Classes="ColorSliderThumbStyle" |
|
||||
Name="ColorSliderThumb" |
|
||||
Margin="0" |
|
||||
Padding="0" |
|
||||
DataContext="{TemplateBinding Value}" |
|
||||
Height="{TemplateBinding Width}" |
|
||||
Width="{TemplateBinding Width}" /> |
|
||||
</Track> |
|
||||
</Grid> |
|
||||
</Border> |
|
||||
</ControlTemplate> |
|
||||
</Setter> |
|
||||
</Style> |
|
||||
|
|
||||
<!-- Normal State --> |
|
||||
<Style Selector="ColorSlider /template/ Thumb.ColorSliderThumbStyle"> |
|
||||
<Setter Property="Background" Value="Transparent" /> |
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ThemeForegroundBrush}" /> |
|
||||
<Setter Property="BorderThickness" Value="3" /> |
|
||||
</Style> |
|
||||
|
|
||||
<!-- Selector/Thumb Color --> |
|
||||
<Style Selector="ColorSlider:pointerover /template/ Thumb.ColorSliderThumbStyle"> |
|
||||
<Setter Property="Opacity" Value="0.75" /> |
|
||||
</Style> |
|
||||
<Style Selector="ColorSlider:pointerover:dark-selector /template/ Thumb.ColorSliderThumbStyle"> |
|
||||
<Setter Property="Opacity" Value="0.7" /> |
|
||||
</Style> |
|
||||
<Style Selector="ColorSlider:pointerover:light-selector /template/ Thumb.ColorSliderThumbStyle"> |
|
||||
<Setter Property="Opacity" Value="0.8" /> |
|
||||
</Style> |
|
||||
|
|
||||
<Style Selector="ColorSlider:dark-selector /template/ Thumb.ColorSliderThumbStyle"> |
|
||||
<Setter Property="BorderBrush" Value="Black" /> |
|
||||
</Style> |
|
||||
<Style Selector="ColorSlider:light-selector /template/ Thumb.ColorSliderThumbStyle"> |
|
||||
<Setter Property="BorderBrush" Value="White" /> |
|
||||
</Style> |
|
||||
|
|
||||
</Styles> |
|
||||
@ -1,44 +0,0 @@ |
|||||
<Styles xmlns="https://github.com/avaloniaui" |
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|
||||
xmlns:converters="using:Avalonia.Controls.Converters"> |
|
||||
|
|
||||
<Styles.Resources> |
|
||||
<!-- Shared Resources --> |
|
||||
<VisualBrush x:Key="ColorControlCheckeredBackgroundBrush" |
|
||||
TileMode="Tile" |
|
||||
Stretch="Uniform" |
|
||||
DestinationRect="0,0,8,8"> |
|
||||
<VisualBrush.Visual> |
|
||||
<DrawingPresenter Width="8" |
|
||||
Height="8"> |
|
||||
<DrawingGroup> |
|
||||
<GeometryDrawing Geometry="M0,0 L2,0 2,2, 0,2Z" |
|
||||
Brush="Transparent" /> |
|
||||
<GeometryDrawing Geometry="M0,1 L2,1 2,2, 1,2 1,0 0,0Z" |
|
||||
Brush="#19808080" /> |
|
||||
</DrawingGroup> |
|
||||
</DrawingPresenter> |
|
||||
</VisualBrush.Visual> |
|
||||
</VisualBrush> |
|
||||
|
|
||||
<!-- Shared Converters --> |
|
||||
<converters:EnumToBoolConverter x:Key="EnumToBoolConverter" /> |
|
||||
<converters:ToBrushConverter x:Key="ToBrushConverter" /> |
|
||||
<converters:CornerRadiusFilterConverter x:Key="LeftCornerRadiusFilterConverter" Filter="TopLeft, BottomLeft"/> |
|
||||
<converters:CornerRadiusFilterConverter x:Key="RightCornerRadiusFilterConverter" Filter="TopRight, BottomRight"/> |
|
||||
<converters:CornerRadiusFilterConverter x:Key="TopCornerRadiusFilterConverter" Filter="TopLeft, TopRight"/> |
|
||||
<converters:CornerRadiusFilterConverter x:Key="BottomCornerRadiusFilterConverter" Filter="BottomLeft, BottomRight"/> |
|
||||
<converters:CornerRadiusToDoubleConverter x:Key="TopLeftCornerRadiusConverter" Corner="TopLeft" /> |
|
||||
<converters:CornerRadiusToDoubleConverter x:Key="BottomRightCornerRadiusConverter" Corner="BottomRight" /> |
|
||||
</Styles.Resources> |
|
||||
|
|
||||
<!-- Primitives --> |
|
||||
<StyleInclude Source="avares://Avalonia.Controls.ColorPicker/Themes/Default/ColorPreviewer.xaml" /> |
|
||||
<StyleInclude Source="avares://Avalonia.Controls.ColorPicker/Themes/Default/ColorSlider.xaml" /> |
|
||||
<StyleInclude Source="avares://Avalonia.Controls.ColorPicker/Themes/Default/ColorSpectrum.xaml" /> |
|
||||
|
|
||||
<!-- Controls --> |
|
||||
<!-- Note the ColorPicker and ColorView are unsupported in the default theme --> |
|
||||
<!-- These controls depend on fluent styles for TabControl, Button, TextBox, etc. --> |
|
||||
|
|
||||
</Styles> |
|
||||
@ -0,0 +1,190 @@ |
|||||
|
<ResourceDictionary xmlns="https://github.com/avaloniaui" |
||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
||||
|
x:CompileBindings="True"> |
||||
|
|
||||
|
<ControlTheme x:Key="ColorSliderThumbTheme" |
||||
|
TargetType="Thumb"> |
||||
|
<Setter Property="Background" Value="Transparent" /> |
||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ThemeForegroundBrush}" /> |
||||
|
<Setter Property="BorderThickness" Value="3" /> |
||||
|
<Setter Property="CornerRadius" Value="10" /> |
||||
|
<Setter Property="Template"> |
||||
|
<Setter.Value> |
||||
|
<ControlTemplate> |
||||
|
<Border Background="{TemplateBinding Background}" |
||||
|
BorderBrush="{TemplateBinding BorderBrush}" |
||||
|
BorderThickness="{TemplateBinding BorderThickness}" |
||||
|
CornerRadius="{TemplateBinding CornerRadius}" /> |
||||
|
</ControlTemplate> |
||||
|
</Setter.Value> |
||||
|
</Setter> |
||||
|
</ControlTheme> |
||||
|
|
||||
|
<ControlTheme x:Key="{x:Type ColorSlider}" |
||||
|
TargetType="ColorSlider"> |
||||
|
|
||||
|
<Style Selector="^:horizontal"> |
||||
|
<Setter Property="BorderThickness" Value="0" /> |
||||
|
<Setter Property="CornerRadius" Value="10" /> |
||||
|
<Setter Property="Height" Value="20" /> |
||||
|
<Setter Property="Template"> |
||||
|
<ControlTemplate TargetType="{x:Type ColorSlider}"> |
||||
|
<Border BorderThickness="{TemplateBinding BorderThickness}" |
||||
|
BorderBrush="{TemplateBinding BorderBrush}" |
||||
|
CornerRadius="{TemplateBinding CornerRadius}"> |
||||
|
<Grid Margin="{TemplateBinding Padding}"> |
||||
|
<Rectangle HorizontalAlignment="Stretch" |
||||
|
VerticalAlignment="Stretch" |
||||
|
Fill="{StaticResource ColorControlCheckeredBackgroundBrush}" |
||||
|
RadiusX="{TemplateBinding CornerRadius, Converter={StaticResource TopLeftCornerRadiusConverter}}" |
||||
|
RadiusY="{TemplateBinding CornerRadius, Converter={StaticResource BottomRightCornerRadiusConverter}}" /> |
||||
|
<Rectangle HorizontalAlignment="Stretch" |
||||
|
VerticalAlignment="Stretch" |
||||
|
Fill="{TemplateBinding Background}" |
||||
|
RadiusX="{TemplateBinding CornerRadius, Converter={StaticResource TopLeftCornerRadiusConverter}}" |
||||
|
RadiusY="{TemplateBinding CornerRadius, Converter={StaticResource BottomRightCornerRadiusConverter}}" /> |
||||
|
<Track Name="PART_Track" |
||||
|
HorizontalAlignment="Stretch" |
||||
|
VerticalAlignment="Stretch" |
||||
|
Minimum="{TemplateBinding Minimum}" |
||||
|
Maximum="{TemplateBinding Maximum}" |
||||
|
Value="{TemplateBinding Value, Mode=TwoWay}" |
||||
|
IsDirectionReversed="{TemplateBinding IsDirectionReversed}" |
||||
|
Orientation="Horizontal"> |
||||
|
<Track.DecreaseButton> |
||||
|
<RepeatButton Name="PART_DecreaseButton" |
||||
|
Background="Transparent" |
||||
|
Focusable="False" |
||||
|
HorizontalAlignment="Stretch" |
||||
|
VerticalAlignment="Stretch"> |
||||
|
<RepeatButton.Template> |
||||
|
<ControlTemplate> |
||||
|
<Border Name="FocusTarget" |
||||
|
Background="Transparent" |
||||
|
Margin="0,-10" /> |
||||
|
</ControlTemplate> |
||||
|
</RepeatButton.Template> |
||||
|
</RepeatButton> |
||||
|
</Track.DecreaseButton> |
||||
|
<Track.IncreaseButton> |
||||
|
<RepeatButton Name="PART_IncreaseButton" |
||||
|
Background="Transparent" |
||||
|
Focusable="False" |
||||
|
HorizontalAlignment="Stretch" |
||||
|
VerticalAlignment="Stretch"> |
||||
|
<RepeatButton.Template> |
||||
|
<ControlTemplate> |
||||
|
<Border Name="FocusTarget" |
||||
|
Background="Transparent" |
||||
|
Margin="0,-10" /> |
||||
|
</ControlTemplate> |
||||
|
</RepeatButton.Template> |
||||
|
</RepeatButton> |
||||
|
</Track.IncreaseButton> |
||||
|
<Thumb Name="ColorSliderThumb" |
||||
|
Theme="{StaticResource ColorSliderThumbTheme}" |
||||
|
Margin="0" |
||||
|
Padding="0" |
||||
|
DataContext="{TemplateBinding Value}" |
||||
|
Height="{TemplateBinding Height}" |
||||
|
Width="{TemplateBinding Height}" /> |
||||
|
</Track> |
||||
|
</Grid> |
||||
|
</Border> |
||||
|
</ControlTemplate> |
||||
|
</Setter> |
||||
|
</Style> |
||||
|
|
||||
|
<Style Selector="^:vertical"> |
||||
|
<Setter Property="BorderThickness" Value="0" /> |
||||
|
<Setter Property="CornerRadius" Value="10" /> |
||||
|
<Setter Property="Width" Value="20" /> |
||||
|
<Setter Property="Template"> |
||||
|
<ControlTemplate TargetType="{x:Type ColorSlider}"> |
||||
|
<Border BorderThickness="{TemplateBinding BorderThickness}" |
||||
|
BorderBrush="{TemplateBinding BorderBrush}" |
||||
|
CornerRadius="{TemplateBinding CornerRadius}"> |
||||
|
<Grid Margin="{TemplateBinding Padding}"> |
||||
|
<Rectangle HorizontalAlignment="Stretch" |
||||
|
VerticalAlignment="Stretch" |
||||
|
Fill="{StaticResource ColorControlCheckeredBackgroundBrush}" |
||||
|
RadiusX="{TemplateBinding CornerRadius, Converter={StaticResource TopLeftCornerRadiusConverter}}" |
||||
|
RadiusY="{TemplateBinding CornerRadius, Converter={StaticResource BottomRightCornerRadiusConverter}}" /> |
||||
|
<Rectangle HorizontalAlignment="Stretch" |
||||
|
VerticalAlignment="Stretch" |
||||
|
Fill="{TemplateBinding Background}" |
||||
|
RadiusX="{TemplateBinding CornerRadius, Converter={StaticResource TopLeftCornerRadiusConverter}}" |
||||
|
RadiusY="{TemplateBinding CornerRadius, Converter={StaticResource BottomRightCornerRadiusConverter}}" /> |
||||
|
<Track Name="PART_Track" |
||||
|
HorizontalAlignment="Stretch" |
||||
|
VerticalAlignment="Stretch" |
||||
|
Minimum="{TemplateBinding Minimum}" |
||||
|
Maximum="{TemplateBinding Maximum}" |
||||
|
Value="{TemplateBinding Value, Mode=TwoWay}" |
||||
|
IsDirectionReversed="{TemplateBinding IsDirectionReversed}" |
||||
|
Orientation="Vertical"> |
||||
|
<Track.DecreaseButton> |
||||
|
<RepeatButton Name="PART_DecreaseButton" |
||||
|
Background="Transparent" |
||||
|
Focusable="False" |
||||
|
HorizontalAlignment="Stretch" |
||||
|
VerticalAlignment="Stretch"> |
||||
|
<RepeatButton.Template> |
||||
|
<ControlTemplate> |
||||
|
<Border Name="FocusTarget" |
||||
|
Background="Transparent" |
||||
|
Margin="0,-10" /> |
||||
|
</ControlTemplate> |
||||
|
</RepeatButton.Template> |
||||
|
</RepeatButton> |
||||
|
</Track.DecreaseButton> |
||||
|
<Track.IncreaseButton> |
||||
|
<RepeatButton Name="PART_IncreaseButton" |
||||
|
Background="Transparent" |
||||
|
Focusable="False" |
||||
|
HorizontalAlignment="Stretch" |
||||
|
VerticalAlignment="Stretch"> |
||||
|
<RepeatButton.Template> |
||||
|
<ControlTemplate> |
||||
|
<Border Name="FocusTarget" |
||||
|
Background="Transparent" |
||||
|
Margin="0,-10" /> |
||||
|
</ControlTemplate> |
||||
|
</RepeatButton.Template> |
||||
|
</RepeatButton> |
||||
|
</Track.IncreaseButton> |
||||
|
<Thumb Name="ColorSliderThumb" |
||||
|
Theme="{StaticResource ColorSliderThumbTheme}" |
||||
|
Margin="0" |
||||
|
Padding="0" |
||||
|
DataContext="{TemplateBinding Value}" |
||||
|
Height="{TemplateBinding Width}" |
||||
|
Width="{TemplateBinding Width}" /> |
||||
|
</Track> |
||||
|
</Grid> |
||||
|
</Border> |
||||
|
</ControlTemplate> |
||||
|
</Setter> |
||||
|
</Style> |
||||
|
|
||||
|
<!-- Selector/Thumb Color --> |
||||
|
<Style Selector="^:pointerover /template/ Thumb#ColorSliderThumb"> |
||||
|
<Setter Property="Opacity" Value="0.75" /> |
||||
|
</Style> |
||||
|
<Style Selector="^:pointerover:dark-selector /template/ Thumb#ColorSliderThumb"> |
||||
|
<Setter Property="Opacity" Value="0.7" /> |
||||
|
</Style> |
||||
|
<Style Selector="^:pointerover:light-selector /template/ Thumb#ColorSliderThumb"> |
||||
|
<Setter Property="Opacity" Value="0.8" /> |
||||
|
</Style> |
||||
|
|
||||
|
<Style Selector="^:dark-selector /template/ Thumb#ColorSliderThumb"> |
||||
|
<Setter Property="BorderBrush" Value="Black" /> |
||||
|
</Style> |
||||
|
<Style Selector="^:light-selector /template/ Thumb#ColorSliderThumb"> |
||||
|
<Setter Property="BorderBrush" Value="White" /> |
||||
|
</Style> |
||||
|
|
||||
|
</ControlTheme> |
||||
|
|
||||
|
</ResourceDictionary> |
||||
@ -0,0 +1,50 @@ |
|||||
|
<Styles xmlns="https://github.com/avaloniaui" |
||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
||||
|
xmlns:converters="using:Avalonia.Controls.Converters"> |
||||
|
|
||||
|
<Styles.Resources> |
||||
|
<ResourceDictionary> |
||||
|
|
||||
|
<!-- Shared Resources --> |
||||
|
<VisualBrush x:Key="ColorControlCheckeredBackgroundBrush" |
||||
|
TileMode="Tile" |
||||
|
Stretch="Uniform" |
||||
|
DestinationRect="0,0,8,8"> |
||||
|
<VisualBrush.Visual> |
||||
|
<DrawingPresenter Width="8" |
||||
|
Height="8"> |
||||
|
<DrawingGroup> |
||||
|
<GeometryDrawing Geometry="M0,0 L2,0 2,2, 0,2Z" |
||||
|
Brush="Transparent" /> |
||||
|
<GeometryDrawing Geometry="M0,1 L2,1 2,2, 1,2 1,0 0,0Z" |
||||
|
Brush="#19808080" /> |
||||
|
</DrawingGroup> |
||||
|
</DrawingPresenter> |
||||
|
</VisualBrush.Visual> |
||||
|
</VisualBrush> |
||||
|
|
||||
|
<!-- Shared Converters --> |
||||
|
<converters:EnumToBoolConverter x:Key="EnumToBoolConverter" /> |
||||
|
<converters:ToBrushConverter x:Key="ToBrushConverter" /> |
||||
|
<converters:CornerRadiusFilterConverter x:Key="LeftCornerRadiusFilterConverter" Filter="TopLeft, BottomLeft"/> |
||||
|
<converters:CornerRadiusFilterConverter x:Key="RightCornerRadiusFilterConverter" Filter="TopRight, BottomRight"/> |
||||
|
<converters:CornerRadiusFilterConverter x:Key="TopCornerRadiusFilterConverter" Filter="TopLeft, TopRight"/> |
||||
|
<converters:CornerRadiusFilterConverter x:Key="BottomCornerRadiusFilterConverter" Filter="BottomLeft, BottomRight"/> |
||||
|
<converters:CornerRadiusToDoubleConverter x:Key="TopLeftCornerRadiusConverter" Corner="TopLeft" /> |
||||
|
<converters:CornerRadiusToDoubleConverter x:Key="BottomRightCornerRadiusConverter" Corner="BottomRight" /> |
||||
|
|
||||
|
<ResourceDictionary.MergedDictionaries> |
||||
|
|
||||
|
<!-- Primitives --> |
||||
|
<ResourceInclude Source="avares://Avalonia.Controls.ColorPicker/Themes/Simple/ColorPreviewer.xaml" /> |
||||
|
<ResourceInclude Source="avares://Avalonia.Controls.ColorPicker/Themes/Simple/ColorSlider.xaml" /> |
||||
|
<ResourceInclude Source="avares://Avalonia.Controls.ColorPicker/Themes/Simple/ColorSpectrum.xaml" /> |
||||
|
|
||||
|
<!-- Controls --> |
||||
|
<!-- Note the ColorPicker and ColorView are currently unsupported in the simple theme --> |
||||
|
<!-- These controls depend on fluent styles for TabControl, Button, TextBox, etc. --> |
||||
|
|
||||
|
</ResourceDictionary.MergedDictionaries> |
||||
|
</ResourceDictionary> |
||||
|
</Styles.Resources> |
||||
|
</Styles> |
||||
@ -1,75 +0,0 @@ |
|||||
<Styles x:Class="Avalonia.Themes.Default.DefaultTheme" |
|
||||
xmlns="https://github.com/avaloniaui" |
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> |
|
||||
<Styles.Resources> |
|
||||
<ResourceDictionary> |
|
||||
<ResourceDictionary.MergedDictionaries> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/Button.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/RadioButton.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/Expander.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/RepeatButton.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/ToggleSwitch.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/ButtonSpinner.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/ToggleButton.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/DropDownButton.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/PathIcon.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/CheckBox.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/ToolTip.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/Label.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/ComboBoxItem.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/ComboBox.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/Window.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/Carousel.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/CaptionButtons.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/TitleBar.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/TextBox.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/AutoCompleteBox.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/DataValidationErrors.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/ContentControl.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/FlyoutPresenter.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/MenuFlyoutPresenter.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/GridSplitter.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/ItemsControl.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/ListBoxItem.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/ListBox.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/ScrollBar.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/ScrollViewer.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/TabStrip.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/TabStripItem.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/TabControl.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/TabItem.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/PopupRoot.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/OverlayPopupHost.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/WindowNotificationManager.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/EmbeddableControlRoot.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/TransitioningContentControl.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/TreeView.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/TreeViewItem.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/ProgressBar.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/Separator.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/Menu.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/MenuItem.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/ContextMenu.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/CalendarButton.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/CalendarDayButton.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/CalendarItem.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/Calendar.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/CalendarDatePicker.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/Slider.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/NotificationCard.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/NativeMenuBar.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/NumericUpDown.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/DateTimePickerShared.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/DatePicker.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/TimePicker.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/SplitView.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/ManagedFileChooser.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/SplitButton.xaml" /> |
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Default/Controls/RichTextBlock.xaml" /> |
|
||||
</ResourceDictionary.MergedDictionaries> |
|
||||
</ResourceDictionary> |
|
||||
</Styles.Resources> |
|
||||
|
|
||||
<StyleInclude Source="avares://Avalonia.Themes.Default/Controls/FocusAdorner.xaml" /> |
|
||||
<StyleInclude Source="avares://Avalonia.Themes.Default/Controls/UserControl.xaml" /> |
|
||||
</Styles> |
|
||||
@ -1,11 +0,0 @@ |
|||||
using Avalonia.Styling; |
|
||||
|
|
||||
namespace Avalonia.Themes.Default |
|
||||
{ |
|
||||
/// <summary>
|
|
||||
/// The default Avalonia theme.
|
|
||||
/// </summary>
|
|
||||
public class DefaultTheme : Styles |
|
||||
{ |
|
||||
} |
|
||||
} |
|
||||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue