CKnig wrote:
FrameworkPropertyMetadata metaBrush= new FrameworkPropertyMetadata( Brushes.Blue, FrameworkPropertyMetadataOptions.None); SolidBrushProperty = DependencyProperty.Register("SolidBrush", typeof(SolidColorBrush), typeof(UserControl1), metaBrush); (I normaly define this in the static constructor of the class) As you can see the only difference is the use of the initialised (Blue brush) FrameworkPropertyMetadata instead of a empty UIPropertyMetadata. The rest looks fine to me.
I did that last night, the control works great. Thanks for the help. Shawn