using System; using System.ComponentModel; using System.Windows; using Sofa.Commons; namespace Sofa.WebBrowser.Controls { public class BaseControlData : INotifyPropertyChanged { public BaseControlData(CmpLoaded thisCmpLoaded) { ThisCmpLoaded = thisCmpLoaded; } private CmpLoaded thisCmpLoaded; public CmpLoaded ThisCmpLoaded { get { return thisCmpLoaded; } set { thisCmpLoaded = value; } } public event PropertyChangedEventHandler PropertyChanged; private string _address; public string Address { get { return _address; } set { _address = value; ThisPropertyChanged("Address"); } } private string _title; public string Title { get { return _title; } set { _title = value; //Title is not shown in the BaseControl window but in the AvalonDock DockableContent title thisCmpLoaded.VisualControl.Title = _title; } } private string _statusBarContent; public string StatusBarContent { get { return _statusBarContent; } set { _statusBarContent = value; ThisPropertyChanged("StatusBarContent"); } } private Visibility _loadingStatus; public Visibility LoadingStatus { get { return _loadingStatus; } set { _loadingStatus = value; ThisPropertyChanged("LoadingStatus"); } } private Visibility _goButtonStatus; public Visibility GoButtonStatus { get { return _goButtonStatus; } set { _goButtonStatus = value; ThisPropertyChanged("GoButtonStatus"); } } private bool _canGoBack; public bool CanGoBack { get { return _canGoBack; } set { _canGoBack = value; ThisPropertyChanged("CanGoBack"); } } private bool _canGoForward; public bool CanGoForward { get { return _canGoForward; } set { _canGoForward = value; ThisPropertyChanged("CanGoForward"); } } private bool _defaultButtonStatus; public bool DefaultButtonStatus { get { return _defaultButtonStatus; } set { _defaultButtonStatus = value; ThisPropertyChanged("DefaultButtonStatus"); } } private bool _backToDefaultButtonStatus; public bool BackToDefaultButtonStatus { get { return _backToDefaultButtonStatus; } set { _backToDefaultButtonStatus = value; ThisPropertyChanged("BackToDefaultButtonStatus"); } } protected void ThisPropertyChanged(string name) { PropertyChangedEventHandler handler = PropertyChanged; if (handler != null) { handler(this, new PropertyChangedEventArgs(name)); } } } }
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)