From 36b7b57eb2a39a217744027ed793052a3ea630f3 Mon Sep 17 00:00:00 2001 From: Lukas Ruf Date: Sun, 18 Feb 2018 16:01:03 +0100 Subject: [PATCH] finished KeyVisibility --- .../Presentation/ViewModel/ChannelPageViewModel.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/ClientApp/ModernEncryption/Presentation/ViewModel/ChannelPageViewModel.cs b/ClientApp/ModernEncryption/Presentation/ViewModel/ChannelPageViewModel.cs index 96cfa72..c06d999 100644 --- a/ClientApp/ModernEncryption/Presentation/ViewModel/ChannelPageViewModel.cs +++ b/ClientApp/ModernEncryption/Presentation/ViewModel/ChannelPageViewModel.cs @@ -21,7 +21,18 @@ public class ChannelPageViewModel : ValidationBase, INotifyPropertyChanged public ICommand ValidateMessageCommand { protected set; get; } public ICommand ShowKeyCommand { protected set; get; } public Page KeyPage { get; set; } - public bool KeyVisibility { get; set; } + private bool _keyVisibility = true; + + public bool KeyVisibility + { + get => _keyVisibility; + set + { + if (_keyVisibility == value) return; + _keyVisibility = value; + OnPropertyChanged("KeyVisibility"); + } + } public string Title {