Adding Properties to Custom WPF Control?

后端 未结 1 479
南方客
南方客 2021-01-04 12:06

I just started WPF this morning so this is (hopefully) an easy question to solve. I\'ve started with creating a button that has a gradient background. I want to declare th

1条回答
  •  一整个雨季
    2021-01-04 12:43

    I figured it out... This:

    static DependencyProperty GradientStartProperty; 
    static DependencyProperty GradientEndProperty;
    

    Needed to be changed to this:

    public static DependencyProperty GradientStartProperty; 
    public static DependencyProperty GradientEndProperty;
    

    0 讨论(0)
提交回复
热议问题