System.Windows.Controls.ScrollViewer.UpdateScrollBar C# (CSharp) Méthode

UpdateScrollBar() public méthode

public UpdateScrollBar ( Orientation orientation, double value ) : void
orientation Orientation
value double
Résultat void
        void UpdateScrollBar (Orientation orientation, double value)
        {
            //bool previousReadOnlyDependencyPropertyChangesAllowed = _readOnlyDependencyPropertyChangesAllowed;
            try {
                //_readOnlyDependencyPropertyChangesAllowed = true;
                // Update relevant ScrollBar
                if (orientation == Orientation.Horizontal) {
                    SetValueImpl (HorizontalOffsetProperty, value);
                    // UIA Event
                    RaiseOffsetChanged (ScrollInfo.HorizontalOffset, AutomationOrientation.Horizontal);
                    if (ElementHorizontalScrollBar != null) {
                        // WPF's ScrollBar doesn't respond to TemplateBinding bound Value changes during the Scroll event
                        ElementHorizontalScrollBar.Value = value;
                    }
                } else {
                    SetValueImpl (VerticalOffsetProperty, value);
                    // UIA Event
                    RaiseOffsetChanged (ScrollInfo.VerticalOffset, AutomationOrientation.Vertical);
                    if (ElementVerticalScrollBar != null) {
                        // WPF's ScrollBar doesn't respond to TemplateBinding bound Value changes during the Scroll event
                        ElementVerticalScrollBar.Value = value;
                    }
                }
            } finally {
                //_readOnlyDependencyPropertyChangesAllowed = previousReadOnlyDependencyPropertyChangesAllowed; 
            }
        }