Here is the code I have :
public class CustomWidget
{
public System.Drawing.Color Value
{
get { return (System.Drawing.Color)GetValue(ValueProperty); }
set { SetValue(ValueProperty, value); }
}
public static readonly DependencyProperty ValueProperty =
DependencyProperty.Register("Value", typeof(System.Drawing.Color), typeof(Color), new UIPropertyMetadata(0));
public System.Drawing.Font Valuee
{
get { return (System.Drawing.Font)GetValue(ValueeProperty); }
set { SetValue(ValueeProperty, value); }
}
public static readonly DependencyProperty ValueeProperty =
DependencyProperty.Register("Valuee", typeof(System.Drawing.Font), typeof(Font), new UIPropertyMetadata(0));
}
For the Font, I can set a default Font, there is not other way I think, but what about the Bitmap ? Do I absolutelyu have to get a Bitmap in my project that will be referenced for the default value ?
No, you can simply use
null.