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