-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #239 from JanTamis/3.0_major_update_ControlTheme
Update ControlThemes
- Loading branch information
Showing
19 changed files
with
947 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -188,4 +188,4 @@ | |
</StackPanel> | ||
|
||
</StackPanel> | ||
</UserControl> | ||
</UserControl> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<ResourceDictionary xmlns="https://github.com/avaloniaui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> | ||
<ControlTheme x:Key="{x:Type AutoCompleteBox}" | ||
TargetType="AutoCompleteBox"> | ||
<Setter Property="Background" Value="Transparent" /> | ||
<Setter Property="BorderBrush" Value="{DynamicResource MaterialDesignTextBoxBorder}" /> | ||
<Setter Property="BorderThickness" Value="1" /> | ||
<Setter Property="Padding" Value="4" /> | ||
<Setter Property="Template"> | ||
<ControlTemplate> | ||
<Panel> | ||
<TextBox Name="PART_TextBox" | ||
Background="{TemplateBinding Background}" | ||
BorderBrush="{TemplateBinding BorderBrush}" | ||
BorderThickness="{TemplateBinding BorderThickness}" | ||
Padding="{TemplateBinding Padding}" | ||
Watermark="{TemplateBinding Watermark}" | ||
DataValidationErrors.Errors="{TemplateBinding (DataValidationErrors.Errors)}" /> | ||
|
||
<Popup Name="PART_Popup" | ||
MinWidth="{Binding Bounds.Width, RelativeSource={RelativeSource TemplatedParent}}" | ||
MaxHeight="{TemplateBinding MaxDropDownHeight}" | ||
PlacementTarget="{TemplateBinding}" | ||
IsLightDismissEnabled="True"> | ||
<Border BorderBrush="{DynamicResource MaterialDesignTextAreaBorder}" | ||
BorderThickness="1"> | ||
<ListBox Name="PART_SelectingItemsControl" | ||
BorderThickness="0" | ||
Background="{TemplateBinding Background}" | ||
Foreground="{TemplateBinding Foreground}" | ||
ItemTemplate="{TemplateBinding ItemTemplate}" | ||
ScrollViewer.HorizontalScrollBarVisibility="Auto" | ||
ScrollViewer.VerticalScrollBarVisibility="Auto" /> | ||
</Border> | ||
</Popup> | ||
</Panel> | ||
</ControlTemplate> | ||
</Setter> | ||
</ControlTheme> | ||
</ResourceDictionary> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<ResourceDictionary xmlns="https://github.com/avaloniaui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> | ||
<ControlTheme x:Key="{x:Type Calendar}" | ||
TargetType="Calendar"> | ||
<Setter Property="Background" Value="Transparent" /> | ||
<Setter Property="BorderThickness" Value="0" /> | ||
<Setter Property="HeaderBackground" Value="Transparent" /> | ||
<Setter Property="Template"> | ||
<ControlTemplate> | ||
<Panel Name="PART_Root" ClipToBounds="True"> | ||
<CalendarItem Name="PART_CalendarItem" | ||
Background="{TemplateBinding Background}" | ||
BorderBrush="{TemplateBinding BorderBrush}" | ||
BorderThickness="{TemplateBinding BorderThickness}" | ||
HeaderBackground="{TemplateBinding HeaderBackground}" /> | ||
</Panel> | ||
</ControlTemplate> | ||
</Setter> | ||
|
||
<!-- TODO: multiselect variant --> | ||
<!-- | ||
<Style Selector="Calendar[SelectionMode=MultipleRange] /template/ | ||
CalendarItem /template/ | ||
Grid#MonthView > CalendarDayButton:selected:nth-child(n+2):not(:nth-last-child(1))"> | ||
<Setter Property="CornerRadius" Value="0"/> | ||
<Setter Property="Padding" Value="0,2,0,2"/> | ||
</Style> | ||
<Style Selector="Calendar[SelectionMode=MultipleRange] /template/ | ||
CalendarItem /template/ | ||
Grid#MonthView > CalendarDayButton:selected:nth-last-child(n+1):not(:nth-last-child(n+2))"> | ||
<Setter Property="CornerRadius" Value="0,18,18,0"/> | ||
<Setter Property="Padding" Value="0,2,2,2"/> | ||
</Style>--> | ||
|
||
<Style | ||
Selector="^[SelectionMode=MultipleRange] /template/ | ||
CalendarItem /template/ | ||
Grid#MonthView > CalendarDayButton:selected:nth-child(n+2)"> | ||
<Setter Property="CornerRadius" Value="18,0,0,18" /> | ||
<Setter Property="Padding" Value="2,2,0,2" /> | ||
</Style> | ||
</ControlTheme> | ||
</ResourceDictionary> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<ResourceDictionary xmlns="https://github.com/avaloniaui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> | ||
<ControlTheme x:Key="{x:Type CalendarButton}" | ||
TargetType="CalendarButton"> | ||
<Setter Property="ClickMode" Value="Release" /> | ||
<Setter Property="MinWidth" Value="40" /> | ||
<Setter Property="MinHeight" Value="40" /> | ||
<Setter Property="Foreground" Value="{DynamicResource MaterialDesignBody}" /> | ||
<Setter Property="Background" Value="Transparent" /> | ||
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryHueMidBrush}" /> | ||
<Setter Property="BorderThickness" Value="2" /> | ||
<Setter Property="FontSize" Value="20" /> | ||
<Setter Property="ClipToBounds" Value="False" /> | ||
<Setter Property="HorizontalAlignment" Value="Center" /> | ||
<Setter Property="VerticalAlignment" Value="Center" /> | ||
<Setter Property="HorizontalContentAlignment" Value="Center" /> | ||
<Setter Property="VerticalContentAlignment" Value="Center" /> | ||
<Setter Property="Template"> | ||
<ControlTemplate> | ||
<Panel> | ||
<Border Name="PART_InnerBorder" CornerRadius="2" | ||
Background="{TemplateBinding BorderBrush}" /> | ||
|
||
<Border Name="Root" Background="{TemplateBinding Background}" | ||
BorderThickness="0" ClipToBounds="True"> | ||
<ContentControl Name="Content" | ||
ContentTemplate="{TemplateBinding ContentTemplate}" | ||
Content="{TemplateBinding Content}" | ||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" | ||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" | ||
FontSize="{TemplateBinding FontSize}" | ||
Margin="{TemplateBinding Padding}" /> | ||
</Border> | ||
|
||
<Border Name="PART_Border" CornerRadius="2" | ||
BorderBrush="{TemplateBinding BorderBrush}" /> | ||
</Panel> | ||
</ControlTemplate> | ||
</Setter> | ||
|
||
<Style Selector="^ TextBlock"> | ||
<Setter Property="VerticalAlignment" Value="Center" /> | ||
<Setter Property="HorizontalAlignment" Value="Center" /> | ||
<Setter Property="TextAlignment" Value="Center" /> | ||
</Style> | ||
|
||
<Style Selector="^ /template/ Border#PART_Border"> | ||
<Setter Property="Opacity" Value="0" /> | ||
<Setter Property="BorderThickness" Value="0" /> | ||
</Style> | ||
|
||
<Style Selector="^ /template/ Border#PART_InnerBorder"> | ||
<Setter Property="Opacity" Value="0" /> | ||
</Style> | ||
|
||
<Style Selector="^:pointerover /template/ Border#PART_InnerBorder"> | ||
<Setter Property="Opacity" Value="0.32" /> | ||
</Style> | ||
<Style Selector="^:pressed /template/ Border#PART_InnerBorder"> | ||
<Setter Property="Opacity" Value="1" /> | ||
</Style> | ||
<Style Selector="^:selected /template/ Border#PART_InnerBorder"> | ||
<Setter Property="Opacity" Value="1" /> | ||
</Style> | ||
|
||
<Style Selector="^:inactive /template/ Border#Root"> | ||
<Setter Property="Opacity" Value="0.32" /> | ||
</Style> | ||
|
||
<Style Selector="^:disabled /template/ ContentControl#Content"> | ||
<Setter Property="Opacity" Value="0.32" /> | ||
</Style> | ||
</ControlTheme> | ||
</ResourceDictionary> |
Oops, something went wrong.