Skip to content

Commit

Permalink
removed dialog VM base class
Browse files Browse the repository at this point in the history
  • Loading branch information
brianlagunas committed Mar 25, 2019
1 parent e8effd4 commit 36f8d81
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
using Prism.Commands;
using Prism.Mvvm;
using Prism.Services.Dialogs;
using System;

namespace Prism.Services.Dialogs
namespace HelloWorld.Dialogs
{
public class DialogViewModelBase : BindableBase, IDialogAware
{
Expand All @@ -28,12 +29,7 @@ protected virtual void CloseDialog(string parameter)
else if (parameter?.ToLower() == "false")
result = false;

RaiseRequestClose(new DialogResult(result));
}

public virtual void RaiseRequestClose(IDialogResult dialogResult)
{
RequestClose?.Invoke(dialogResult);
RequestClose?.Invoke(new DialogResult(result));
}

public virtual bool CanCloseDialog()
Expand All @@ -48,7 +44,7 @@ public virtual void OnDialogClosed()

public virtual void OnDialogOpened(IDialogParameters parameters)
{

}
}
}
1 change: 1 addition & 0 deletions Sandbox/Wpf/HelloWorld/HelloWorld/HelloWorld.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
<Compile Include="Dialogs\CustomDialogWindow.xaml.cs">
<DependentUpon>CustomDialogWindow.xaml</DependentUpon>
</Compile>
<Compile Include="Dialogs\DialogViewModelBase.cs" />
<Compile Include="Dialogs\NotificationDialog.xaml.cs">
<DependentUpon>NotificationDialog.xaml</DependentUpon>
</Compile>
Expand Down

0 comments on commit 36f8d81

Please sign in to comment.