示例#1
0
        private static void YValueInvalidated(DependencyObject target, DependencyPropertyChangedEventArgs e)
        {
            NavigatorRectangle navigatorRectangle = target as NavigatorRectangle;

            if (navigatorRectangle == null)
            {
                return;
            }
            navigatorRectangle.UpdateYOffset();
        }
示例#2
0
        void IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.NavigatorRectangleRoot = (NavigatorRectangle)target;
                break;

            case 2:
                this.Track = (Canvas)target;
                break;

            default:
                this._contentLoaded = true;
                break;
            }
        }
示例#3
0
        private void UpdatePropertiesFromMousePosition(Point position)
        {
            double num1 = NavigatorRectangle.ConvertToRange(position.X / this.Track.ActualWidth, this.XMinimum, this.XMaximum);
            double num2 = NavigatorRectangle.ConvertToRange(position.Y / this.Track.ActualHeight, this.YMinimum, this.YMaximum);

            if (this.XValue == num1 && this.YValue == num2)
            {
                return;
            }
            if (!this.hasChanged)
            {
                this.hasChanged = true;
                this.ExecuteCommand(this.NavigateBeginCommand);
            }
            if (this.XValue != num1)
            {
                this.XValue = num1;
            }
            if (this.YValue != num2)
            {
                this.YValue = num2;
            }
            this.ExecuteCommand(this.NavigateContinueCommand);
        }
示例#4
0
 private void UpdateYOffset()
 {
     this.YOffset = NavigatorRectangle.ConvertFromRange(this.YValue, this.YMinimum, this.YMaximum) * (this.Track != null ? this.Track.ActualHeight : 0.0);
 }
示例#5
0
 private void UpdateXOffset()
 {
     this.XOffset = NavigatorRectangle.ConvertFromRange(this.XValue, this.XMinimum, this.XMaximum) * (this.Track != null ? this.Track.ActualWidth : 0.0);
 }