This library is a comprehensive class library designed to simplify the implementation of common GUI functionalities in .NET applications.
$ dotnet add package MyNet.Wpf
A comprehensive library for advanced WPF controls, theming, dialogs, notifications, and UI helpers in .NET applications.
Install via NuGet:
dotnet add package MyNet.Wpf
MyNet.Wpf provides an advanced theming and styling system to customize the look and feel of your WPF applications.
To apply the default theme, add the following resource in your App.xaml:
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/MyNet.Wpf;component/Themes/MyNet.Theme.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
You can also merge your own resource dictionaries or override existing styles.
Themes/MyNet.Styles.xaml and can be extended or replaced.// Dynamically change the theme
Application.Current.Resources.MergedDictionaries.Clear();
Application.Current.Resources.MergedDictionaries.Add(
new ResourceDictionary { Source = new Uri("pack://application:,,,/MyNet.Wpf;component/Themes/MyNet.Theme.xaml") }
);
using MyNet.Wpf.Toasting;
Toaster.Show("Hello from MyNet.Wpf!");
using MyNet.Wpf.Dialogs;
var result = DialogService.Show<MyCustomDialog>();
Application.Current.Resources.MergedDictionaries.Clear();
Application.Current.Resources.MergedDictionaries.Add(
new ResourceDictionary { Source = new Uri("pack://application:,,,/MyNet.Wpf;component/Themes/MyNet.Theme.xaml") }
);
<Button Style="{StaticResource MyNet.Styles.Button.Elevation}" Content="Styled Button" />
using MyNet.Wpf.ResourceLocator;
var resource = ResourceLocator.GetResource("MyNet.Brushes.Positive");
Copyright © Stéphane ANDRE.
Distributed under the MIT License. See LICENSE for details.