aboutsummaryrefslogtreecommitdiffstatsci
path: root/Samples/common/SampleBase.cs
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2020-06-04 19:58:26 +0200
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2020-06-04 19:58:26 +0200
commit2e0586b573df1d1d1629044ad1b546a8a8c49ab6 (patch)
tree16cb3b8d2560abab5a15bbbcc29b9df1c35d084e /Samples/common/SampleBase.cs
parent0eb0a6932d5bd58d874face8b0aeb7dc41f7c81c (diff)
use [CallerMemberName] for value change notify
Diffstat (limited to 'Samples/common/SampleBase.cs')
-rw-r--r--Samples/common/SampleBase.cs18
1 files changed, 13 insertions, 5 deletions
diff --git a/Samples/common/SampleBase.cs b/Samples/common/SampleBase.cs
index 0007fc23..aea139c3 100644
--- a/Samples/common/SampleBase.cs
+++ b/Samples/common/SampleBase.cs
@@ -104,7 +104,7 @@ namespace Crow
return;
prop1 = value;
- NotifyValueChanged ("TestList3SelProp1", prop1);
+ NotifyValueChanged (prop1);
}
}
@@ -115,7 +115,7 @@ namespace Crow
if (selString == value)
return;
selString = value;
- NotifyValueChanged ("TestList2SelectedString", selString);
+ NotifyValueChanged (selString);
}
}
@@ -141,7 +141,7 @@ namespace Crow
if (value == curSources)
return;
curSources = value;
- NotifyValueChanged ("CurSources", curSources);
+ NotifyValueChanged (curSources);
}
}
bool boolVal = true;
@@ -151,13 +151,21 @@ namespace Crow
if (boolVal == value)
return;
boolVal = value;
- NotifyValueChanged ("BoolVal", boolVal);
+ NotifyValueChanged (boolVal);
}
}
#endregion
-
+ protected override void OnInitialized ()
+ {
+ Commands = new List<Command> {
+ new Command(() => MessageBox.ShowModal(this, MessageBox.Type.Information, "context menu 1 clicked")) { Caption = "Action 1" },
+ new Command(() => MessageBox.ShowModal(this, MessageBox.Type.Information, "context menu 2 clicked")) { Caption = "Action 2" },
+ new Command(() => MessageBox.ShowModal(this, MessageBox.Type.Information, "context menu 3 clicked")) { Caption = "Action 3" }
+ };
+ base.OnInitialized ();
+ }
}
} \ No newline at end of file