Skip to content

Commit dab5cdb

Browse files
Merge pull request #62 from WPFDevelopersOrg/dev
master pull request dev
2 parents d033b41 + cbb102c commit dab5cdb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1777
-191
lines changed

src/WPFDevelopers.Net40/Themes/Generic.xaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
<Setter.Value>
2828
<ControlTemplate TargetType="{x:Type wd:Window}">
2929
<Border
30+
Name="PART_Border"
3031
Background="{TemplateBinding Background}"
3132
BorderBrush="{TemplateBinding BorderBrush}"
3233
BorderThickness="{TemplateBinding BorderThickness}"
@@ -161,7 +162,7 @@
161162
<Trigger Property="WindowState" Value="Maximized">
162163
<Setter TargetName="PART_RestoreButton" Property="Visibility" Value="Visible" />
163164
<Setter TargetName="PART_MaximizeButton" Property="Visibility" Value="Collapsed" />
164-
<Setter TargetName="LayoutRoot" Property="Margin" Value="7" />
165+
<Setter TargetName="PART_Border" Property="Margin" Value="7" />
165166
</Trigger>
166167
<Trigger Property="WindowStyle" Value="ToolWindow">
167168
<Setter TargetName="PART_MinAndMax" Property="Visibility" Value="Collapsed" />

src/WPFDevelopers.Net40/Themes/Theme.xaml

Lines changed: 245 additions & 42 deletions
Large diffs are not rendered by default.

src/WPFDevelopers.Net45x/Themes/Generic.xaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
<Setter.Value>
3434
<ControlTemplate TargetType="{x:Type wd:Window}">
3535
<Border
36+
Name="PART_Border"
3637
Background="{TemplateBinding Background}"
3738
BorderBrush="{TemplateBinding BorderBrush}"
3839
BorderThickness="{TemplateBinding BorderThickness}"
@@ -167,7 +168,7 @@
167168
<Trigger Property="WindowState" Value="Maximized">
168169
<Setter TargetName="PART_RestoreButton" Property="Visibility" Value="Visible" />
169170
<Setter TargetName="PART_MaximizeButton" Property="Visibility" Value="Collapsed" />
170-
<Setter TargetName="LayoutRoot" Property="Margin" Value="7" />
171+
<Setter TargetName="PART_Border" Property="Margin" Value="7" />
171172
</Trigger>
172173
<Trigger Property="WindowStyle" Value="ToolWindow">
173174
<Setter TargetName="PART_MinAndMax" Property="Visibility" Value="Collapsed" />

src/WPFDevelopers.Net45x/Themes/Theme.xaml

Lines changed: 245 additions & 42 deletions
Large diffs are not rendered by default.

src/WPFDevelopers.Samples.Shared/App.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<!-- 需要注意ws:Resources 必须再配色主题后,Theme="Dark" 为黑色皮肤 -->
1414
<wd:Resources Theme="Light" />
1515
<ResourceDictionary Source="pack://application:,,,/WPFDevelopers;component/Themes/Theme.xaml" />
16+
<!-- 下方不用拷贝 -->
1617
<ResourceDictionary Source="pack://application:,,,/WPFDevelopers.Samples;component/ExampleViews/LoginWindow/Generic.xaml" />
1718
<ResourceDictionary Source="pack://application:,,,/WPFDevelopers.Samples;component/Controls/CodeViewer/CodeViewer.xaml" />
1819
<ResourceDictionary Source="pack://application:,,,/WPFDevelopers.Samples;component/Controls/TimeLine/TimeLine.xaml" />
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<UserControl
2+
x:Class="WPFDevelopers.Samples.ExampleViews.ColorPickerExample"
3+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5+
xmlns:controls="clr-namespace:WPFDevelopers.Samples.Controls"
6+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
7+
xmlns:local="clr-namespace:WPFDevelopers.Samples.ExampleViews"
8+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
9+
xmlns:wd="https://github.com/WPFDevelopersOrg/WPFDevelopers"
10+
d:DesignHeight="450"
11+
d:DesignWidth="800"
12+
mc:Ignorable="d">
13+
<controls:CodeViewer>
14+
<wd:ColorPicker />
15+
<controls:CodeViewer.SourceCodes>
16+
<controls:SourceCodeModel CodeSource="/WPFDevelopers.SamplesCode;component/ExampleViews/ColorPickerExample.xaml" CodeType="Xaml" />
17+
<controls:SourceCodeModel CodeSource="/WPFDevelopers.SamplesCode;component/ExampleViews/ColorPickerExample.xaml.cs" CodeType="CSharp" />
18+
</controls:CodeViewer.SourceCodes>
19+
</controls:CodeViewer>
20+
</UserControl>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
using System.Windows.Controls;
2+
3+
namespace WPFDevelopers.Samples.ExampleViews
4+
{
5+
/// <summary>
6+
/// BarrageExample.xaml 的交互逻辑
7+
/// </summary>
8+
public partial class ColorPickerExample : UserControl
9+
{
10+
public ColorPickerExample()
11+
{
12+
InitializeComponent();
13+
}
14+
}
15+
}

src/WPFDevelopers.Samples.Shared/ExampleViews/NumericBoxExample.xaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@
1717
Rows="1">
1818
<wd:NumericBox
1919
Width="100"
20+
Height="30"
2021
Maximum="100"
2122
Minimum="0" />
2223
<wd:NumericBox
2324
Width="100"
25+
Height="40"
2426
Margin="10,0"
2527
Maximum="1000"
2628
Minimum="100"

src/WPFDevelopers.Samples.Shared/Helpers/MenuEnum.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ public enum MenuEnum
7676
Message,
7777
PathIcon,
7878
NumericBox,
79+
ColorPicker,
7980
VirtualizingWrapPanel,
8081
AcrylicBlur,
8182
TaskbarInfo

src/WPFDevelopers.Samples.Shared/ViewModels/MainVM.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,9 @@ void MenuItemSelection(string _menuName)
306306
case MenuEnum.NumericBox:
307307
ControlPanel = new NumericBoxExample();
308308
break;
309+
case MenuEnum.ColorPicker:
310+
ControlPanel = new ColorPickerExample();
311+
break;
309312
case MenuEnum.VirtualizingWrapPanel:
310313
ControlPanel = new VirtualizingWrapPanel();
311314
new VirtualizingWrapPanelExample().MaskShowDialog();

0 commit comments

Comments
 (0)