C# Class XapEditor.ScrollableTabPanel

A scrollable TabPanel control.
Inheritance: System.Windows.Controls.Panel, IScrollInfo, INotifyPropertyChanged
显示文件 Open project: net-shell/quantum-vaginer

Public Properties

Property Type Description
AnimationTimeSpanProperty System.Windows.DependencyProperty
LineScrollPixelCountProperty System.Windows.DependencyProperty
RightOverflowMarginProperty System.Windows.DependencyProperty

Public Methods

Method Description
IsPartlyVisible ( UIElement uieChild ) : bool

Determines whether the passed child control is only partially visible (i.e. whether part of it is outside of the Viewport).

LineDown ( ) : void

Increments the vertical offset.

This is unsupported.

LineLeft ( ) : void

Decrements the horizontal offset by the amount specified in the LineScrollPixelCount property.

LineRight ( ) : void

Increments the horizontal offset by the amount specified in the LineScrollPixelCount property.

LineUp ( ) : void

Decrements the vertical offset.

This is unsupported.

MakeVisible ( System visual, System rectangle ) : Rect

Scrolls a child of the panel (Visual) into view.

MouseWheelDown ( ) : void
MouseWheelLeft ( ) : void
MouseWheelRight ( ) : void
MouseWheelUp ( ) : void
PageDown ( ) : void
PageLeft ( ) : void
PageRight ( ) : void
PageUp ( ) : void
PartlyVisiblePortion_OverflowToLeft ( UIElement uieChild ) : double

Determines the visible part of the passed child control, measured between 0 (completely invisible) and 1 (completely visible), that is overflowing into the left invisible portion of the panel.

PartlyVisiblePortion_OverflowToRight ( UIElement uieChild ) : double

Determines the visible part of the passed child control, measured between 0 (completely invisible) and 1 (completely visible), that is overflowing into the right invisible portion of the panel.

ScrollableTabPanel ( ) : System
SetHorizontalOffset ( double offset ) : void
SetVerticalOffset ( double offset ) : void

Protected Methods

Method Description
ArrangeOverride ( Size finalSize ) : Size

This is the 2nd pass of the layout process, where child controls are being arranged within the panel.

MeasureOverride ( Size availableSize ) : Size

This is the 1st pass of the layout process. Here, the Extent's size is being determined.

OnChildDesiredSizeChanged ( UIElement child ) : void
OnVisualChildrenChanged ( DependencyObject visualAdded, DependencyObject visualRemoved ) : void

Private Methods

Method Description
CalculateNewScrollOffset ( double dblViewport_Left, double dblViewport_Right, double dblChild_Left, double dblChild_Right ) : double

Calculates the HorizontalOffset for a given child-control, based on a desired value.

GetChildRectangle ( UIElement uieChild ) : Rect

Returns the rectangle that defines the outer bounds of a child control.

GetIntersectionRectangle ( UIElement uieChild ) : Rect

Returns a Rectangle that contains the intersection between the ScrollViewer's and the passed child control's boundaries, that is, the portion of the child control which is currently visibile within the ScrollViewer's Viewport.

GetScrollViewerRectangle ( ) : Rect

Returns the currently rendered rectangle that makes up the Viewport.

NotifyPropertyChanged ( String strPropertyName ) : void

Called from within this class whenever subscribers (i.e. bindings) are to be notified of a property-change

RemoveOpacityMask ( UIElement uieChild ) : void

Will remove the OpacityMask for all child controls.

RemoveOpacityMasks ( ) : void

Will remove the OpacityMask for all child controls.

ScrollOwner_Loaded ( object sender, RoutedEventArgs e ) : void

Fired when the ScrollViewer is initially loaded/displayed. Required in order to initially setup the childrens' OpacityMasks.

ScrollableTabPanel_SizeChanged ( object sender, System.Windows.SizeChangedEventArgs e ) : void
UpdateMembers ( Size szExtent, Size szViewportSize ) : void

Compares the present sizes (Extent/Viewport) against the local values and updates them, if required.

UpdateOpacityMask ( UIElement uieChild ) : void

Takes the given child control and checks as to whether the control is completely visible (in the Viewport). If not (i.e. if it's only partially visible), an OpacityMask will be applied so that it fades out into nothingness.

UpdateOpacityMasks ( ) : void

Will check all child controls and set their OpacityMasks.

daScrollAnimation_Completed ( object sender, EventArgs e ) : void

Fired when the scroll-animation has finished its work, that is, at the point in time when the ScrollViewerer has reached its final scroll-position resp. offset, which is when the childrens' OpacityMasks can be updated.

getLeftEdge ( UIElement uieChild ) : double

Returns the left position of the requested child (in Viewport-coordinates).

Method Details

ArrangeOverride() protected method

This is the 2nd pass of the layout process, where child controls are being arranged within the panel.
protected ArrangeOverride ( Size finalSize ) : Size
finalSize System.Windows.Size The Viewport's rectangle, as obtained after the 1st pass (MeasureOverride).
return System.Windows.Size

IsPartlyVisible() public method

Determines whether the passed child control is only partially visible (i.e. whether part of it is outside of the Viewport).
public IsPartlyVisible ( UIElement uieChild ) : bool
uieChild UIElement The child control to be tested.
return bool

LineDown() public method

Increments the vertical offset.
This is unsupported.
public LineDown ( ) : void
return void

LineLeft() public method

Decrements the horizontal offset by the amount specified in the LineScrollPixelCount property.
public LineLeft ( ) : void
return void

LineRight() public method

Increments the horizontal offset by the amount specified in the LineScrollPixelCount property.
public LineRight ( ) : void
return void

LineUp() public method

Decrements the vertical offset.
This is unsupported.
public LineUp ( ) : void
return void

MakeVisible() public method

Scrolls a child of the panel (Visual) into view.
public MakeVisible ( System visual, System rectangle ) : Rect
visual System
rectangle System
return System.Windows.Rect

MeasureOverride() protected method

This is the 1st pass of the layout process. Here, the Extent's size is being determined.
protected MeasureOverride ( Size availableSize ) : Size
availableSize System.Windows.Size The Viewport's rectangle, as obtained after the 1st pass (MeasureOverride).
return System.Windows.Size

MouseWheelDown() public method

public MouseWheelDown ( ) : void
return void

MouseWheelLeft() public method

public MouseWheelLeft ( ) : void
return void

MouseWheelRight() public method

public MouseWheelRight ( ) : void
return void

MouseWheelUp() public method

public MouseWheelUp ( ) : void
return void

OnChildDesiredSizeChanged() protected method

protected OnChildDesiredSizeChanged ( UIElement child ) : void
child UIElement
return void

OnVisualChildrenChanged() protected method

protected OnVisualChildrenChanged ( DependencyObject visualAdded, DependencyObject visualRemoved ) : void
visualAdded System.Windows.DependencyObject
visualRemoved System.Windows.DependencyObject
return void

PageDown() public method

public PageDown ( ) : void
return void

PageLeft() public method

public PageLeft ( ) : void
return void

PageRight() public method

public PageRight ( ) : void
return void

PageUp() public method

public PageUp ( ) : void
return void

PartlyVisiblePortion_OverflowToLeft() public method

Determines the visible part of the passed child control, measured between 0 (completely invisible) and 1 (completely visible), that is overflowing into the left invisible portion of the panel.
public PartlyVisiblePortion_OverflowToLeft ( UIElement uieChild ) : double
uieChild UIElement The child control to be tested.
return double

PartlyVisiblePortion_OverflowToRight() public method

Determines the visible part of the passed child control, measured between 0 (completely invisible) and 1 (completely visible), that is overflowing into the right invisible portion of the panel.
public PartlyVisiblePortion_OverflowToRight ( UIElement uieChild ) : double
uieChild UIElement The child control to be tested.
return double

ScrollableTabPanel() public method

public ScrollableTabPanel ( ) : System
return System

SetHorizontalOffset() public method

public SetHorizontalOffset ( double offset ) : void
offset double
return void

SetVerticalOffset() public method

public SetVerticalOffset ( double offset ) : void
offset double
return void

Property Details

AnimationTimeSpanProperty public_oe static_oe property

public static DependencyProperty,System.Windows AnimationTimeSpanProperty
return System.Windows.DependencyProperty

LineScrollPixelCountProperty public_oe static_oe property

public static DependencyProperty,System.Windows LineScrollPixelCountProperty
return System.Windows.DependencyProperty

RightOverflowMarginProperty public_oe static_oe property

public static DependencyProperty,System.Windows RightOverflowMarginProperty
return System.Windows.DependencyProperty