mirror of
https://github.com/holgerb83/ModernWpfPlayground.git
synced 2025-04-19 06:53:50 +02:00
installed prism
This commit is contained in:
parent
59d93a0212
commit
bd7f504a56
6
App.xaml
6
App.xaml
@ -1,10 +1,10 @@
|
||||
<Application
|
||||
<dryIoc:PrismApplication
|
||||
x:Class="ModernWpfPlayground.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:ModernWpfPlayground"
|
||||
xmlns:ui="http://schemas.modernwpf.com/2019"
|
||||
StartupUri="MainWindow.xaml">
|
||||
xmlns:dryIoc="http://prismlibrary.com/">
|
||||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
@ -29,4 +29,4 @@
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Application.Resources>
|
||||
</Application>
|
||||
</dryIoc:PrismApplication>
|
||||
|
15
App.xaml.cs
15
App.xaml.cs
@ -1,9 +1,22 @@
|
||||
namespace ModernWpfPlayground
|
||||
using System.Windows;
|
||||
using Prism.Ioc;
|
||||
|
||||
namespace ModernWpfPlayground
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for App.xaml
|
||||
/// </summary>
|
||||
public partial class App
|
||||
{
|
||||
protected override void RegisterTypes(IContainerRegistry containerRegistry)
|
||||
{
|
||||
containerRegistry.Register<MainWindow>();
|
||||
containerRegistry.Register<WindowViewModel>();
|
||||
}
|
||||
|
||||
protected override Window CreateShell()
|
||||
{
|
||||
return Container.Resolve<MainWindow>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -11,14 +11,12 @@
|
||||
Title="{Binding Title}"
|
||||
Width="1200"
|
||||
Height="600"
|
||||
d:DataContext="{d:DesignInstance local:WindowViewModel}"
|
||||
ui:TitleBar.ExtendViewIntoTitleBar="True"
|
||||
ui:WindowHelper.UseModernWindowStyle="True"
|
||||
TextOptions.TextFormattingMode="Display"
|
||||
UseLayoutRounding="True"
|
||||
mc:Ignorable="d">
|
||||
<Window.DataContext>
|
||||
<local:WindowViewModel />
|
||||
</Window.DataContext>
|
||||
<Window.Resources>
|
||||
<local:PixelsToGridLengthConverter x:Key="PixelsToGridLength" />
|
||||
</Window.Resources>
|
||||
|
@ -5,9 +5,10 @@
|
||||
/// </summary>
|
||||
public partial class MainWindow
|
||||
{
|
||||
public MainWindow()
|
||||
public MainWindow(WindowViewModel viewModel)
|
||||
{
|
||||
InitializeComponent();
|
||||
DataContext = viewModel;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -9,6 +9,8 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="ModernWpfUI" Version="0.8.1" />
|
||||
<PackageReference Include="Prism.DryIoc" Version="7.2.0.1422" />
|
||||
<PackageReference Include="Prism.Wpf" Version="7.2.0.1422" />
|
||||
<PackageReference Include="System.Drawing.Common" Version="4.7.0" />
|
||||
</ItemGroup>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user