Expression Blend not showing Attached Property in Style designer

335 views Asked by At

I have an attached dependency property declared on a clr type Framework:

public static readonly DependencyProperty ShowTypeProperty =
    DependencyProperty.RegisterAttached("ShowType", typeof(ShowType), typeof(Framework),
        new PropertyMetadata(ShowType.Normal));

/// <summary>
/// Gets the ShowType property. 
/// </summary>
[AttachedPropertyBrowsableForType(typeof(Window))]
public static ShowType GetShowType(Window w)
{
    return (ShowType)w.GetValue(ShowTypeProperty);
}

/// <summary>
/// Sets the ShowType property. 
/// </summary>
public static void SetShowType(Window w, ShowType value)
{
    w.SetValue(ShowTypeProperty, value);
}

The property shows up in the designer list of properties when editing a Window, but not when editing a Syle whose TargetType is set to Window. Does anyone know, is this the "intended" behaviour for attached properties and style setters in Blend? The property can be set by hand in the Setter in xaml, so this is simply a convenience, but still, I would like to know if anyone has a solution, or simply a clarification on this behaviour.

0

There are 0 answers