Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<Setter Property="FontWeight" Value="Medium" />
<Setter Property="Foreground" Value="{DynamicResource MaterialDesign.Brush.Foreground}" />
<Setter Property="Height" Value="56" />
<Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
<Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}, FallbackValue=Left}" />
<Setter Property="Margin" Value="0" />
<Setter Property="Padding" Value="8" />
<Setter Property="SnapsToDevicePixels" Value="True" />
Expand Down Expand Up @@ -130,7 +130,7 @@
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
<Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}, FallbackValue=Center}" />
<Setter Property="Width" Value="360" />
<Setter Property="wpf:NavigationDrawerAssist.CornerRadius" Value="26" />
<Setter Property="wpf:NavigationDrawerAssist.IconSize" Value="24" />
Expand All @@ -145,5 +145,4 @@
<Setter Property="Background" Value="{DynamicResource MaterialDesign.Brush.Primary.Light}" />
<Setter Property="wpf:ThemeAssist.TriggerBrush" Value="{DynamicResource MaterialDesign.Brush.Background}" />
</Style>

</ResourceDictionary>
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@
</Trigger>
<!-- TODO
<Trigger Property="IsFocused" Value="True">
<Setter Property="BorderBrush" TargetName="normal" Value="{Binding (Custom:ControlsHelper.FocusBorderBrush), RelativeSource={RelativeSource TemplatedParent}}"/>
<Setter Property="BorderBrush" TargetName="normal" Value="{Binding (Custom:ControlsHelper.FocusBorderBrush), RelativeSource={RelativeSource TemplatedParent}}" />
</Trigger>
-->
</ControlTemplate.Triggers>
Expand Down Expand Up @@ -653,7 +653,7 @@
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}" />
<Setter Property="Foreground" Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type FrameworkElement}}, Path=(TextElement.Foreground)}" />
<Setter Property="Foreground" Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type FrameworkElement}}, Path=(TextElement.Foreground), FallbackValue=Black}" />
<Setter Property="Height" Value="37" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="Padding" Value="1" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
CornerRadius="{Binding Path=(wpf:ButtonAssist.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
Effect="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(wpf:ElevationAssist.Elevation), Converter={x:Static converters:ShadowConverter.Instance}}" />
<ProgressBar x:Name="ProgressBar"
Width="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ButtonBase}}, Path=ActualWidth}"
Width="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ButtonBase}}, Path=ActualWidth, FallbackValue={x:Static system:Double.NaN}}"
Height="{TemplateBinding Height}"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Expand Down Expand Up @@ -183,7 +183,7 @@
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{Binding Path=(wpf:ButtonAssist.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
<ProgressBar x:Name="ProgressBar"
Width="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ButtonBase}}, Path=ActualWidth}"
Width="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ButtonBase}}, Path=ActualWidth, FallbackValue={x:Static system:Double.NaN}}"
Height="{TemplateBinding Height}"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Expand Down Expand Up @@ -341,7 +341,7 @@
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{Binding Path=(wpf:ButtonAssist.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" />
<ProgressBar x:Name="ProgressBar"
Width="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ButtonBase}}, Path=ActualWidth}"
Width="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ButtonBase}}, Path=ActualWidth, FallbackValue={x:Static system:Double.NaN}}"
Height="{TemplateBinding Height}"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Expand Down Expand Up @@ -386,7 +386,6 @@
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="border" Property="Background" Value="{Binding Foreground, RelativeSource={RelativeSource Mode=TemplatedParent}, Converter={x:Static converters:BrushOpacityConverter.Instance}, ConverterParameter=0.16}" />

</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Opacity" Value="0.38" />
Expand Down Expand Up @@ -474,8 +473,8 @@
<Style x:Key="MaterialDesignToolForegroundButton"
TargetType="{x:Type ButtonBase}"
BasedOn="{StaticResource MaterialDesignToolButton}">
<Setter Property="Foreground" Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type FrameworkElement}}, Path=(TextElement.Foreground)}" />
<Setter Property="wpf:RippleAssist.Feedback" Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type FrameworkElement}}, Path=(TextElement.Foreground)}" />
<Setter Property="Foreground" Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type FrameworkElement}}, Path=(TextElement.Foreground), FallbackValue=Black}" />
<Setter Property="wpf:RippleAssist.Feedback" Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type FrameworkElement}}, Path=(TextElement.Foreground), FallbackValue=Black}" />
</Style>

<!--#endregion-->
Expand Down Expand Up @@ -760,8 +759,8 @@
<Style x:Key="MaterialDesignIconForegroundButton"
TargetType="{x:Type ButtonBase}"
BasedOn="{StaticResource MaterialDesignIconButton}">
<Setter Property="Foreground" Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type FrameworkElement}}, Path=(TextElement.Foreground)}" />
<Setter Property="wpf:RippleAssist.Feedback" Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type FrameworkElement}}, Path=(TextElement.Foreground)}" />
<Setter Property="Foreground" Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type FrameworkElement}}, Path=(TextElement.Foreground), FallbackValue=Black}" />
<Setter Property="wpf:RippleAssist.Feedback" Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type FrameworkElement}}, Path=(TextElement.Foreground), FallbackValue=Black}" />
</Style>

<!--#endregion-->
Expand Down Expand Up @@ -864,5 +863,4 @@
</Style>

<!--#endregion-->

</ResourceDictionary>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="clr-namespace:MaterialDesignThemes.Wpf.Converters"
xmlns:globalization="clr-namespace:System.Globalization;assembly=mscorlib"
xmlns:controls="clr-namespace:System.Windows.Controls;assembly=PresentationFramework"
xmlns:system="clr-namespace:System;assembly=mscorlib"
xmlns:wpf="clr-namespace:MaterialDesignThemes.Wpf">

<Style x:Key="MaterialDesignCalendarButton" TargetType="{x:Type CalendarButton}">
Expand Down Expand Up @@ -142,7 +144,7 @@
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="HasSelectedDays" Value="False">
<Setter TargetName="NormalText" Property="TextElement.Foreground" Value="{Binding Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Calendar}}}" />
<Setter TargetName="NormalText" Property="TextElement.Foreground" Value="{Binding Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Calendar}}, FallbackValue=Black}" />
</Trigger>
<Trigger Property="IsInactive" Value="True">
<Setter TargetName="NormalText" Property="Opacity" Value="0.56" />
Expand Down Expand Up @@ -301,7 +303,7 @@
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsSelected" Value="False">
<Setter TargetName="NormalText" Property="TextElement.Foreground" Value="{Binding Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Calendar}}}" />
<Setter TargetName="NormalText" Property="TextElement.Foreground" Value="{Binding Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Calendar}}, FallbackValue=Black}" />
</Trigger>
<Trigger Property="IsInactive" Value="True">
<Setter TargetName="NormalText" Property="Opacity" Value="0.56" />
Expand All @@ -315,7 +317,7 @@
</Setter>
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="MinWidth" Value="28" />
<Setter Property="MinHeight" Value="{Binding ActualWidth, RelativeSource={RelativeSource Self}}"/>
<Setter Property="MinHeight" Value="{Binding ActualWidth, RelativeSource={RelativeSource Self}}" />
<Setter Property="wpf:CalendarAssist.SelectionColor" Value="{DynamicResource MaterialDesign.Brush.Primary}" />
<Setter Property="wpf:CalendarAssist.SelectionForegroundColor" Value="{DynamicResource MaterialDesign.Brush.Primary.Foreground}" />
<Style.Triggers>
Expand Down Expand Up @@ -439,8 +441,8 @@
IsEnabled="{TemplateBinding IsEnabled}">
<wpf:MaterialDateDisplay.DisplayDate>
<MultiBinding Mode="OneWay" Converter="{x:Static converters:CalendarDateCoalesceConverter.Instance}">
<Binding Path="DisplayDate" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type Calendar}}" />
<Binding Path="SelectedDate" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type Calendar}}" />
<Binding Path="DisplayDate" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type Calendar}}" FallbackValue="{x:Static system:DateTime.Today}" />
<Binding Path="SelectedDate" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type Calendar}}" FallbackValue="{x:Null}" />
</MultiBinding>
</wpf:MaterialDateDisplay.DisplayDate>
</wpf:MaterialDateDisplay>
Expand Down Expand Up @@ -492,8 +494,8 @@
RenderTransformOrigin="0, 0.5">
<TextBlock.Text>
<MultiBinding Converter="{x:Static converters:CalendarYearMonthConverter.Instance}">
<Binding Path="DisplayDate" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type Calendar}}" />
<Binding Path="Language" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type Calendar}}" />
<Binding Path="DisplayDate" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type Calendar}}" FallbackValue="{x:Static system:DateTime.Today}" />
<Binding Path="Language" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type Calendar}}" FallbackValue="{x:Static x:XmlLanguage.Empty}" />
</MultiBinding>
</TextBlock.Text>
<TextBlock.RenderTransform>
Expand Down Expand Up @@ -617,11 +619,11 @@
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="PART_DisabledVisual" Property="Visibility" Value="Visible" />
</Trigger>
<DataTrigger Binding="{Binding DisplayMode, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Calendar}}}" Value="Year">
<DataTrigger Binding="{Binding DisplayMode, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Calendar}}, FallbackValue={x:Static controls:CalendarMode.Month}}" Value="Year">
<Setter TargetName="MonthViewWrapperGrid" Property="Visibility" Value="Hidden" />
<Setter TargetName="YearViewWrapperGrid" Property="Visibility" Value="Visible" />
</DataTrigger>
<DataTrigger Binding="{Binding DisplayMode, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Calendar}}}" Value="Decade">
<DataTrigger Binding="{Binding DisplayMode, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Calendar}}, FallbackValue={x:Static controls:CalendarMode.Month}}" Value="Decade">
<Setter TargetName="MonthViewWrapperGrid" Property="Visibility" Value="Hidden" />
<Setter TargetName="YearViewWrapperGrid" Property="Visibility" Value="Visible" />
</DataTrigger>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,12 @@
<Setter Property="Foreground" Value="{DynamicResource MaterialDesign.Brush.Secondary.Foreground}" />
</Style>


<Style x:Key="MaterialDesignCheckBox" TargetType="{x:Type CheckBox}">
<Setter Property="Background" Value="{DynamicResource MaterialDesign.Brush.Primary}" />
<Setter Property="BorderBrush" Value="{DynamicResource MaterialDesign.Brush.Primary}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}" />
<Setter Property="Foreground" Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type FrameworkElement}}, Path=(TextElement.Foreground)}" />
<Setter Property="Foreground" Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type FrameworkElement}}, Path=(TextElement.Foreground), FallbackValue=Black}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type CheckBox}">
Expand Down Expand Up @@ -204,7 +203,7 @@
<Style x:Key="MaterialDesignUserForegroundCheckBox" TargetType="{x:Type CheckBox}">
<Setter Property="BorderThickness" Value="1" />
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}" />
<Setter Property="Foreground" Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type FrameworkElement}}, Path=(TextElement.Foreground)}" />
<Setter Property="Foreground" Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type FrameworkElement}}, Path=(TextElement.Foreground), FallbackValue=Black}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type CheckBox}">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="clr-namespace:MaterialDesignThemes.Wpf.Converters"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:system="clr-namespace:System;assembly=mscorlib"
xmlns:wpf="clr-namespace:MaterialDesignThemes.Wpf">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Slider.xaml" />
Expand Down Expand Up @@ -177,12 +177,12 @@
<Binding Path="Value" RelativeSource="{RelativeSource TemplatedParent}" />
<Binding>
<Binding.Source>
<sys:Double>1</sys:Double>
<system:Double>1</system:Double>
</Binding.Source>
</Binding>
<Binding>
<Binding.Source>
<sys:Double>1</sys:Double>
<system:Double>1</system:Double>
</Binding.Source>
</Binding>
</MultiBinding>
Expand Down Expand Up @@ -241,12 +241,12 @@
<Binding Path="Value" RelativeSource="{RelativeSource TemplatedParent}" />
<Binding>
<Binding.Source>
<sys:Double>1</sys:Double>
<system:Double>1</system:Double>
</Binding.Source>
</Binding>
<Binding>
<Binding.Source>
<sys:Double>1</sys:Double>
<system:Double>1</system:Double>
</Binding.Source>
</Binding>
</MultiBinding>
Expand Down
Loading
Loading