Lusted is a set of WPF styles that aspire to be, as the name purports, less ugly than the default style present in a raw WPF project.
You will find no claims of excellence, completeness, nor beauty here; for projects larger than a knick-knack, something more complete and established would likely deliver more satisfaction.
That aside, Lustd was created to simplify consistency and appearance among my own tools and projects, and intends not to over promise nor underdliver.
Install-Package Lustd
The contents of Lustd at split in to 3 categories; Themes, Schemes, and Highlights. Themes define the structure of components, via control templates and styles; Schemes offer a colour scheme; Highlights provide a visually dominant colour for use as required.
- Add nuget package to project.
- Add a chosed Theme, Scheme, and Highlight to your
app.xaml
file. - Set the
Window
style if desired.
<Application x:Class="Example.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="MainWindow.xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/Lustd;component/Themes/DefaultTheme.xaml" />
<ResourceDictionary Source="pack://application:,,,/Lustd;component/Schemes/DarkScheme.xaml" />
<ResourceDictionary Source="pack://application:,,,/Lustd;component/Highlights/TurboHighlight.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
namespace Example.App
{
public partial class MainWindow : Window
{
public MainWindow()
{
Style = (Style)FindResource(typeof(Window));
InitializeComponent();
}
}
}
Note: The
Window
style must be set if desired; it will not be set automatically. This can be avoided by instead inheriting fromLustdWindow
.
<controls:LustdWindow x:Class="Lustd.Demo.MainWindow"
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"
xmlns:controls="clr-namespace:Lustd.Controls;assembly=Lustd"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<!-- Window Content -->
</controls:LustdWindow>
<controls:LustdWindowEnhanced x:Class="Lustd.Demo.MainWindow"
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"
xmlns:controls="clr-namespace:Lustd.Controls;assembly=Lustd"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<controls:LustdWindowEnhanced.TitleContent>
<!-- Alt Window Title here. -->
</controls:LustdWindowEnhanced.TitleContent>
<controls:LustdWindowEnhanced.ActionContent>
<!-- Alt Titlebar Action Content here. -->
</controls:LustdWindowEnhanced.ActionContent>
<controls:LustdWindowEnhanced.CommandContent>
<!-- Alt Titlebar Action Content here, with consistent Button and ToggleButton styles. -->
<StackPanel Margin="10,0" Orientation="Horizontal">
<Button x:Name="SettingsButton" ToolTip="Settings">
<TextBlock FontFamily="Segoe MDL2 Assets" Text="" />
</Button>
</StackPanel>
</controls:LustdWindowEnhanced.CommandContent>
<!-- Window Content -->
</controls:LustdWindowEnhanced>