Skip to content

Commit 84126ec

Browse files
Merge pull request #119 from WPFDevelopersOrg/dev
dev pull request master
2 parents a0676c9 + e806180 commit 84126ec

File tree

105 files changed

+3524
-15129
lines changed

Some content is hidden

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

105 files changed

+3524
-15129
lines changed

Diff for: README-zh.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
### [ Wiki→ 正在进行快速更新](https://gitee.com/WPFDevelopersOrg/WPFDevelopers/wikis/pages)
2828

29-
### 此项目包含了 微信公众号 《 WPF开发者》 日常开发分享,欢迎<kbd>Star🌟</kbd>。
29+
### 此项目包含了 微信公众号 《 WPF开发者》 日常开发分享,欢迎<kbd>Star</kbd>。
3030

3131
### 运行环境 Visual Studio 2022
3232

Diff for: src/WPFDevelopers.Net40/Themes/Theme.xaml

-6,703
Large diffs are not rendered by default.

Diff for: src/WPFDevelopers.Net40/WPFDevelopers.Net40.csproj

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
<PropertyGroup>
44
<TargetFramework>net40</TargetFramework>
55
<SignAssembly>True</SignAssembly>
6-
<AssemblyOriginatorKeyFile>E:\Code\git\WPFDevelopers\WPFDevelopersMultiple\WPFDevelopers.snk</AssemblyOriginatorKeyFile>
76
</PropertyGroup>
87
<Import Project="..\WPFDevelopers.Shared\WPFDevelopers.Shared.projitems" Label="Shared" />
98
<Import Project="..\Microsoft.Windows.Shell\Microsoft.Windows.Shell.projitems" Label="Shared" />

Diff for: src/WPFDevelopers.Net45x/Themes/Theme.xaml

+1-6,704
Large diffs are not rendered by default.

Diff for: src/WPFDevelopers.Net45x/WPFDevelopers.Net45x.csproj

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
<PropertyGroup>
55
<UseWindowsForms>true</UseWindowsForms>
66
<SignAssembly>True</SignAssembly>
7-
<AssemblyOriginatorKeyFile>E:\Code\git\WPFDevelopers\WPFDevelopersMultiple\WPFDevelopers.snk</AssemblyOriginatorKeyFile>
87
</PropertyGroup>
98
<Import Project="..\WPFDevelopers.Shared\WPFDevelopers.Shared.projitems" Label="Shared" />
109
<Import Project="..\Microsoft.Windows.Shell\Microsoft.Windows.Shell.projitems" Label="Shared" />

Diff for: src/WPFDevelopers.Samples.Shared/App.xaml

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
<ResourceDictionary Source="pack://application:,,,/WPFDevelopers.Samples;component/Controls/TransformLayout/TransformLayout.xaml" />
3232
<ResourceDictionary Source="pack://application:,,,/WPFDevelopers.Samples;component/ExampleViews/DrapView/Controls/TransformThumb.xaml" />
3333
<ResourceDictionary Source="pack://application:,,,/WPFDevelopers.Samples;component/Controls/NavigateMenu/NavigateMenu.xaml" />
34+
<ResourceDictionary Source="pack://application:,,,/WPFDevelopers.Samples;component/Controls/Loadings/StreamerLoading.xaml" />
3435
</ResourceDictionary.MergedDictionaries>
3536
<Style TargetType="avalonedit:TextEditor">
3637
<Setter Property="Foreground" Value="{DynamicResource WD.PrimaryTextSolidColorBrush}" />

Diff for: src/WPFDevelopers.Shared/Controls/Loadings/StreamerLoading.cs renamed to src/WPFDevelopers.Samples.Shared/Controls/Loadings/StreamerLoading.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System.Windows;
22
using System.Windows.Controls;
33

4-
namespace WPFDevelopers.Controls
4+
namespace WPFDevelopers.Samples.Controls
55
{
66
public class StreamerLoading : Control
77
{
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
<ResourceDictionary
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:controls="clr-namespace:WPFDevelopers.Samples.Controls"
5+
xmlns:wd="https://github.com/WPFDevelopersOrg/WPFDevelopers">
6+
<Style
7+
x:Key="WD.StreamerLoading"
8+
BasedOn="{StaticResource WD.ControlBasicStyle}"
9+
TargetType="{x:Type controls:StreamerLoading}">
10+
<Setter Property="Width" Value="100" />
11+
<Setter Property="Height" Value="100" />
12+
<Setter Property="HorizontalAlignment" Value="Center" />
13+
<Setter Property="VerticalAlignment" Value="Center" />
14+
<Setter Property="Background">
15+
<Setter.Value>
16+
<SolidColorBrush Color="{DynamicResource WD.PrimaryNormalColor}" />
17+
</Setter.Value>
18+
</Setter>
19+
<Setter Property="Template">
20+
<Setter.Value>
21+
<ControlTemplate TargetType="{x:Type controls:StreamerLoading}">
22+
<Rectangle
23+
x:Name="PART_Rectangle"
24+
Width="{TemplateBinding Width}"
25+
Height="{TemplateBinding Height}"
26+
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
27+
VerticalAlignment="{TemplateBinding VerticalAlignment}"
28+
CacheMode="BitmapCache"
29+
StrokeThickness="3">
30+
<Rectangle.Stroke>
31+
<LinearGradientBrush Opacity=".6" StartPoint="0.5,0" EndPoint="0.5,1">
32+
<GradientStop Offset="0" Color="Transparent" />
33+
<GradientStop Offset="1" Color="{Binding Path=Background.Color, RelativeSource={RelativeSource TemplatedParent}}" />
34+
</LinearGradientBrush>
35+
</Rectangle.Stroke>
36+
</Rectangle>
37+
<ControlTemplate.Triggers>
38+
<Trigger Property="IsVisible" Value="True">
39+
<Trigger.EnterActions>
40+
<BeginStoryboard>
41+
<Storyboard DesiredFrameRate="30" RepeatBehavior="Forever">
42+
<PointAnimationUsingKeyFrames Storyboard.TargetName="PART_Rectangle" Storyboard.TargetProperty="(Shape.Stroke).(LinearGradientBrush.StartPoint)">
43+
<EasingPointKeyFrame KeyTime="0:0:0.5" Value="0.855,0.148" />
44+
<EasingPointKeyFrame KeyTime="0:0:1" Value="0.852,0.855" />
45+
<EasingPointKeyFrame KeyTime="0:0:1.5" Value="0.148,0.855" />
46+
<EasingPointKeyFrame KeyTime="0:0:2" Value="0.144,0.149" />
47+
<EasingPointKeyFrame KeyTime="0:0:2.5" Value="0,0" />
48+
</PointAnimationUsingKeyFrames>
49+
<PointAnimationUsingKeyFrames Storyboard.TargetName="PART_Rectangle" Storyboard.TargetProperty="(Shape.Stroke).(LinearGradientBrush.EndPoint)">
50+
<EasingPointKeyFrame KeyTime="0:0:0.5" Value="0.145,0.852" />
51+
<EasingPointKeyFrame KeyTime="0:0:1" Value="0.148,0.145" />
52+
<EasingPointKeyFrame KeyTime="0:0:1.5" Value="0.852,0.145" />
53+
<EasingPointKeyFrame KeyTime="0:0:2" Value="0.856,0.851" />
54+
<EasingPointKeyFrame KeyTime="0:0:2.5" Value="0,1" />
55+
</PointAnimationUsingKeyFrames>
56+
</Storyboard>
57+
</BeginStoryboard>
58+
</Trigger.EnterActions>
59+
</Trigger>
60+
</ControlTemplate.Triggers>
61+
</ControlTemplate>
62+
</Setter.Value>
63+
</Setter>
64+
</Style>
65+
<Style BasedOn="{StaticResource WD.StreamerLoading}" TargetType="{x:Type controls:StreamerLoading}" />
66+
</ResourceDictionary>
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,65 @@
1-
<UserControl x:Class="WPFDevelopers.Samples.ExampleViews.AnimationAudioExample"
2-
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3-
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4-
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
5-
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6-
xmlns:local="clr-namespace:WPFDevelopers.Samples.ExampleViews"
7-
xmlns:wd="https://github.com/WPFDevelopersOrg/WPFDevelopers"
8-
xmlns:controls="clr-namespace:WPFDevelopers.Samples.Controls"
9-
mc:Ignorable="d"
10-
d:DesignHeight="450" d:DesignWidth="800">
1+
<UserControl
2+
x:Class="WPFDevelopers.Samples.ExampleViews.AnimationAudioExample"
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">
1113
<controls:CodeViewer>
12-
<UniformGrid Columns="2" x:Name="MyUniformGrid">
13-
<StackPanel Orientation="Horizontal">
14-
<wd:BreathLamp Width="60" Height="60" LampEffect="Ripple" IsLampStart="true"
15-
VerticalAlignment="Center" HorizontalAlignment="Left"
16-
Margin="10,0">
17-
<Ellipse>
18-
<Ellipse.Fill>
19-
<ImageBrush ImageSource="pack://application:,,,/WPFDevelopers.Samples;component/Resources/Images/Breathe/0.jpg"/>
20-
</Ellipse.Fill>
21-
</Ellipse>
22-
</wd:BreathLamp>
23-
<wd:AnimationAudio x:Name="AnimationAudioLeft" MouseDown="AnimationAudioLeft_MouseDown"/>
24-
</StackPanel>
25-
<StackPanel Orientation="Horizontal"
26-
HorizontalAlignment="Right">
27-
<wd:AnimationAudio x:Name="AnimationAudioRight" IsRight ="true"
28-
Background="{DynamicResource WD.SuccessSolidColorBrush}"
29-
Foreground="Black"
30-
MouseDown="AnimationAudioLeft_MouseDown"/>
31-
<wd:BreathLamp Width="60" Height="60" LampEffect="Streamer" IsLampStart="True"
32-
VerticalAlignment="Center" HorizontalAlignment="Left"
33-
GradientStopColor1="#FF00cec9" GradientStopColor2="#2000cec9"
34-
Margin="10,0">
35-
<Ellipse>
36-
<Ellipse.Fill>
37-
<ImageBrush ImageSource="pack://application:,,,/WPFDevelopers.Samples;component/Resources/Images/Chat/UserImages/yanjinhua.png"/>
38-
</Ellipse.Fill>
39-
</Ellipse>
40-
</wd:BreathLamp>
41-
</StackPanel>
14+
<UniformGrid x:Name="MyUniformGrid" Columns="2">
15+
<StackPanel Orientation="Horizontal">
16+
<wd:BreathLamp
17+
Width="60"
18+
Height="60"
19+
Margin="10,0"
20+
HorizontalAlignment="Left"
21+
VerticalAlignment="Center"
22+
IsLampStart="true"
23+
LampEffect="Ripple">
24+
<Ellipse>
25+
<Ellipse.Fill>
26+
<ImageBrush ImageSource="pack://application:,,,/WPFDevelopers.Samples;component/Resources/Images/Breathe/0.jpg" />
27+
</Ellipse.Fill>
28+
</Ellipse>
29+
</wd:BreathLamp>
30+
<wd:AnimationAudio
31+
x:Name="AnimationAudioLeft"
32+
wd:ElementHelper.CornerRadius="4"
33+
MouseDown="AnimationAudioLeft_MouseDown" />
34+
</StackPanel>
35+
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
36+
<wd:AnimationAudio
37+
x:Name="AnimationAudioRight"
38+
Background="{DynamicResource WD.SuccessSolidColorBrush}"
39+
Foreground="Black"
40+
IsRight="true"
41+
MouseDown="AnimationAudioLeft_MouseDown" />
42+
<wd:BreathLamp
43+
Width="60"
44+
Height="60"
45+
Margin="10,0"
46+
HorizontalAlignment="Left"
47+
VerticalAlignment="Center"
48+
GradientStopColor1="#FF00cec9"
49+
GradientStopColor2="#2000cec9"
50+
IsLampStart="True"
51+
LampEffect="Streamer">
52+
<Ellipse>
53+
<Ellipse.Fill>
54+
<ImageBrush ImageSource="pack://application:,,,/WPFDevelopers.Samples;component/Resources/Images/Chat/UserImages/yanjinhua.png" />
55+
</Ellipse.Fill>
56+
</Ellipse>
57+
</wd:BreathLamp>
58+
</StackPanel>
4259
</UniformGrid>
4360
<controls:CodeViewer.SourceCodes>
44-
<controls:SourceCodeModel
45-
CodeSource="/WPFDevelopers.SamplesCode;component/ExampleViews/AnimationAudioExample.xaml"
46-
CodeType="Xaml"/>
47-
<controls:SourceCodeModel
48-
CodeSource="/WPFDevelopers.SamplesCode;component/ExampleViews/AnimationAudioExample.xaml.cs"
49-
CodeType="CSharp"/>
61+
<controls:SourceCodeModel CodeSource="/WPFDevelopers.SamplesCode;component/ExampleViews/AnimationAudioExample.xaml" CodeType="Xaml" />
62+
<controls:SourceCodeModel CodeSource="/WPFDevelopers.SamplesCode;component/ExampleViews/AnimationAudioExample.xaml.cs" CodeType="CSharp" />
5063
</controls:CodeViewer.SourceCodes>
5164
</controls:CodeViewer>
5265
</UserControl>

Diff for: src/WPFDevelopers.Samples.Shared/ExampleViews/BadgeExample.xaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@
2020
x:Name="MyBadgeToggleButton"
2121
Margin="10"
2222
HorizontalAlignment="Center"
23-
Content="显示Badge" />
23+
Content="显示Badge"
24+
IsChecked="True" />
2425
<UniformGrid
2526
Grid.Row="1"
2627
HorizontalAlignment="Center"
28+
wd:PanelHelper.Spacing="10"
2729
Rows="1">
2830
<Button
2931
Width="100"
@@ -33,12 +35,11 @@
3335
Style="{DynamicResource WD.PrimaryButton}" />
3436
<Button
3537
Width="100"
36-
Margin="10,0"
3738
wd:Badge.FontSize="12"
3839
wd:Badge.IsShow="{Binding ElementName=MyBadgeToggleButton, Path=IsChecked}"
39-
wd:Badge.Text="{Binding Text,RelativeSource={RelativeSource AncestorType=UserControl}}"
40+
wd:Badge.Text="{Binding Text, RelativeSource={RelativeSource AncestorType=UserControl}}"
41+
Click="myButton_Click"
4042
Content="Success"
41-
Click="myButton_Click"
4243
Style="{DynamicResource WD.SuccessDefaultButton}" />
4344
<Button
4445
Width="100"
@@ -49,7 +50,6 @@
4950
Style="{DynamicResource WD.WarningDefaultButton}" />
5051
<Button
5152
Width="100"
52-
Margin="10,0"
5353
wd:Badge.IsShow="{Binding ElementName=MyBadgeToggleButton, Path=IsChecked}"
5454
wd:Badge.Text="NEW"
5555
Content="Danger"

Diff for: src/WPFDevelopers.Samples.Shared/ExampleViews/BasicControlsExample.xaml

+8-10
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,16 @@
3939
Padding="0,10"
4040
FontSize="20"
4141
Foreground="{DynamicResource WD.PrimaryNormalSolidColorBrush}">
42-
<Hyperlink NavigateUri="https://github.com/yanjinhuagood/WPFDevelopers.Minimal.git" RequestNavigate="GithubHyperlink_RequestNavigate">Github 源码</Hyperlink>
42+
<Hyperlink NavigateUri="https://github.com/WPFDevelopersOrg/WPFDevelopers" RequestNavigate="GithubHyperlink_RequestNavigate">Github 源码</Hyperlink>
4343
<Run />
4444
<Run />
4545
<Run />
46-
<Hyperlink NavigateUri="https://gitee.com/WPFDevelopersOrg/WPFDevelopers.Minimal.git" RequestNavigate="GiteeHyperlink_RequestNavigate">码云源码</Hyperlink>
46+
<Hyperlink NavigateUri="https://gitee.com/WPFDevelopersOrg/WPFDevelopers" RequestNavigate="GiteeHyperlink_RequestNavigate">码云源码</Hyperlink>
4747
<Run />
4848
<Run />
4949
<Run />
50-
<Hyperlink NavigateUri="https://gitee.com/yanjinhua/WPFDevelopers.git" RequestNavigate="QQHyperlink_RequestNavigate">加入QQ群:458041663</Hyperlink>
50+
<Hyperlink NavigateUri="https://gitee.com/WPFDevelopersOrg/WPFDevelopers" RequestNavigate="QQHyperlink_RequestNavigate">加入QQ群:458041663</Hyperlink>
51+
<Hyperlink>、340500857、929469013</Hyperlink>
5152
</TextBlock>
5253
</StackPanel>
5354

@@ -56,7 +57,7 @@
5657
Margin="0,20,0,0"
5758
FontSize="20"
5859
Text="Theme" />
59-
<wd:ThemeControl Margin="0,10" ItemsSource="{Binding ThemesCollection, RelativeSource={RelativeSource AncestorType=UserControl}, Mode=OneWayToSource}" />
60+
<wd:Theme Margin="0,10" ItemsSource="{Binding ThemesCollection, RelativeSource={RelativeSource AncestorType=UserControl}, Mode=OneWayToSource}" />
6061
<TextBlock
6162
Margin="0,20,0,0"
6263
FontSize="20"
@@ -120,6 +121,7 @@
120121
Margin="0,10"
121122
Rows="1">
122123
<Button
124+
wd:ElementHelper.CornerRadius="3"
123125
Click="Button_Click"
124126
Content="ToolWindow"
125127
Style="{DynamicResource WD.PrimaryButton}" />
@@ -138,12 +140,14 @@
138140
Margin="0,10"
139141
Rows="1">
140142
<Button
143+
wd:ElementHelper.CornerRadius="3"
141144
Click="Loading_Click"
142145
Content="Loading"
143146
Style="{DynamicResource WD.PrimaryButton}" />
144147
<Button
145148
Name="btnLoadingTask"
146149
Margin="10,0"
150+
wd:ElementHelper.CornerRadius="3"
147151
Click="LoadingTask_Click"
148152
Content="LoadingTask"
149153
Style="{DynamicResource WD.SuccessPrimaryButton}" />
@@ -756,12 +760,6 @@
756760
Margin="0,10"
757761
Columns="2"
758762
Rows="2">
759-
<UniformGrid.Resources>
760-
<Style TargetType="{x:Type Rectangle}">
761-
<Setter Property="Width" Value="{x:Static SystemParameters.PrimaryScreenWidth}" />
762-
<Setter Property="Height" Value="400" />
763-
</Style>
764-
</UniformGrid.Resources>
765763
<TabControl Margin="4" wd:ElementHelper.CornerRadius="3">
766764
<TabItem Padding="10" Header="TabItem1">
767765
<Rectangle Fill="{DynamicResource WD.DangerSolidColorBrush}" />

Diff for: src/WPFDevelopers.Samples.Shared/ExampleViews/BasicControlsExample.xaml.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ private void MainView_Loaded(object sender, RoutedEventArgs e)
9494

9595
private void btnInformation_Click(object sender, RoutedEventArgs e)
9696
{
97-
MessageBox.Show("文件删除成功。", "消息", MessageBoxButton.OK, MessageBoxImage.Information);
97+
MessageBox.Show("文件删除成功。", "消息", MessageBoxButton.OK, MessageBoxImage.Information, buttonRadius: 4);
9898
}
9999

100100
private void btnWarning_Click(object sender, RoutedEventArgs e)
@@ -109,7 +109,7 @@ private void btnError_Click(object sender, RoutedEventArgs e)
109109

110110
private void btnQuestion_Click(object sender, RoutedEventArgs e)
111111
{
112-
MessageBox.Show("当前文件不存在,是否继续?", "询问", MessageBoxButton.OKCancel, MessageBoxImage.Question);
112+
MessageBox.Show("当前文件不存在,是否继续?", "询问", MessageBoxButton.OKCancel, MessageBoxImage.Question, buttonRadius: 4);
113113
}
114114

115115
private void GithubHyperlink_RequestNavigate(object sender, RequestNavigateEventArgs e)

0 commit comments

Comments
 (0)