• 前言

    Windows Phone为开发者提供了很多原生控件,但在很多场景下我们需要对默认的功能或样式做一定的修改才能满足我们的需求,自定义控件应运而生。本文通过以自定义控件进度环(ProgressRing)为例,向大家介绍Windows Phone中如何创建和使用自定义控件。

     1、控件基类

     通常自定义控件继承自ControlItemsControlContentControl等。

     Control:代表使用ControlTemplate来定义样式的UI控件的基类。

System.Object
  System.Windows.DependencyObject
    System.Windows.UIElement
      System.Windows.FrameworkElement
        System.Windows.Controls.Control
View Code

相关文章: