Skip to content

Commit 67052d1

Browse files
Merge pull request #65 from WPFDevelopersOrg/dev
dev pull request master
2 parents 9315160 + 4d3fe43 commit 67052d1

33 files changed

+1106
-225
lines changed

src/WPFDevelopers.Net40/Themes/Generic.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<Setter Property="Foreground" Value="{DynamicResource WD.RegularTextSolidColorBrush}" />
1111
<Setter Property="Background" Value="{DynamicResource WD.BackgroundSolidColorBrush}" />
1212
<Setter Property="BorderBrush" Value="{DynamicResource WD.PrimaryNormalSolidColorBrush}" />
13+
<Setter Property="TitleBackground" Value="{DynamicResource WD.PrimaryNormalSolidColorBrush}" />
1314
<Setter Property="IsTabStop" Value="False" />
1415
<Setter Property="BorderThickness" Value="1" />
1516
<Setter Property="SnapsToDevicePixels" Value="True" />

src/WPFDevelopers.Net40/Themes/Theme.xaml

Lines changed: 70 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -749,6 +749,7 @@
749749
<Setter Property="Foreground" Value="{DynamicResource WD.RegularTextSolidColorBrush}" />
750750
<Setter Property="Background" Value="{DynamicResource WD.BackgroundSolidColorBrush}" />
751751
<Setter Property="BorderBrush" Value="{DynamicResource WD.PrimaryNormalSolidColorBrush}" />
752+
<Setter Property="TitleBackground" Value="{DynamicResource WD.PrimaryNormalSolidColorBrush}" />
752753
<Setter Property="IsTabStop" Value="False" />
753754
<Setter Property="BorderThickness" Value="1" />
754755
<Setter Property="SnapsToDevicePixels" Value="True" />
@@ -1814,10 +1815,10 @@
18141815
</ControlTemplate.Resources>
18151816
<Border x:Name="PART_Border" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{Binding Path=(helpers:ElementHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" SnapsToDevicePixels="True">
18161817
<controls:SmallPanel>
1817-
<ToggleButton x:Name="PART_ToggleButton" Background="{TemplateBinding Background}" ClickMode="Press" Focusable="False" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{x:Null}" Template="{StaticResource WD.ComboBoxToggleButton}" />
18181818
<ContentPresenter x:Name="ContentSite" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding SelectionBoxItem}" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" IsHitTestVisible="False" />
18191819
<TextBox x:Name="PART_EditableTextBox" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Background="{TemplateBinding Background}" Focusable="True" Foreground="{DynamicResource WD.PrimaryTextSolidColorBrush}" IsReadOnly="{TemplateBinding IsReadOnly}" SelectionBrush="{DynamicResource WD.WindowBorderBrushSolidColorBrush}" Style="{x:Null}" Template="{StaticResource WD.ComboBoxTextBox}" Visibility="Hidden" />
18201820
<TextBlock x:Name="PART_Watermark" Margin="{TemplateBinding Padding}" Padding="1,0" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Background="Transparent" FontSize="{StaticResource WD.NormalFontSize}" Foreground="{DynamicResource WD.RegularTextSolidColorBrush}" Text="{Binding Path=(helpers:ElementHelper.Watermark), RelativeSource={RelativeSource TemplatedParent}}" TextTrimming="CharacterEllipsis" Visibility="Collapsed" />
1821+
<ToggleButton x:Name="PART_ToggleButton" Background="{TemplateBinding Background}" ClickMode="Press" Focusable="False" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{x:Null}" Template="{StaticResource WD.ComboBoxToggleButton}" />
18211822
<Popup x:Name="PART_Popup" MinWidth="{TemplateBinding FrameworkElement.ActualWidth}" MaxHeight="{TemplateBinding ComboBox.MaxDropDownHeight}" AllowsTransparency="True" Focusable="False" IsOpen="{TemplateBinding IsDropDownOpen}" Placement="Bottom" StaysOpen="False">
18221823
<controls:SmallPanel x:Name="PART_DropDown" MinWidth="{TemplateBinding FrameworkElement.ActualWidth}" MaxHeight="{TemplateBinding ComboBox.MaxDropDownHeight}" Margin="24,2,24,24" RenderTransformOrigin=".5,0" SnapsToDevicePixels="True">
18231824
<controls:SmallPanel.RenderTransform>
@@ -6176,7 +6177,7 @@
61766177
<RepeatButton x:Name="PART_NumericUp" Grid.Row="0" Margin="0,1,1,0" Padding="0" Command="{x:Static controls:NumericBox.IncreaseCommand}" Delay="{TemplateBinding Delay}" IsTabStop="False" Style="{StaticResource WD.DefaultRepeatButton}">
61776178
<controls:PathIcon Kind="ChevronUp" Style="{StaticResource WD.MiniPathIcon}" />
61786179
</RepeatButton>
6179-
<RepeatButton x:Name="PART_NumericDown" Grid.Row="2" Margin="0,0,1,1" Padding="0" Command="{x:Static controls:NumericBox.DecreaseCommand}" Delay="{TemplateBinding Delay}" IsTabStop="False">
6180+
<RepeatButton x:Name="PART_NumericDown" Grid.Row="2" Margin="0,0,1,1" Padding="0" Command="{x:Static controls:NumericBox.DecreaseCommand}" Delay="{TemplateBinding Delay}" IsTabStop="False" Style="{StaticResource WD.DefaultRepeatButton}">
61806181
<controls:PathIcon Kind="ChevronDown" Style="{StaticResource WD.MiniPathIcon}" />
61816182
</RepeatButton>
61826183
</Grid>
@@ -6354,7 +6355,7 @@
63546355
</UniformGrid>
63556356
<UniformGrid Grid.Column="1" Rows="1" Visibility="{Binding ColorType, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource WD.ColorTypeToVisibilityConverter}, ConverterParameter={x:Static controls:ColorTypeEnum.HSL}}">
63566357
<StackPanel>
6357-
<TextBox helpers:TextBoxHelper.AllowOnlyNumericInput="True" helpers:TextBoxHelper.IsEnterUpdateEnabled="True" helpers:TextBoxHelper.SelectAllOnClick="True" Style="{StaticResource WD.TextBoxColorPicker}" Text="{Binding SelectedColor, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource WD.HToColorConverter}}" />
6358+
<TextBox helpers:TextBoxHelper.AllowOnlyNumericInput="True" helpers:TextBoxHelper.IsEnterUpdateEnabled="True" helpers:TextBoxHelper.MaxValue="360" helpers:TextBoxHelper.MinValue="0" helpers:TextBoxHelper.SelectAllOnClick="True" Style="{StaticResource WD.TextBoxColorPicker}" Text="{Binding SelectedColor, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource WD.HToColorConverter}}" />
63586359
<TextBlock Text="H" />
63596360
</StackPanel>
63606361
<StackPanel Grid.Column="1">
@@ -6378,6 +6379,72 @@
63786379
</Setter>
63796380
</Style>
63806381
<Style BasedOn="{StaticResource WD.ColorPicker}" TargetType="{x:Type controls:ColorPicker}" />
6382+
<Style x:Key="WD.IPEditBox" BasedOn="{StaticResource WD.ControlBasicStyle}" TargetType="{x:Type controls:IPEditBox}">
6383+
<Setter Property="BorderThickness" Value="1" />
6384+
<Setter Property="BorderBrush" Value="{DynamicResource WD.BaseSolidColorBrush}" />
6385+
<Setter Property="Background" Value="{DynamicResource WD.BackgroundSolidColorBrush}" />
6386+
<Setter Property="VerticalContentAlignment" Value="Center" />
6387+
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
6388+
<Setter Property="Padding" Value="{StaticResource WD.DefaultPadding}" />
6389+
<Setter Property="Template">
6390+
<Setter.Value>
6391+
<ControlTemplate TargetType="{x:Type controls:IPEditBox}">
6392+
<ControlTemplate.Resources>
6393+
<Style BasedOn="{StaticResource WD.DefaultTextBox}" TargetType="{x:Type TextBox}">
6394+
<Setter Property="BorderThickness" Value="0" />
6395+
<Setter Property="helpers:TextBoxHelper.AllowOnlyNumericInput" Value="True" />
6396+
<Setter Property="helpers:TextBoxHelper.MaxValue" Value="255" />
6397+
<Setter Property="helpers:TextBoxHelper.MinValue" Value="0" />
6398+
<Setter Property="VerticalContentAlignment" Value="Center" />
6399+
<Setter Property="HorizontalContentAlignment" Value="Center" />
6400+
</Style>
6401+
<Style TargetType="TextBlock">
6402+
<Setter Property="Text" Value="." />
6403+
<Setter Property="VerticalAlignment" Value="Center" />
6404+
</Style>
6405+
</ControlTemplate.Resources>
6406+
<Border x:Name="PART_Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{Binding Path=(helpers:ElementHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" UseLayoutRounding="{TemplateBinding UseLayoutRounding}">
6407+
<ScrollViewer HorizontalScrollBarVisibility="Auto">
6408+
<Grid>
6409+
<Grid.ColumnDefinitions>
6410+
<ColumnDefinition />
6411+
<ColumnDefinition Width="Auto" />
6412+
<ColumnDefinition />
6413+
<ColumnDefinition Width="Auto" />
6414+
<ColumnDefinition />
6415+
<ColumnDefinition Width="Auto" />
6416+
<ColumnDefinition />
6417+
</Grid.ColumnDefinitions>
6418+
<TextBox x:Name="PART_TextBox1" />
6419+
<TextBlock Grid.Column="1" />
6420+
<TextBox x:Name="PART_TextBox2" Grid.Column="2" />
6421+
<TextBlock Grid.Column="3" />
6422+
<TextBox x:Name="PART_TextBox3" Grid.Column="4" />
6423+
<TextBlock Grid.Column="5" />
6424+
<TextBox x:Name="PART_TextBox4" Grid.Column="6" />
6425+
</Grid>
6426+
</ScrollViewer>
6427+
</Border>
6428+
<ControlTemplate.Triggers>
6429+
<Trigger Property="IsKeyboardFocused" Value="True">
6430+
<Setter Property="BorderBrush" Value="{DynamicResource WD.PrimaryNormalSolidColorBrush}" />
6431+
</Trigger>
6432+
<Trigger Property="IsMouseOver" Value="True">
6433+
<Setter Property="BorderBrush" Value="{DynamicResource WD.PrimaryNormalSolidColorBrush}" />
6434+
</Trigger>
6435+
<MultiTrigger>
6436+
<MultiTrigger.Conditions>
6437+
<Condition Property="IsKeyboardFocused" Value="True" />
6438+
<Condition Property="IsMouseOver" Value="False" />
6439+
</MultiTrigger.Conditions>
6440+
<Setter Property="BorderBrush" Value="{DynamicResource WD.PrimaryNormalSolidColorBrush}" />
6441+
</MultiTrigger>
6442+
</ControlTemplate.Triggers>
6443+
</ControlTemplate>
6444+
</Setter.Value>
6445+
</Setter>
6446+
</Style>
6447+
<Style BasedOn="{StaticResource WD.IPEditBox}" TargetType="{x:Type controls:IPEditBox}" />
63816448
<Style x:Key="WD.DatePickerCalendarStyle" BasedOn="{StaticResource {x:Type Calendar}}" TargetType="{x:Type Calendar}" />
63826449
<Style x:Key="WD.DefaultDatePicker" BasedOn="{StaticResource WD.ControlBasicStyle}" TargetType="{x:Type DatePicker}">
63836450
<Setter Property="IsTodayHighlighted" Value="True" />

src/WPFDevelopers.Net40/Window.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public class Window : System.Windows.Window
2323
DependencyProperty.Register("TitleBar", typeof(object), typeof(Window), new PropertyMetadata(null));
2424

2525
public static readonly DependencyProperty TitleBackgroundProperty =
26-
DependencyProperty.Register("TitleBackground", typeof(Brush), typeof(Window), new PropertyMetadata(ControlsHelper.PrimaryNormalBrush));
26+
DependencyProperty.Register("TitleBackground", typeof(Brush), typeof(Window), new PropertyMetadata(null));
2727

2828
static Window()
2929
{

src/WPFDevelopers.Net45x/Themes/Generic.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<Setter Property="Foreground" Value="{DynamicResource WD.RegularTextSolidColorBrush}" />
1313
<Setter Property="Background" Value="{DynamicResource WD.BackgroundSolidColorBrush}" />
1414
<Setter Property="BorderBrush" Value="{DynamicResource WD.PrimaryNormalSolidColorBrush}" />
15+
<Setter Property="TitleBackground" Value="{DynamicResource WD.PrimaryNormalSolidColorBrush}" />
1516
<Setter Property="BorderThickness" Value="1" />
1617
<Setter Property="IsTabStop" Value="False" />
1718
<Setter Property="SnapsToDevicePixels" Value="True" />

0 commit comments

Comments
 (0)