Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #36

Merged
merged 35 commits into from
May 27, 2023
Merged

Dev #36

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
edbe035
Update BaseControl.cs
yanjinhuagood May 17, 2023
2447fc9
Update BreadCrumbBar.xaml
yanjinhuagood May 17, 2023
fd80e8a
Update ControlsHelper.cs
yanjinhuagood May 17, 2023
de1b3eb
Update NormalLoading.cs
yanjinhuagood May 17, 2023
73d306d
Update Loading.cs
yanjinhuagood May 17, 2023
17d41aa
Update BasicControlsExample.xaml
yanjinhuagood May 17, 2023
f145c35
Update Theme.xaml
yanjinhuagood May 17, 2023
f6b70aa
Update Theme.xaml
yanjinhuagood May 17, 2023
302238b
Delete the following ChatEmoji, CountdownTimer, CutImage, Dashboard, …
yanjinhuagood May 27, 2023
669e01e
Modify the example usage of the following controls ChatEmoji, Countdo…
yanjinhuagood May 27, 2023
5f20b07
Update Styles.ContextMenu.xaml
yanjinhuagood May 27, 2023
4437ca8
Update Styles.ListBox.xaml
yanjinhuagood May 27, 2023
a5ba23e
Update Styles.DataGrid.xaml
yanjinhuagood May 27, 2023
caea7f3
Update Styles.ListView.xaml
yanjinhuagood May 27, 2023
e0fa398
Update Styles.Menu.xaml
yanjinhuagood May 27, 2023
b2d039c
Update IndexToColor.cs
yanjinhuagood May 27, 2023
c7c0e41
Update Theme45x.txt
yanjinhuagood May 27, 2023
76b665a
Update Step.xaml
yanjinhuagood May 27, 2023
47ca43d
Update Theme40.txt
yanjinhuagood May 27, 2023
5496ad9
Update CircularMenu.xaml
yanjinhuagood May 27, 2023
9630fc2
Update Colors.xaml
yanjinhuagood May 27, 2023
dce421d
Update WPFDevelopers.Shared.projitems
yanjinhuagood May 27, 2023
dae86a3
Update Styles.TreeView.xaml
yanjinhuagood May 27, 2023
b0f3177
update win32Api
yanjinhuagood May 27, 2023
12ef89e
Update WindowAcrylicBlur.cs
yanjinhuagood May 27, 2023
820a62a
Delete ScrollViewerAnimation.cs
yanjinhuagood May 27, 2023
957d77c
Update ScreenCut.cs
yanjinhuagood May 27, 2023
9478c45
Create Ruler.cs
yanjinhuagood May 27, 2023
61c104c
Update RadarChart.cs
yanjinhuagood May 27, 2023
f7d7584
Update Kernel32Interop.cs
yanjinhuagood May 27, 2023
19521b5
Update CircularMenu.cs
yanjinhuagood May 27, 2023
d845539
Update BasicBarChart.cs
yanjinhuagood May 27, 2023
dd18b04
Update Window.cs
yanjinhuagood May 27, 2023
c8acd12
Update Window.cs
yanjinhuagood May 27, 2023
44aa624
update theme
yanjinhuagood May 27, 2023
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
727 changes: 27 additions & 700 deletions src/WPFDevelopers.Net40/Themes/Theme.xaml

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/WPFDevelopers.Net40/Window.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Windows.Input;
using System.Windows.Interop;
using Microsoft.Windows.Shell;
using WPFDevelopers.Helpers;

namespace WPFDevelopers.Net40
{
Expand Down Expand Up @@ -104,7 +105,7 @@ internal class ApiCodes

private IntPtr hWnd;

[DllImport("user32.dll")]
[DllImport(Win32.User32)]
public static extern int SendMessage(IntPtr hWnd, int wMsg, IntPtr wParam, IntPtr lParam);

private IntPtr WindowProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)
Expand Down
727 changes: 27 additions & 700 deletions src/WPFDevelopers.Net45x/Themes/Theme.xaml

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/WPFDevelopers.Net45x/Window.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Windows;
using System.Windows.Input;
using System.Windows.Interop;
using WPFDevelopers.Helpers;

namespace WPFDevelopers.Net45x
{
Expand Down Expand Up @@ -104,7 +105,7 @@ internal class ApiCodes

private IntPtr hWnd;

[DllImport("user32.dll")]
[DllImport(Win32.User32)]
public static extern int SendMessage(IntPtr hWnd, int wMsg, IntPtr wParam, IntPtr lParam);

private IntPtr WindowProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)
Expand Down
41 changes: 27 additions & 14 deletions src/WPFDevelopers.Samples.Shared/App.xaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,35 @@
<Application x:Class="WPFDevelopers.Samples.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ws="https://github.com/WPFDevelopersOrg/WPFDevelopers"
xmlns:avalonedit="http://icsharpcode.net/sharpdevelop/avalonedit"
StartupUri="ExampleViews\MainWindow.xaml" ShutdownMode="OnMainWindowClose">
<Application
x:Class="WPFDevelopers.Samples.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:avalonedit="http://icsharpcode.net/sharpdevelop/avalonedit"
xmlns:wd="https://github.com/WPFDevelopersOrg/WPFDevelopers"
ShutdownMode="OnMainWindowClose"
StartupUri="ExampleViews\MainWindow.xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/WPFDevelopers;component/Themes/Light.Blue.xaml"/>
<!--需要注意ws:Resources 必须再配色主题后,Theme="Dark" 为黑色皮肤-->
<ws:Resources Theme="Light"/>
<ResourceDictionary Source="pack://application:,,,/WPFDevelopers;component/Themes/Theme.xaml"/>
<ResourceDictionary Source="pack://application:,,,/WPFDevelopers.Samples;component/ExampleViews/LoginWindow/Generic.xaml"/>
<ResourceDictionary Source="pack://application:,,,/WPFDevelopers.Samples;component/Controls/CodeViewer/CodeViewer.xaml"/>
<ResourceDictionary Source="pack://application:,,,/WPFDevelopers;component/Themes/Light.Blue.xaml" />
<!-- 需要注意ws:Resources 必须再配色主题后,Theme="Dark" 为黑色皮肤 -->
<wd:Resources Theme="Light" />
<ResourceDictionary Source="pack://application:,,,/WPFDevelopers;component/Themes/Theme.xaml" />
<ResourceDictionary Source="pack://application:,,,/WPFDevelopers.Samples;component/ExampleViews/LoginWindow/Generic.xaml" />
<ResourceDictionary Source="pack://application:,,,/WPFDevelopers.Samples;component/Controls/CodeViewer/CodeViewer.xaml" />
<ResourceDictionary Source="pack://application:,,,/WPFDevelopers.Samples;component/Controls/TimeLine/TimeLine.xaml" />
<ResourceDictionary Source="pack://application:,,,/WPFDevelopers.Samples;component/Controls/Drawing/Drawing.xaml" />
<ResourceDictionary Source="pack://application:,,,/WPFDevelopers.Samples;component/Controls/Others/OtherControl.xaml" />
<ResourceDictionary Source="pack://application:,,,/WPFDevelopers.Samples;component/Controls/ChatEmoji/ChatEmoji.xaml" />
<ResourceDictionary Source="pack://application:,,,/WPFDevelopers.Samples;component/Controls/RoundPicker/RoundPicker.xaml" />
<ResourceDictionary Source="pack://application:,,,/WPFDevelopers.Samples;component/Controls/CutImage/CutImage.xaml" />
<ResourceDictionary Source="pack://application:,,,/WPFDevelopers.Samples;component/Controls/Dashboard/Dashboard.xaml" />
<ResourceDictionary Source="pack://application:,,,/WPFDevelopers.Samples;component/Controls/PieControl/PieControl.xaml" />
<ResourceDictionary Source="pack://application:,,,/WPFDevelopers.Samples;component/Controls/Prize/PrizeItemControl.xaml" />
<ResourceDictionary Source="pack://application:,,,/WPFDevelopers.Samples;component/Controls/RainbowButtons/RainbowButtons.xaml" />
<ResourceDictionary Source="pack://application:,,,/WPFDevelopers.Samples;component/Controls/SnowCanvas/SnowCanvas.xaml" />
</ResourceDictionary.MergedDictionaries>
<Style TargetType="avalonedit:TextEditor">
<Setter Property="Foreground" Value="{DynamicResource WD.PrimaryTextSolidColorBrush}"/>
<Setter Property="Background" Value="{DynamicResource WD.BackgroundSolidColorBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource WD.PrimaryTextSolidColorBrush}" />
<Setter Property="Background" Value="{DynamicResource WD.BackgroundSolidColorBrush}" />
</Style>
</ResourceDictionary>
</Application.Resources>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.Windows.Media;
using WPFDevelopers.Helpers;

namespace WPFDevelopers.Controls
namespace WPFDevelopers.Samples.Controls
{
[TemplatePart(Name = TextBlockTemplateName, Type = typeof(TextBlock))]
[TemplatePart(Name = WrapPanelLeftTemplateName, Type = typeof(WrapPanel))]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:WPFDevelopers.Controls">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Basic/ControlBasic.xaml" />
</ResourceDictionary.MergedDictionaries>
xmlns:controls="clr-namespace:WPFDevelopers.Samples.Controls"
xmlns:wd="https://github.com/WPFDevelopersOrg/WPFDevelopers">
<Style
x:Key="WD.ChatEmoji"
BasedOn="{StaticResource WD.ControlBasicStyle}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using System.Windows.Media;
using System.Windows.Media.Imaging;

namespace WPFDevelopers.Controls
namespace WPFDevelopers.Samples.Controls
{
public class EmojiHelper
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using System.Windows.Media.Animation;
using System.Windows.Media.Effects;

namespace WPFDevelopers.Controls
namespace WPFDevelopers.Samples.Controls
{
public enum CountdownTimerEffect
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace WPFDevelopers.Controls
namespace WPFDevelopers.Samples.Controls
{
[TemplatePart(Name = DragDropTemplateName, Type = typeof(DragDrop))]
[TemplatePart(Name = RectangleTemplateName, Type = typeof(Rectangle))]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:WPFDevelopers.Controls">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Basic/ControlBasic.xaml" />
<ResourceDictionary Source="Basic/Animations.xaml" />
</ResourceDictionary.MergedDictionaries>
xmlns:controls="clr-namespace:WPFDevelopers.Samples.Controls"
xmlns:wd="https://github.com/WPFDevelopersOrg/WPFDevelopers">
<Style
x:Key="WD.BottomThumbStyle"
BasedOn="{StaticResource WD.ControlBasicStyle}"
Expand Down Expand Up @@ -58,7 +55,7 @@
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type controls:CutImage}">
<controls:SmallPanel>
<wd:SmallPanel>
<Border x:Name="PART_BorderPanel">
<Canvas
x:Name="DrawCanvas"
Expand Down Expand Up @@ -106,7 +103,7 @@
Visibility="Collapsed" />
</Canvas>
</Border>
</controls:SmallPanel>
</wd:SmallPanel>
</ControlTemplate>
</Setter.Value>
</Setter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.Windows.Controls;
using System.Windows.Controls.Primitives;

namespace WPFDevelopers.Controls
namespace WPFDevelopers.Samples.Controls
{
[TemplatePart(Name = ThumbTemplateName, Type = typeof(Thumb))]
[TemplatePart(Name = ThumbRightBottomTemplateName, Type = typeof(Thumb))]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.Windows.Controls;
using System.Windows.Media;

namespace WPFDevelopers.Controls
namespace WPFDevelopers.Samples.Controls
{
public class Dashboard : ProgressBar
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:WPFDevelopers.Controls"
xmlns:ec="clr-namespace:Microsoft.Expression.Controls"
xmlns:ed="clr-namespace:Microsoft.Expression.Drawing.Shapes">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Basic/ControlBasic.xaml" />
</ResourceDictionary.MergedDictionaries>
xmlns:controls="clr-namespace:WPFDevelopers.Samples.Controls"
xmlns:ec="http://www.microsoft.net/controls"
xmlns:ed="http://www.microsoft.net/drawing"
xmlns:wd="https://github.com/WPFDevelopersOrg/WPFDevelopers">

<LinearGradientBrush x:Key="WD.DashboardNormalBrush" StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Color="#FF164DA7" />
<GradientStop Offset="1" Color="#FF19DCF0" />
Expand All @@ -23,16 +22,16 @@
<Setter.Value>
<ControlTemplate TargetType="{x:Type controls:Dashboard}">
<Viewbox>
<controls:SmallPanel
<wd:SmallPanel
Width="{TemplateBinding Width}"
Height="{TemplateBinding Height}"
Background="{TemplateBinding Background}"
RenderTransformOrigin="0.5,0.5">
<controls:SmallPanel.RenderTransform>
<wd:SmallPanel.RenderTransform>
<TransformGroup>
<RotateTransform Angle="-90" />
</TransformGroup>
</controls:SmallPanel.RenderTransform>
</wd:SmallPanel.RenderTransform>
<ed:Arc
Margin="10"
ArcThickness="8"
Expand Down Expand Up @@ -91,7 +90,7 @@
Foreground="{StaticResource WD.DashboardNormalBrush}"
Text="{Binding Path=Value, StringFormat={}{0}%, RelativeSource={RelativeSource TemplatedParent}}" />
</Border>
</controls:SmallPanel>
</wd:SmallPanel>
</Viewbox>
</ControlTemplate>
</Setter.Value>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Windows.Media;
using WPFDevelopers.Helpers;

namespace WPFDevelopers.Controls
namespace WPFDevelopers.Samples.Controls
{
public class ScaleItem : ViewModelBase
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:WPFDevelopers.Controls">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Basic/ControlBasic.xaml" />
</ResourceDictionary.MergedDictionaries>
xmlns:controls="clr-namespace:WPFDevelopers.Samples.Controls"
xmlns:wd="https://github.com/WPFDevelopersOrg/WPFDevelopers">
<Style
x:Key="WD.DrawingControlItem"
BasedOn="{StaticResource WD.ControlBasicStyle}"
Expand Down Expand Up @@ -71,7 +69,7 @@
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
SnapsToDevicePixels="true">
<controls:SmallPanel>
<wd:SmallPanel>
<ScrollViewer Padding="{TemplateBinding Padding}" Focusable="false">
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</ScrollViewer>
Expand All @@ -86,7 +84,7 @@
CornerRadius="{TemplateBinding InnerCornerRadius}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
</Border>
</controls:SmallPanel>
</wd:SmallPanel>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="false">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@
using System.Windows.Controls;
using System.Windows.Media;

namespace WPFDevelopers.Controls
namespace WPFDevelopers.Samples.Controls
{
[TemplatePart(Name = _PartInnerName, Type = typeof(Border))]
//[TemplatePart(Name = _PartDrawingPanelName, Type=typeof(DrawingPanel))]
//[StyleTypedProperty(Property = "ItemContainerStyle", StyleTargetType = typeof(DrawingElement))]
public class DrawingControl : ListBox
{
private const string _PartInnerName = "PART_InnerBorder";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using WPFDevelopers.Assists;
using WPFDevelopers.Utilities;

namespace WPFDevelopers.Controls
namespace WPFDevelopers.Samples.Controls
{
public enum DrawingMode
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
using System.Windows;
using System.Windows.Controls;

namespace WPFDevelopers.Controls
namespace WPFDevelopers.Samples.Controls
{
public class FireControl : Control
{
// Using a DependencyProperty as the backing store for IsStart. This enables animation, styling, binding, etc...
public static readonly DependencyProperty IsStartProperty =
DependencyProperty.Register("IsStart", typeof(bool), typeof(FireControl),
new PropertyMetadata(default(bool)));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:WPFDevelopers.Controls">
xmlns:controls="clr-namespace:WPFDevelopers.Samples.Controls"
xmlns:wd="https://github.com/WPFDevelopersOrg/WPFDevelopers">
<Style
x:Key="WD.FireControl"
BasedOn="{StaticResource WD.ControlBasicStyle}"
Expand Down Expand Up @@ -34,18 +35,18 @@
</Storyboard>
</ControlTemplate.Resources>
<Viewbox>
<controls:SmallPanel
<wd:SmallPanel
x:Name="PART_Container"
Width="50"
Height="50"
RenderTransformOrigin="0,1">
<controls:SmallPanel.RenderTransform>
<wd:SmallPanel.RenderTransform>
<TransformGroup>
<RotateTransform CenterX="25" CenterY="25" />
<ScaleTransform />
</TransformGroup>
</controls:SmallPanel.RenderTransform>
<controls:SmallPanel VerticalAlignment="Bottom">
</wd:SmallPanel.RenderTransform>
<wd:SmallPanel VerticalAlignment="Bottom">
<Path
Height="50"
HorizontalAlignment="Center"
Expand Down Expand Up @@ -105,8 +106,8 @@
Color="LightYellow" />
</Path.Effect>
</Path>
</controls:SmallPanel>
</controls:SmallPanel>
</wd:SmallPanel>
</wd:SmallPanel>
</Viewbox>
<ControlTemplate.Triggers>
<Trigger Property="IsStart" Value="True">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.Windows.Controls;
using System.Windows.Media;

namespace WPFDevelopers.Controls
namespace WPFDevelopers.Samples.Controls
{
public class PieControl : Control
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:WPFDevelopers.Controls"
xmlns:ed="clr-namespace:Microsoft.Expression.Drawing.Shapes">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Basic/ControlBasic.xaml" />
</ResourceDictionary.MergedDictionaries>
xmlns:controls="clr-namespace:WPFDevelopers.Samples.Controls"
xmlns:ed="http://www.microsoft.net/drawing"
xmlns:wd="https://github.com/WPFDevelopersOrg/WPFDevelopers">

<Style
x:Key="WD.PieControl"
BasedOn="{StaticResource WD.ControlBasicStyle}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Windows.Media;
using WPFDevelopers.Helpers;

namespace WPFDevelopers.Controls
namespace WPFDevelopers.Samples.Controls
{
public class PieSegmentModel : ViewModelBase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Windows.Media;
using System.Windows.Media.Animation;

namespace WPFDevelopers.Controls
namespace WPFDevelopers.Samples.Controls
{
[TemplatePart(Name = BorderTemplateName, Type = typeof(Border))]
[TemplatePart(Name = RotateTransformTemplateName, Type = typeof(RotateTransform))]
Expand Down
Loading