MinimalisticWPF.Controls
1.2.0
dotnet add package MinimalisticWPF.Controls --version 1.2.0
NuGet\Install-Package MinimalisticWPF.Controls -Version 1.2.0
<PackageReference Include="MinimalisticWPF.Controls" Version="1.2.0" />
paket add MinimalisticWPF.Controls --version 1.2.0
#r "nuget: MinimalisticWPF.Controls, 1.2.0"
// Install MinimalisticWPF.Controls as a Cake Addin #addin nuget:?package=MinimalisticWPF.Controls&version=1.2.0 // Install MinimalisticWPF.Controls as a Cake Tool #tool nuget:?package=MinimalisticWPF.Controls&version=1.2.0
MinimalisticWPF.Controls
The project aims to explore good practices for implementing front-ends in WPF projects through the use of C#
- Complex front-end effects can be achieved with a small amount of C# code
- Follow the MVVM design pattern
Go ��
Dependency ��
Versions ��
V1.2.0 LTS
UserControls
xmlns:mn="clr-namespace:MinimalisticWPF.Controls;assembly=MinimalisticWPF.Controls"
Not all controls are very extensible, this project is just a demonstration of how you can use the MinimalisticWPF
library to build user controls
Button
Use the following template to set the appearance of your buttons
<Style TargetType="mn:Button" x:Key="ButtonWithDynamicTheme">
<Setter Property="DarkHoveredForeground" Value="White"/>
<Setter Property="DarkNoHoveredForeground" Value="White"/>
<Setter Property="DarkHoveredBorderBrush" Value="Cyan"/>
<Setter Property="DarkNoHoveredBorderBrush" Value="White"/>
<Setter Property="DarkHoveredBackground" Value="White"/>
<Setter Property="LightHoveredForeground" Value="Red"/>
<Setter Property="LightNoHoveredForeground" Value="#1e1e1e"/>
<Setter Property="LightHoveredBorderBrush" Value="Red"/>
<Setter Property="LightNoHoveredBorderBrush" Value="#1e1e1e"/>
<Setter Property="LightHoveredBackground" Value="#1e1e1e"/>
<Setter Property="HoveredBorderThickness" Value="30,0,0,0"/>
<Setter Property="NoHoveredBorderThickness" Value="1,0,0,0"/>
<Setter Property="HoveredCornerRadius" Value="0"/>
<Setter Property="NoHoveredCornerRadius" Value="0"/>
<Setter Property="HoveredBackOpacity" Value="0.2"/>
<Setter Property="NoHoveredBackOpacity" Value="0"/>
</Style>
Apply the Style
<mn:Button Text="MyButton" Click="Button_Click" Style="{StaticResource ButtonWithDynamicTheme}"/>
ProgressBar
A more flexible look
- Support to switch between
ring and line
- The Angle of the ring is adjustable
- Can be flipped on the X or Y axis
<mn:ProgressBar Size="200"
Thickness="5"
StartAngle="90"
EndAngle="270"
Shape="Ring"
Progress="0.3"
FlipX="True"
FlipY="False"
DarkForeFill="Cyan"
DarkBackFill="Gray"
LightForeFill="Violet"
LightBackFill="Gray"/>
TextBox
Font size is automatically adjusted and all input fields share a theme
<mn:TextBox OnTextChanged="TextBox_OnTextChanged"
DarkBackground="#32FFFFFF"
LightBackground="#32000000"
DarkBorderBrush="White"
LightBorderBrush="Black"
DarkCaretBrush="Cyan"
LightCaretBrush="Lime"
DarkForeground="White"
LightForeground="Black"
HoveredMargin="0"
NoHoveredMargin="3"/>
There is also a read-only Text
property to get the current text content
TopBar
This can help you quickly replace the zoom interaction provided by the default window
<Style TargetType="mn:TopBar" x:Key="MyTopBar">
<Setter Property="DarkTitleBrush" Value="Cyan"/>
<Setter Property="LightTitleBrush" Value="Violet"/>
</Style>
<Style TargetType="mn:Button" x:Key="ButtonInTopBar">
<Setter Property="DarkHoveredForeground" Value="Cyan"/>
<Setter Property="DarkNoHoveredForeground" Value="White"/>
<Setter Property="LightHoveredForeground" Value="Red"/>
<Setter Property="LightNoHoveredForeground" Value="Black"/>
</Style>
<mn:TopBar VerticalAlignment="Top" Height="50"
Style="{StaticResource MyTopBar}"
ButtonStyle="{StaticResource ResourceKey=ButtonInTopBar}"/>
Notification
Glass style notification window, supporting light and dark theme.
await
Warn() / Ask() / Message()- The bool value indicates whether the window is at the top
private async void Button_Click_3(object sender, RoutedEventArgs e)
{
if (await Notification.Warn("This can lead to a catastrophic error! Are you sure you want to continue?",true))
{
MessageBox.Show("You choose to continue");
}
else
{
MessageBox.Show("You chose to cancel");
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0-windows7.0 is compatible. net7.0-windows was computed. net8.0-windows was computed. net9.0-windows was computed. |
-
net6.0-windows7.0
- MinimalisticWPF (>= 4.0.0)
- MinimalisticWPF.Generator (>= 2.5.2)
- NetCore5.0.Microsoft.Expression.Drawing (>= 1.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.2.0 | 37 | 2/18/2025 |