1. Installer Material Design via nuget
2. Installer Prism via nuget
3. Modifier App.xmal
<prism:PrismApplication x:Class="VisionMeasureGlue.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:prism="http://prismlibrary.com/"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
>
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<materialDesign:BundledTheme BaseTheme="Light" PrimaryColor="DeepPurple" SecondaryColor="Lime" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
<ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/SkinDefault.xaml"/>
<ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Theme.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</prism:PrismApplication>
Le rectangle rouge est l'endroit qui doit être changé
3. Modifiez le fichier app.xmal.cs
public partial class App : PrismApplication
{
System.Threading.Mutex mutex;
protected override System.Windows.Window CreateShell()
{
return Container.Resolve<BasicDemoWindow>();
}
protected override void RegisterTypes(IContainerRegistry containerRegistry)
{
}
Modifier le contenu dans le rectangle rouge
Pour l'instant, la compilation n'est pas fausse, même si elle est bonne
A ce moment, deux formulaires apparaîtront, pensez à supprimer StartupUri="MainWindow.xaml"