예제 #1
0
 public override void OnApplyTemplate()
 {
     base.OnApplyTemplate();
     this._rotatableControl = this.GetTemplateChild("RotatableControl") as RotatableControl;
     this.UpdateActuialEffect(this.Effect);
     this.UpdateActuialOpacity(new double?(this.Opacity));
 }
예제 #2
0
 private void PrepareTickMark(RotatableControl item)
 {
     double num = 0.0;
     switch (this.Orientation)
     {
         case Orientation.Horizontal:
             num = this.IsInverted ? 180.0 : 0.0;
             break;
         case Orientation.Vertical:
             num = this.IsInverted ? 90.0 : -90.0;
             break;
     }
     if (((TickMark)item.Child).Position == AxisElementPosition.Inside)
         num += 180.0;
     if (item.RotationAngle == num)
         return;
     item.RotationAngle = num;
 }
예제 #3
0
 private RotatableControl CreateTickMark(bool major)
 {
     RotatableControl result = new RotatableControl();
     TickMark tickMark = new TickMark();
     tickMark.SetBinding(FrameworkElement.StyleProperty, (BindingBase)new Binding(major ? "MajorTickMarkStyle" : "MinorTickMarkStyle")
     {
         Source = (object)this.Axis
     });
     result.Child = (FrameworkElement)tickMark;
     tickMark.PositionChanged += (EventHandler)((s, e) =>
        {
        this.PrepareTickMark(result);
        XYAxisElementsPanel.SetPosition((UIElement)result, ((TickMark)s).Position);
        });
     return result;
 }
예제 #4
0
 public override void OnApplyTemplate()
 {
     base.OnApplyTemplate();
     this._rotatableControl = this.GetTemplateChild("RotatableControl") as RotatableControl;
     this.UpdateActualContent();
 }