This project is read-only.
1
Vote

Can not generate xaml syntax for a "Brush" dependency property

description

I built a WPF control and there is a dependency property "MyBrush" in the control. The source code is:
    /// <summary>
    /// Gets or sets the brush for my control
    /// </summary>
    public Brush MyBrush
    {
        get { return (Brush)GetValue(MyBrushProperty); }
        set { SetValue(MyBrushProperty, value); }
    }
 
    /// <summary>
    /// Indicates the static field for my brush
    /// </summary>
    public static readonly DependencyProperty MyBrushProperty =
        DependencyProperty.Register("MyBrush", typeof(Brush), typeof(MyControl), new FrameworkPropertyMetadata(Brushes.Black, FrameworkPropertyMetadataOptions.AffectsRender));
 
I expected sandcastle can generate correct xaml usage for this property, like this:
XAML Attribute Usage
<object MyBrush="Brush" .../
or
XAML
For XAML information, see the Brush type.
 
But current result is:
XAML
You cannot set this property in XAML.

Obviously, this property can be set in XAML. The result is not correct should be a bug.
 
Thanks
-Jamebo

comments