renaming and garbage collection

This commit is contained in:
Holger Boerchers
2019-01-26 13:40:16 +01:00
parent f114304ec9
commit 91fa709b4b
9 changed files with 22 additions and 13 deletions

View File

@ -13,6 +13,7 @@
Title="NiftyTool NG"
Width="920"
Height="600"
d:DataContext="{d:DesignInstance view:ShellViewModel}"
modern:UIHooks.AutoDpiScale="True"
prism:ViewModelLocator.AutoWireViewModel="True"
Background="{DynamicResource MaterialDesignPaper}"
@ -85,7 +86,10 @@
IsChecked="False"
Style="{StaticResource MaterialDesignHamburgerToggleButton}" />
<StackPanel DockPanel.Dock="Right" Orientation="Horizontal">
<Button materialDesign:ShadowAssist.ShadowDepth="Depth0" Style="{StaticResource MaterialDesignFloatingActionButton}">
<Button
materialDesign:ShadowAssist.ShadowDepth="Depth0"
Command="{Binding GcCollectCommand}"
Style="{StaticResource MaterialDesignFloatingActionButton}">
<materialDesign:PackIcon
Width="32"
Height="32"

View File

@ -1,4 +1,6 @@
using Prism.Mvvm;
using System.Windows.Input;
using Prism.Commands;
using Prism.Mvvm;
namespace MaterialModernWPF.View
{
@ -6,6 +8,9 @@ namespace MaterialModernWPF.View
{
public ShellViewModel()
{
GcCollectCommand = new DelegateCommand(System.GC.Collect);
}
public ICommand GcCollectCommand {get; }
}
}