-
-
Notifications
You must be signed in to change notification settings - Fork 11
Quick start
Simnico99 edited this page Apr 8, 2022
·
13 revisions
Here is a really quick start to get you ready for using the new Mica material in your WPF app.
- To start Change the
<Window><Window/>
for<mica:MicaWindow></mica:MicaWindow>
. - Add the namespace by adding
xmlns:mica="clr-namespace:MicaWPF.Controls;assembly=MicaWPF"
.
Here is an exemple:
<mica:MicaWindow
x:Class="MicaWPF.DesktopApp.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:local="clr-namespace:MicaWPF.DesktopApp"
mc:Ignorable="d"
Title="MainWindow"
Height="450"
Width="800"
xmlns:mica="clr-namespace:MicaWPF.Controls;assembly=MicaWPF" >
<Grid>
</Grid>
</mica:MicaWindow>
Now get into your Window code:
- Add the namespace
using MicaWPF.Controls;
. - Change the Window inherited class to
MicaWindow
.
Here is an exemple of what it might look like using .NET6:
using MicaWPF.Controls;
namespace MicaWPF.DesktopApp;
public partial class MainWindow : MicaWindow
{
public MainWindow()
{
InitializeComponent();
}
}
The documentation is maintained by @Simnico99. This Library is distributed under an MIT License.