Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Text;
|
---|
5 | using System.Windows.Controls;
|
---|
6 | using System.Windows;
|
---|
7 |
|
---|
8 | namespace HeuristicLab.MainForm.WPF {
|
---|
9 |
|
---|
10 | public abstract class WPFMenuItem : WPFUserInterfaceItem {
|
---|
11 |
|
---|
12 | private MenuItem menuItem;
|
---|
13 | public MenuItem MenuItem {
|
---|
14 | get {
|
---|
15 | return menuItem;
|
---|
16 | }
|
---|
17 | set {
|
---|
18 | if (value == menuItem)
|
---|
19 | return;
|
---|
20 | menuItem = value;
|
---|
21 | OnWPFMenuItemChanged();
|
---|
22 | }
|
---|
23 | }
|
---|
24 |
|
---|
25 | public event EventHandler MenuItemChanged;
|
---|
26 |
|
---|
27 | protected void OnWPFMenuItemChanged() {
|
---|
28 | EventHandler handler = MenuItemChanged;
|
---|
29 | if (handler != null)
|
---|
30 | handler(this, EventArgs.Empty);
|
---|
31 | }
|
---|
32 |
|
---|
33 | }
|
---|
34 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.