Create a control in Resources and reuse it in XAML WPF

后端 未结 3 1486
遥遥无期
遥遥无期 2020-12-14 07:34

I just try to create a simple Symbol/Geometry/Control and change and reuse it in several places in the same window.

Example: a black square with a circle in the midd

3条回答
  •  攒了一身酷
    2020-12-14 07:56

    You can use C# code by heritage:

    public class customBottum : Buttom
    {
            int var1;
            bool var2;
    
            public customBottum()
            {
                InitializeComponent();
            }
    
            other function ...
    }
    

提交回复
热议问题