public static DependencyProperty PositiveOpacityProperty = DependencyProperty.RegisterAttached(
"PositiveOpacity", typeof(double), typeof(IndicatorButtonExtension));
/// <summary>
/// Set an extension on a button to specify how intense the positive glow of the button should be.
/// </summary>
/// <param name="element">The element to set the property onto</param>
/// <param name="value">The value to set to.</param>
public static void SetPositiveOpacity(UIElement element, double value)
{
if (element == null)
throw new ArgumentNullException("element");
element.SetValue(PositiveOpacityProperty, value);
}
public static double GetPositiveOpacity(UIElement element)
{
if (element == null)
throw new ArgumentNullException("element");
return (double)element.GetValue(PositiveOpacityProperty);
}
public static readonly DependencyProperty BackgroundProperty =
DependencyProperty.Register("Background", typeof (Brush), typeof (BalloonDecorator));
public Brush Background
{
get { return (Brush) GetValue(BackgroundProperty); }
set { SetValue(BackgroundProperty, value); }
}