The official WPF Theme of the Open Commissioning Assistant.
- Create a
WPF Applicationproject with target framework.NET8or.NET Framework 4.8.1 - Add the
OC.Assistant.Themepackage via nuget - Add the ResourceDictionary of the theme to your
App.xaml:
<Application x:Class="OC.Assistant.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:theme="http://schemas.open-commissioning-assistant.com/2024"
StartupUri="MainWindow.xaml">
<Application.Resources>
<theme:ResourceDictionary />
</Application.Resources>
</Application>- Replace the default
Windowclass by thetheme:Windowclass in yourMainWindow.xaml. Content inside the TitleBar can als be rendered by settingtheme:Window.TitleBarContentproperty.
<theme:Window x:Class="MyApplication.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:theme="http://schemas.open-commissioning-assistant.com/2024"
mc:Ignorable="d"
ShowIcon="True"
ShowTitle="False">
<theme:Windows.TitleBarContent>
<!-- Here goes your titleBar content. Usually a Menu with MenuItems. -->
</theme:Windows.TitleBarContent>
<Grid>
<!-- Here goes your main application content. -->
</Grid>
</theme:Window>Note
Further details about all implemented styles and controls can be found in the GitHub Repository of this package.