public override void OnApplyTemplate() { base.OnApplyTemplate(); this._rotatableControl = this.GetTemplateChild("RotatableControl") as RotatableControl; this.UpdateActuialEffect(this.Effect); this.UpdateActuialOpacity(new double?(this.Opacity)); }
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; }
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; }
public override void OnApplyTemplate() { base.OnApplyTemplate(); this._rotatableControl = this.GetTemplateChild("RotatableControl") as RotatableControl; this.UpdateActualContent(); }