Skip to content

Feature/maintenance #156

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 10, 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
4 changes: 2 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@
<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.193" PrivateAssets="All" />
<PackageReference Include="Meziantou.Analyzer" Version="2.0.195" 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.7.0.110445" PrivateAssets="All" />
<PackageReference Include="SonarAnalyzer.CSharp" Version="10.8.0.113526" PrivateAssets="All" />
</ItemGroup>

</Project>
18 changes: 8 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
[![NuGet Version](https://img.shields.io/nuget/v/Atc.Wpf.svg?logo=nuget&style=for-the-badge)](https://www.nuget.org/packages/atc.wpf)

# ATC.Net WPF

This is a base libraries for building WPF application with the MVVM design pattern.
Expand All @@ -10,15 +8,15 @@ This is a base libraries for building WPF application with the MVVM design patte

## NuGet Packages Provided in this Repository

| Nuget package | Description | Dependencies |
|----------------------------|-----------------------------------------------------|----------------------------------------------|
| 💟 Atc.Wpf | Base Controls, ValueConverters, Extensions etc. | Atc |
| 💟 Atc.Wpf.Controls | Miscellaneous UI Controls | Atc.Wpf & Atc.Wpf.Theming |
| 💟 Atc.Wpf.Controls.Sample | Controls for creating WPF sample apps | Atc.Wpf & Atc.Wpf.Theming & Atc.Wpf.Controls |
| 💟 Atc.Wpf.FontIcons | Render Svg and Img resources based on fonts | Atc.Wpf |
| 💟 Atc.Wpf.Theming | Theming for Light & Dark mode for WPF base controls | Atc.Wpf |
| 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 |

# 🔎 Demonstration Application
## 🔎 Demonstration Application

The demonstration application, `Atc.Wpf.Sample`, functions as a control explorer.
It provides quick visualization of a given control, along with options for
Expand Down
16 changes: 10 additions & 6 deletions sample/Atc.Wpf.Sample/Atc.Wpf.Sample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
<IsPackable>false</IsPackable>
</PropertyGroup>

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

<ItemGroup>
<Compile Remove="AssemblyInfo.cs" />
</ItemGroup>
Expand Down Expand Up @@ -47,13 +51,13 @@

<ItemGroup>
<PackageReference Include="Atc" Version="2.0.552" />
<PackageReference Include="Atc.XamlToolkit" Version="1.5.7" />
<PackageReference Include="Atc.XamlToolkit.Wpf" Version="1.5.7" />
<PackageReference Include="Atc.XamlToolkit" Version="1.5.12" />
<PackageReference Include="Atc.XamlToolkit.Wpf" Version="1.5.12" />
<PackageReference Include="ControlzEx" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.3" />
<PackageReference Include="Microsoft.Extensions.Options.DataAnnotations" Version="9.0.3" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.3" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.3" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.4" />
<PackageReference Include="Microsoft.Extensions.Options.DataAnnotations" Version="9.0.4" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.4" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.4" />
</ItemGroup>

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

global using Atc.Data.Models;
global using Atc.Helpers;
global using Atc.Serialization.JsonConverters;
global using Atc.Wpf.Collections;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<UserControl
x:Class="Atc.Wpf.Sample.SamplesWpfSourceGenerators.TestClassDependencyPropertiesView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">
<Grid />
</UserControl>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
namespace Atc.Wpf.Sample.SamplesWpfSourceGenerators;

[DependencyProperty<bool>("IsRunning", DefaultValue = true)]
[DependencyProperty<decimal>("DecimalValue", DefaultValue = 1.1)]
[DependencyProperty<float>("FloatValue", DefaultValue = 1.1)]
[DependencyProperty<int>("IntValue", DefaultValue = 1)]
[DependencyProperty<LogItem>("LogItem")]
[DependencyProperty<LogCategoryType>("LogCategory", DefaultValue = LogCategoryType.Debug)]
[DependencyProperty<string>("StringValue", DefaultValue = "Hello world")]
[DependencyProperty<IList<string>>("ErrorTerms", DefaultValue = "error;err:")]
[DependencyProperty<Color>("ErrorTextColor", DefaultValue = "Red")]
[DependencyProperty<Brush>("ErrorTextBrush", DefaultValue = "Red")]
[DependencyProperty<FontFamily>("MyFontFamily", DefaultValue = "Consolas")]
[DependencyProperty<double>("MyFontSize", DefaultValue = 12.2)]
public partial class TestClassDependencyPropertiesView
{
public TestClassDependencyPropertiesView()
{
InitializeComponent();

IsRunning = false;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<UserControl
x:Class="Atc.Wpf.Sample.SamplesWpfSourceGenerators.TestFieldsDependencyPropertiesView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">
<Grid />
</UserControl>
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
namespace Atc.Wpf.Sample.SamplesWpfSourceGenerators;

[SuppressMessage("", "CS0169:The field is never used", Justification = "OK - SourceGenerator declaration field")]
[SuppressMessage("", "CS8618:Non-nullable variable must contain a non-null value when exiting constructor. Consider declaring it as nullable.", Justification = "OK - SourceGenerator declaration field")]
[SuppressMessage("", "CA1823:Avoid unused private fields", Justification = "OK - SourceGenerator declaration field")]
public partial class TestFieldsDependencyPropertiesView
{
public TestFieldsDependencyPropertiesView()
{
InitializeComponent();

IsRunning = false;
}

[DependencyProperty(DefaultValue = true)]
private bool isRunning;

[DependencyProperty(DefaultValue = 1.1)]
private decimal decimalValue;

[DependencyProperty(DefaultValue = 1.1)]
private float floatValue;

[DependencyProperty(DefaultValue = 1)]
private int intValue;

[DependencyProperty]
private LogItem logItem;

[DependencyProperty(DefaultValue = LogCategoryType.Debug)]
private LogCategoryType logCategory;

[DependencyProperty(DefaultValue = "Hello world")]
private string stringValue;

[DependencyProperty(DefaultValue = "error;err:")]
private IList<string> errorTerms;

[DependencyProperty(DefaultValue = "Red")]
private Color errorTextColor;

[DependencyProperty(DefaultValue = "Red")]
private Brush errorTextBrush;

[DependencyProperty(DefaultValue = "Consolas")]
private FontFamily myFontFamily;

[DependencyProperty(DefaultValue = 12.2)]
private double myFontSize;
}
4 changes: 2 additions & 2 deletions src/Atc.Wpf.Controls/Atc.Wpf.Controls.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@

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

Expand Down
2 changes: 1 addition & 1 deletion src/Atc.Wpf.Controls/BaseControls/DecimalXyBox.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public event RoutedPropertyChangedEventHandler<decimal> ValueYChanged
nameof(HideUpDownButtons),
typeof(bool),
typeof(DecimalXyBox),
new PropertyMetadata(default(bool)));
new PropertyMetadata(BooleanBoxes.FalseBox));

public bool HideUpDownButtons
{
Expand Down
6 changes: 3 additions & 3 deletions src/Atc.Wpf.Controls/BaseControls/FilePicker.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public string Title
nameof(ShowClearTextButton),
typeof(bool),
typeof(FilePicker),
new PropertyMetadata(default(bool)));
new PropertyMetadata(BooleanBoxes.FalseBox));

public bool ShowClearTextButton
{
Expand Down Expand Up @@ -113,7 +113,7 @@ public TextTrimming WatermarkTrimming
nameof(AllowOnlyExisting),
typeof(bool),
typeof(FilePicker),
new PropertyMetadata(default(bool)));
new PropertyMetadata(BooleanBoxes.FalseBox));

public bool AllowOnlyExisting
{
Expand All @@ -125,7 +125,7 @@ public bool AllowOnlyExisting
nameof(UsePreviewPane),
typeof(bool),
typeof(FilePicker),
new PropertyMetadata(default(bool)));
new PropertyMetadata(BooleanBoxes.FalseBox));

public bool UsePreviewPane
{
Expand Down
2 changes: 1 addition & 1 deletion src/Atc.Wpf.Controls/BaseControls/IntegerXyBox.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public event RoutedPropertyChangedEventHandler<int> ValueYChanged
nameof(HideUpDownButtons),
typeof(bool),
typeof(IntegerXyBox),
new PropertyMetadata(default(bool)));
new PropertyMetadata(BooleanBoxes.FalseBox));

public bool HideUpDownButtons
{
Expand Down
2 changes: 1 addition & 1 deletion src/Atc.Wpf.Controls/BaseControls/PixelSizeBox.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public event RoutedPropertyChangedEventHandler<int> ValueHeightChanged
nameof(HideUpDownButtons),
typeof(bool),
typeof(PixelSizeBox),
new PropertyMetadata(default(bool)));
new PropertyMetadata(BooleanBoxes.FalseBox));

public bool HideUpDownButtons
{
Expand Down
2 changes: 1 addition & 1 deletion src/Atc.Wpf.Controls/LabelControls/LabelDatePicker.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public TextTrimming WatermarkTrimming
nameof(OpenCalender),
typeof(bool),
typeof(LabelDatePicker),
new PropertyMetadata(default(bool)));
new PropertyMetadata(BooleanBoxes.FalseBox));

public bool OpenCalender
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public TextTrimming WatermarkTrimming
nameof(OpenCalender),
typeof(bool),
typeof(LabelDateTimePicker),
new PropertyMetadata(default(bool)));
new PropertyMetadata(BooleanBoxes.FalseBox));

public bool OpenCalender
{
Expand All @@ -203,7 +203,7 @@ public bool OpenCalender
nameof(OpenClock),
typeof(bool),
typeof(LabelDateTimePicker),
new PropertyMetadata(default(bool)));
new PropertyMetadata(BooleanBoxes.FalseBox));

public bool OpenClock
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public DirectoryInfo? Value
nameof(ShowClearTextButton),
typeof(bool),
typeof(LabelDirectoryPicker),
new PropertyMetadata(default(bool)));
new PropertyMetadata(BooleanBoxes.FalseBox));

public bool ShowClearTextButton
{
Expand All @@ -32,7 +32,7 @@ public bool ShowClearTextButton
nameof(AllowOnlyExisting),
typeof(bool),
typeof(LabelDirectoryPicker),
new PropertyMetadata(default(bool)));
new PropertyMetadata(BooleanBoxes.FalseBox));

public bool AllowOnlyExisting
{
Expand Down
6 changes: 3 additions & 3 deletions src/Atc.Wpf.Controls/LabelControls/LabelFilePicker.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public FileInfo? Value
nameof(ShowClearTextButton),
typeof(bool),
typeof(LabelFilePicker),
new PropertyMetadata(default(bool)));
new PropertyMetadata(BooleanBoxes.FalseBox));

public bool ShowClearTextButton
{
Expand All @@ -32,7 +32,7 @@ public bool ShowClearTextButton
nameof(AllowOnlyExisting),
typeof(bool),
typeof(LabelFilePicker),
new PropertyMetadata(default(bool)));
new PropertyMetadata(BooleanBoxes.FalseBox));

public bool AllowOnlyExisting
{
Expand All @@ -56,7 +56,7 @@ public string Filter
nameof(UsePreviewPane),
typeof(bool),
typeof(LabelFilePicker),
new PropertyMetadata(default(bool)));
new PropertyMetadata(BooleanBoxes.FalseBox));

public bool UsePreviewPane
{
Expand Down
2 changes: 1 addition & 1 deletion src/Atc.Wpf.Controls/LabelControls/LabelTimePicker.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public TextTrimming WatermarkTrimming
nameof(OpenClock),
typeof(bool),
typeof(LabelTimePicker),
new PropertyMetadata(default(bool)));
new PropertyMetadata(BooleanBoxes.FalseBox));

public bool OpenClock
{
Expand Down
Loading
Loading