aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Scripting/Tango.Scripting.IDE/SolutionItemCommand.cs
diff options
context:
space:
mode:
authorVictoria Plitt <Victoria.Plitt@twine-s.com>2019-04-11 16:07:21 +0300
committerVictoria Plitt <Victoria.Plitt@twine-s.com>2019-04-11 16:07:21 +0300
commitb41347f1528e5e34d8c8c8ef2c5b6b63876098f1 (patch)
tree79f83df85407f02bad7b025030c7c79a3aca1439 /Software/Visual_Studio/Scripting/Tango.Scripting.IDE/SolutionItemCommand.cs
parent50672cf57739bac3c0ddefcd40563d0fbed3db80 (diff)
downloadTango-b41347f1528e5e34d8c8c8ef2c5b6b63876098f1.tar.gz
Tango-b41347f1528e5e34d8c8c8ef2c5b6b63876098f1.zip
added icons to menu, solution for setting icons dynamically to context menu
Diffstat (limited to 'Software/Visual_Studio/Scripting/Tango.Scripting.IDE/SolutionItemCommand.cs')
-rw-r--r--Software/Visual_Studio/Scripting/Tango.Scripting.IDE/SolutionItemCommand.cs12
1 files changed, 11 insertions, 1 deletions
diff --git a/Software/Visual_Studio/Scripting/Tango.Scripting.IDE/SolutionItemCommand.cs b/Software/Visual_Studio/Scripting/Tango.Scripting.IDE/SolutionItemCommand.cs
index c6627d354..9fbac01c2 100644
--- a/Software/Visual_Studio/Scripting/Tango.Scripting.IDE/SolutionItemCommand.cs
+++ b/Software/Visual_Studio/Scripting/Tango.Scripting.IDE/SolutionItemCommand.cs
@@ -1,6 +1,8 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
+using System.ComponentModel;
+using System.IO;
using System.Linq;
using System.Text;
@@ -10,7 +12,7 @@ using Tango.Core.Commands;
namespace Tango.Scripting.IDE
{
- public class SolutionItemCommand : RelayCommand, ISolutionItemCommand
+ public class SolutionItemCommand : RelayCommand, ISolutionItemCommand, INotifyPropertyChanged
{
public SolutionItemCommand() : base(()=> { })
{
@@ -53,6 +55,9 @@ namespace Tango.Scripting.IDE
public String Name { get; set; }
BitmapSource _bImage;
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
public BitmapSource Image {
get
{
@@ -61,9 +66,14 @@ namespace Tango.Scripting.IDE
set
{
_bImage = value;
+ RaisePropertyChanged(nameof(Image));
}
}
public ObservableCollection<ISolutionItemCommand> Commands { get; set; }
+ protected virtual void RaisePropertyChanged(String propName)
+ {
+ PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propName));
+ }
}
}