// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#region StyleCop Suppression - generated code
using System;
using System.ComponentModel;
using System.Windows;
namespace Microsoft.Management.UI.Internal
{
///
/// A toggle button which controls is a popup is open or not.
///
[Localizability(LocalizationCategory.None)]
partial class PopupControlButton
{
//
// IsPopupOpen dependency property
//
///
/// Identifies the IsPopupOpen dependency property.
///
public static readonly DependencyProperty IsPopupOpenProperty = DependencyProperty.Register( "IsPopupOpen", typeof(bool), typeof(PopupControlButton), new FrameworkPropertyMetadata( BooleanBoxes.FalseBox, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, IsPopupOpenProperty_PropertyChanged) );
///
/// Gets or sets a value indicating whether the popup is open or not.
///
///
/// The Popup.IsOpen property should be two-way bound to this property.
///
[Bindable(true)]
[Category("Common Properties")]
[Description("Gets or sets a value indicating whether the popup is open or not.")]
[Localizability(LocalizationCategory.None)]
public bool IsPopupOpen
{
get
{
return (bool) GetValue(IsPopupOpenProperty);
}
set
{
SetValue(IsPopupOpenProperty,BooleanBoxes.Box(value));
}
}
static private void IsPopupOpenProperty_PropertyChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
{
PopupControlButton obj = (PopupControlButton) o;
obj.OnIsPopupOpenChanged( new PropertyChangedEventArgs((bool)e.OldValue, (bool)e.NewValue) );
}
///
/// Occurs when IsPopupOpen property changes.
///
public event EventHandler> IsPopupOpenChanged;
///
/// Called when IsPopupOpen property changes.
///
protected virtual void OnIsPopupOpenChanged(PropertyChangedEventArgs e)
{
OnIsPopupOpenChangedImplementation(e);
RaisePropertyChangedEvent(IsPopupOpenChanged, e);
}
partial void OnIsPopupOpenChangedImplementation(PropertyChangedEventArgs e);
///
/// Called when a property changes.
///
private void RaisePropertyChangedEvent(EventHandler> eh, PropertyChangedEventArgs e)
{
if (eh != null)
{
eh(this,e);
}
}
}
}
#endregion