Пример #1
0
 public override void OnApplyTemplate()
 {
     _itemsGrid    = this.GetTemplateChild("PART_ItemsGrid") as Grid;
     _expanderGrid = this.GetTemplateChild("PART_ExpanderGrid") as Panel;
     _centerButton = this.GetTemplateChild("PART_CenterButton") as RadialImageButton;
     if (_centerButton != null)
     {
         _centerButton.Click += this.OnCenterButtonClick;
     }
     this.AddItems();
 }
Пример #2
0
 public override void OnApplyTemplate()
 {
     _toolTip       = this.GetTemplateChild("PART_ToolTip") as Label;
     _pointsPanel   = this.GetTemplateChild("PART_PointsPanel") as Panel;
     _labelsPanel   = this.GetTemplateChild("PART_LabelsPanel") as Panel;
     _indicator     = this.GetTemplateChild("PART_Indicator") as Arc;
     _valueLine     = this.GetTemplateChild("PART_ValueLine") as Line;
     _indicatorLine = this.GetTemplateChild("PART_IndicatorLine") as Line;
     _innerCircle   = this.GetTemplateChild("PART_InnerCircle") as Ellipse;
     _outerCircle   = this.GetTemplateChild("PART_OuterCircle") as Ellipse;
     _centerButton  = this.GetTemplateChild("PART_CenterButton") as RadialImageButton;
     if (_innerCircle != null)
     {
         _innerCircle.MouseMove += this.OnMouseMove;
     }
     if (_outerCircle != null)
     {
         _outerCircle.MouseMove += this.OnMouseMove;
     }
     if (_centerButton != null)
     {
         _centerButton.Click += this.OnCenterButtonClick;
     }
 }
Пример #3
0
 protected override void OnApplyTemplate()
 {
     _toolTip = this.GetTemplateChild("PART_ToolTip") as ToolTip;
     _pointsPanel = this.GetTemplateChild("PART_PointsPanel") as Panel;
     _labelsPanel = this.GetTemplateChild("PART_LabelsPanel") as Panel;
     _indicator = this.GetTemplateChild("PART_Indicator") as Arc;
     _valueLine = this.GetTemplateChild("PART_ValueLine") as Line;
     _indicatorLine = this.GetTemplateChild("PART_IndicatorLine") as Line;
     _innerCircle = this.GetTemplateChild("PART_InnerCircle") as Ellipse;
     _outerCircle = this.GetTemplateChild("PART_OuterCircle") as Ellipse;
     _centerButton = this.GetTemplateChild("PART_CenterButton") as RadialImageButton;
     if (_innerCircle != null)
     {
         _innerCircle.PointerMoved += this.OnPointerMoved;
     }
     if (_outerCircle != null)
     {
         _outerCircle.PointerMoved += this.OnPointerMoved;
     }
     if (_centerButton != null)
     {
         _centerButton.Click += this.OnCenterButtonClick;
     }
 }