Free cookie consent management tool by TermsFeed Policy Generator

source: branches/OKB/HeuristicLab.MainForm.WPF/WPFToolBarItem.cs @ 5765

Last change on this file since 5765 was 4311, checked in by swagner, 14 years ago

Integrated OKB clients for HL 3.3 (#1166)

File size: 753 bytes
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Windows.Controls;
6
7namespace 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.