Skip to content

Feature/maintenance #157

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

Merged
merged 4 commits into from
Apr 22, 2025
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
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<ItemGroup Label="Code Analyzers">
<PackageReference Include="AsyncFixer" Version="1.6.0" PrivateAssets="All" />
<PackageReference Include="Asyncify" Version="0.9.7" PrivateAssets="All" />
<PackageReference Include="Meziantou.Analyzer" Version="2.0.195" PrivateAssets="All" />
<PackageReference Include="Meziantou.Analyzer" Version="2.0.197" PrivateAssets="All" />
<PackageReference Include="SecurityCodeScan.VS2019" Version="5.6.7" PrivateAssets="All" />
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.507" PrivateAssets="All" />
<PackageReference Include="SonarAnalyzer.CSharp" Version="10.8.0.113526" PrivateAssets="All" />
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ This is a base libraries for building WPF application with the MVVM design patte

| Nuget package | Description | Dependencies |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------|----------------------------------------------|
| [![NuGet Version](https://img.shields.io/nuget/v/Atc.Wpf.svg?label=Atc.Wpf&logo=nuget&style=for-the-badge)](https://www.nuget.org/packages/Atc.Wpf) | Base Controls, ValueConverters, Extensions etc. | Atc |
| [![NuGet Version](https://img.shields.io/nuget/v/Atc.Wpf.Controls.svg?label=Atc.Wpf.Controls&logo=nuget&style=for-the-badge)](https://www.nuget.org/packages/Atc.Wpf.Controls) | Miscellaneous UI Controls | Atc.Wpf & Atc.Wpf.Theming |
| [![NuGet Version](https://img.shields.io/nuget/v/Atc.Wpf.Controls.Sample.svg?label=Atc.Wpf.Controls.Sample&logo=nuget&style=for-the-badge)](https://www.nuget.org/packages/Atc.Wpf.Controls.Sample) | Controls for creating WPF sample apps | Atc.Wpf & Atc.Wpf.Theming & Atc.Wpf.Controls |
| [![NuGet Version](https://img.shields.io/nuget/v/Atc.Wpf.FontIcons.svg?label=Atc.Wpf.FontIcons&logo=nuget&style=for-the-badge)](https://www.nuget.org/packages/Atc.Wpf.FontIcons) | Render Svg and Img resources based on fonts | Atc.Wpf |
| [![NuGet Version](https://img.shields.io/nuget/v/Atc.Wpf.Theming.svg?label=Atc.Wpf.Theming&logo=nuget&style=for-the-badge)](https://www.nuget.org/packages/Atc.Wpf.Theming) | Theming for Light & Dark mode for WPF base controls | Atc.Wpf |
| [![NuGet Version](https://img.shields.io/nuget/v/Atc.Wpf.svg?label=Atc.Wpf&logo=nuget&style=for-the-badge)](https://www.nuget.org/packages/Atc.Wpf) | Base Controls, ValueConverters, Extensions etc. | <ul><li>Atc</li><li>Atc.XamlToolkit</li><li>Atc.XamlToolkit.Wpf</li></ul> |
| [![NuGet Version](https://img.shields.io/nuget/v/Atc.Wpf.Controls.svg?label=Atc.Wpf.Controls&logo=nuget&style=for-the-badge)](https://www.nuget.org/packages/Atc.Wpf.Controls) | Miscellaneous UI Controls | <ul><li>Atc.Wpf</li><li>Atc.Wpf.Theming</li><li>Atc.XamlToolkit</li><li>Atc.XamlToolkit.Wpf</li></ul> |
| [![NuGet Version](https://img.shields.io/nuget/v/Atc.Wpf.Controls.Sample.svg?label=Atc.Wpf.Controls.Sample&logo=nuget&style=for-the-badge)](https://www.nuget.org/packages/Atc.Wpf.Controls.Sample) | Controls for creating WPF sample apps | <ul><li>Atc.Wpf</li><li>Atc.Wpf.Theming</li><li>Atc.Wpf.Controls</li></ul> |
| [![NuGet Version](https://img.shields.io/nuget/v/Atc.Wpf.FontIcons.svg?label=Atc.Wpf.FontIcons&logo=nuget&style=for-the-badge)](https://www.nuget.org/packages/Atc.Wpf.FontIcons) | Render Svg and Img resources based on fonts | <ul><li>Atc.Wpf</li></ul> |
| [![NuGet Version](https://img.shields.io/nuget/v/Atc.Wpf.Theming.svg?label=Atc.Wpf.Theming&logo=nuget&style=for-the-badge)](https://www.nuget.org/packages/Atc.Wpf.Theming) | Theming for Light & Dark mode for WPF base controls | <ul><li>Atc.Wpf</li><li>Atc.XamlToolkit</li><li>Atc.XamlToolkit.Wpf</li></ul> |

## 🔎 Demonstration Application

Expand Down
6 changes: 3 additions & 3 deletions sample/Atc.Wpf.Sample/Atc.Wpf.Sample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</PropertyGroup>

<PropertyGroup>
<NoWarn>$(NoWarn);WPF0001;CS0169;CS8618</NoWarn>
<NoWarn>$(NoWarn);WPF0001;CS0169;CS8618;CA1823</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand Down Expand Up @@ -51,8 +51,8 @@

<ItemGroup>
<PackageReference Include="Atc" Version="2.0.552" />
<PackageReference Include="Atc.XamlToolkit" Version="1.5.12" />
<PackageReference Include="Atc.XamlToolkit.Wpf" Version="1.5.12" />
<PackageReference Include="Atc.XamlToolkit" Version="1.5.22" />
<PackageReference Include="Atc.XamlToolkit.Wpf" Version="1.5.22" />
<PackageReference Include="ControlzEx" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.4" />
<PackageReference Include="Microsoft.Extensions.Options.DataAnnotations" Version="9.0.4" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,8 @@ public ApplicationMonitorView()
}
}

public static readonly DependencyProperty EnableTimerProperty = DependencyProperty.Register(
nameof(EnableTimer),
typeof(bool),
typeof(ApplicationMonitorView),
new PropertyMetadata(
defaultValue: false,
propertyChangedCallback: OnEnableTimerChanged));

public bool EnableTimer
{
get => (bool)GetValue(EnableTimerProperty);
set => SetValue(EnableTimerProperty, value);
}
[DependencyProperty(PropertyChangedCallback = nameof(OnEnableTimerChanged))]
private bool enableTimer;

private static void OnEnableTimerChanged(
DependencyObject d,
Expand Down
5 changes: 5 additions & 0 deletions src/Atc.Wpf.Controls.Sample/Atc.Wpf.Controls.Sample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
<PackageId>Atc.Wpf.Controls.Sample</PackageId>
<PackageTags>wpf;controls;sample</PackageTags>
<Description>A base library for building Sample WPF application.</Description>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<PropertyGroup>
<NoWarn>$(NoWarn);CS0169;CS0649;CS8618;CA1823</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions src/Atc.Wpf.Controls.Sample/GlobalUsings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
global using System.Windows.Media;

global using Atc.Helpers;
global using Atc.XamlToolkit.Controls.Attributes;
global using Atc.XamlToolkit.Messaging;
global using Atc.XamlToolkit.Mvvm;
13 changes: 2 additions & 11 deletions src/Atc.Wpf.Controls.Sample/SampleViewerView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,8 @@ namespace Atc.Wpf.Controls.Sample;

public partial class SampleViewerView
{
public static readonly DependencyProperty HeaderForegroundProperty = DependencyProperty.Register(
nameof(HeaderForeground),
typeof(SolidColorBrush),
typeof(SampleViewerView),
new PropertyMetadata(Brushes.Chocolate));

public SolidColorBrush HeaderForeground
{
get => (SolidColorBrush)GetValue(HeaderForegroundProperty);
set => SetValue(HeaderForegroundProperty, value);
}
[DependencyProperty(DefaultValue = "Brushes.Chocolate")]
private SolidColorBrush headerForeground;

public SampleViewerView()
{
Expand Down
5 changes: 3 additions & 2 deletions src/Atc.Wpf.Controls/Atc.Wpf.Controls.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<PackageId>Atc.Wpf.Controls</PackageId>
<PackageTags>wpf;controls</PackageTags>
<Description>A base library for building WPF application.</Description>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<ItemGroup>
Expand Down Expand Up @@ -42,8 +43,8 @@

<ItemGroup>
<PackageReference Include="Atc" Version="2.0.552" />
<PackageReference Include="Atc.XamlToolkit" Version="1.5.12" />
<PackageReference Include="Atc.XamlToolkit.Wpf" Version="1.5.12" />
<PackageReference Include="Atc.XamlToolkit" Version="1.5.22" />
<PackageReference Include="Atc.XamlToolkit.Wpf" Version="1.5.22" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>

Expand Down
1 change: 1 addition & 0 deletions src/Atc.Wpf.FontIcons/Atc.Wpf.FontIcons.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<PackageId>Atc.Wpf.FontIcons</PackageId>
<PackageTags>wpf;controls.font,icons</PackageTags>
<Description>A base library for building WPF application.</Description>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions src/Atc.Wpf.Theming/Atc.Wpf.Theming.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<PackageId>Atc.Wpf.Theming</PackageId>
<PackageTags>wpf;theming</PackageTags>
<Description>A base library for building WPF application with theming.</Description>
<PackageReadmeFile>README.md</PackageReadmeFile>
<NoWarn>$(NoWarn);SYSLIB0051</NoWarn>
</PropertyGroup>

Expand Down
7 changes: 7 additions & 0 deletions src/Atc.Wpf/Atc.Wpf.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
<PackageId>Atc.Wpf</PackageId>
<PackageTags>wpf;mvvm,relaycommand</PackageTags>
<Description>A base library for building WPF application with the MVVM design pattern.</Description>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<PropertyGroup>
<NoWarn>$(NoWarn);CS0169;CS0649;CS8618;CA1823</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand Down Expand Up @@ -1008,6 +1013,8 @@

<ItemGroup>
<PackageReference Include="Atc" Version="2.0.552" />
<PackageReference Include="Atc.XamlToolkit" Version="1.5.22" />
<PackageReference Include="Atc.XamlToolkit.Wpf" Version="1.5.22" />
</ItemGroup>

<ItemGroup>
Expand Down
21 changes: 3 additions & 18 deletions src/Atc.Wpf/ControlAttach/RectangleAttach.cs
Original file line number Diff line number Diff line change
@@ -1,24 +1,9 @@
namespace Atc.Wpf.ControlAttach;

[SuppressMessage("Design", "CA1062:Validate arguments of public methods", Justification = "OK.")]
public static class RectangleAttach
public static partial class RectangleAttach
{
public static readonly DependencyProperty CircularProperty = DependencyProperty.RegisterAttached(
"Circular",
typeof(bool),
typeof(RectangleAttach),
new PropertyMetadata(
defaultValue: BooleanBoxes.FalseBox,
propertyChangedCallback: OnCircularChanged));

public static void SetCircular(
DependencyObject element,
bool value)
=> element.SetValue(CircularProperty, BooleanBoxes.Box(value));

public static bool GetCircular(
DependencyObject element)
=> (bool)element.GetValue(CircularProperty);
[AttachedProperty(PropertyChangedCallback = nameof(OnCircularChanged))]
private static bool circular;

private static void OnCircularChanged(
DependencyObject d,
Expand Down
Loading
Loading