forked from PrismLibrary/Prism
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
457c725
commit 9acdecd
Showing
20 changed files
with
240 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 6 additions & 5 deletions
11
...gs/DefaultDialogs/NotificationDialog.xaml → ...elloWorld/Dialogs/NotificationDialog.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
<UserControl x:Class="Prism.Services.Dialogs.DefaultDialogs.NotificationDialog" | ||
<UserControl x:Class="HelloWorld.Dialogs.NotificationDialog" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:mvvm="clr-namespace:Prism.Mvvm" | ||
mvvm:ViewModelLocator.AutoWireViewModel="True" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:prism="http://prismlibrary.com/" | ||
prism:ViewModelLocator.AutoWireViewModel="True" | ||
Width="300" Height="150"> | ||
<Grid x:Name="LayoutRoot" Margin="5"> | ||
<Grid.RowDefinitions> | ||
<RowDefinition /> | ||
<RowDefinition Height="Auto" /> | ||
</Grid.RowDefinitions> | ||
|
||
<TextBlock Text="{Binding Message}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="0" /> | ||
<TextBlock Text="{Binding Message}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="0" TextWrapping="Wrap" /> | ||
<Button Command="{Binding CloseDialogCommand}" Content="OK" Width="75" Height="25" HorizontalAlignment="Right" Margin="0,10,0,0" Grid.Row="1" IsDefault="True" /> | ||
</Grid> | ||
</UserControl> |
28 changes: 28 additions & 0 deletions
28
Sandbox/Wpf/HelloWorld/HelloWorld/Dialogs/NotificationDialog.xaml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Windows; | ||
using System.Windows.Controls; | ||
using System.Windows.Data; | ||
using System.Windows.Documents; | ||
using System.Windows.Input; | ||
using System.Windows.Media; | ||
using System.Windows.Media.Imaging; | ||
using System.Windows.Navigation; | ||
using System.Windows.Shapes; | ||
|
||
namespace HelloWorld.Dialogs | ||
{ | ||
/// <summary> | ||
/// Interaction logic for NotificationDialog.xaml | ||
/// </summary> | ||
public partial class NotificationDialog : UserControl | ||
{ | ||
public NotificationDialog() | ||
{ | ||
InitializeComponent(); | ||
} | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
Sandbox/Wpf/HelloWorld/HelloWorld/Dialogs/NotificationDialogViewModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using Prism.Commands; | ||
using Prism.Services.Dialogs; | ||
|
||
namespace HelloWorld.Dialogs | ||
{ | ||
public class NotificationDialogViewModel : DialogViewModelBase | ||
{ | ||
private string _message; | ||
public string Message | ||
{ | ||
get { return _message; } | ||
set { SetProperty(ref _message, value); } | ||
} | ||
|
||
public DelegateCommand CloseDialogCommand { get; set; } | ||
|
||
public NotificationDialogViewModel() | ||
{ | ||
Title = "Notification"; | ||
CloseDialogCommand = new DelegateCommand(CloseDialog); | ||
} | ||
|
||
private void CloseDialog() | ||
{ | ||
RaiseRequestClose(new DialogResult(true)); | ||
} | ||
|
||
public override void OnDialogOpened(IDialogParameters parameters) | ||
{ | ||
Message = parameters.GetValue<string>("message"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 0 additions & 15 deletions
15
Source/Wpf/Prism.Wpf/Services/Dialogs/DefaultDialogs/NotificationDialog.xaml.cs
This file was deleted.
Oops, something went wrong.
55 changes: 0 additions & 55 deletions
55
Source/Wpf/Prism.Wpf/Services/Dialogs/DefaultDialogs/NotificationDialogViewModel.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.