C# Class Microsoft.Silverlight.Testing.Controls.GridSplitter

Inheritance: System.Windows.Controls.Control
ファイルを表示 Open project: garyjohnson/wpnest Class Usage Examples

Public Properties

Property Type Description
PreviewStyleProperty System.Windows.DependencyProperty
ShowsPreviewProperty System.Windows.DependencyProperty

Private Properties

Property Type Description
CancelResize void
ChangeVisualState void
ChangeVisualState void
CreatePreviewLayer void
DragValidator_DragCompletedEvent void
DragValidator_DragDeltaEvent void
DragValidator_DragStartedEvent void
GetActualLength double
GetDeltaConstraints double[]
GetEffectiveResizeBehavior GridResizeBehavior
GetEffectiveResizeDirection GridResizeDirection
GetGridDefinition DefinitionAbstraction
GridSplitter_KeyDown void
InitializeAndMoveSplitter bool
InitializeData void
IsStar bool
KeyboardMoveSplitter bool
MoveSplitter void
OnIsEnabledChanged void
RemovePreviewControl void
SetDefinitionLength void
SetLengths void
SetupDefinitionsToResize bool
SetupPreview void
UpdateTemplateOrientation void

Public Methods

Method Description
GridSplitter ( ) : System

Initializes a new instance of the T:Microsoft.Silverlight.Testing.Controls.GridSplitter class.

OnApplyTemplate ( ) : void

Builds the visual tree for the T:Microsoft.Silverlight.Testing.Controls.GridSplitter control when a new template is applied.

Protected Methods

Method Description
OnCreateAutomationPeer ( ) : System.Windows.Automation.Peers.AutomationPeer

Returns a T:System.Windows.Automation.Peers.GridSplitterAutomationPeer for use by the Silverlight automation infrastructure.

Private Methods

Method Description
CancelResize ( ) : void

Cancel the resize operation in progress.

ChangeVisualState ( ) : void

Method to change the visual state of the control.

ChangeVisualState ( bool useTransitions ) : void

Change to the correct visual state for the GridSplitter.

CreatePreviewLayer ( Grid parentGrid ) : void

Creates the preview layer and adds it to the parent grid.

DragValidator_DragCompletedEvent ( object sender, System.Windows.Controls.Primitives.DragCompletedEventArgs e ) : void

Handle the drag completed event to commit or cancel the resize operation in progress.

DragValidator_DragDeltaEvent ( object sender, System.Windows.Controls.Primitives.DragDeltaEventArgs e ) : void

Handle the drag delta event to update the UI for the resize operation in progress.

DragValidator_DragStartedEvent ( object sender, System.Windows.Controls.Primitives.DragStartedEventArgs e ) : void

Handle the drag started event to start a resize operation if the control is enabled.

GetActualLength ( DefinitionAbstraction definition ) : double

Get the actual length of the given definition.

GetDeltaConstraints ( ) : double[]

Determine the max and min that the two definitions can be resized.

GetEffectiveResizeBehavior ( GridResizeDirection direction ) : GridResizeBehavior

Determine the resize behavior based on the given direction and alignment.

GetEffectiveResizeDirection ( ) : GridResizeDirection

Determine the resize direction based on the horizontal and vertical alignments.

GetGridDefinition ( Grid grid, int index, GridResizeDirection direction ) : DefinitionAbstraction

Create a DefinitionAbstraction instance for the given row or column index in the grid.

GridSplitter_KeyDown ( object sender, System.Windows.Input.KeyEventArgs e ) : void

Handle the key down event to allow keyboard resizing or canceling a resize operation.

InitializeAndMoveSplitter ( double horizontalChange, double verticalChange ) : bool

Initialize the resize data and move the splitter by the specified amount.

InitializeData ( bool showsPreview ) : void

Initialize the resizeData object to hold the information for the resize operation in progress.

IsStar ( DefinitionAbstraction definition ) : bool

Determine if the given definition has its size set to the "*" value.

KeyboardMoveSplitter ( double horizontalChange, double verticalChange ) : bool

Called by keyboard event handler to move the splitter if allowed.

MoveSplitter ( double horizontalChange, double verticalChange ) : void

Move the splitter and resize the affected columns or rows.

Only one of horizontalChange or verticalChange will be non-zero.

OnIsEnabledChanged ( object sender, System.Windows.DependencyPropertyChangedEventArgs e ) : void

Called when the IsEnabled property changes.

RemovePreviewControl ( ) : void

Remove the preview control from the preview layer if it exists.

SetDefinitionLength ( DefinitionAbstraction definition, GridLength length ) : void

Set the height/width of the given row/column.

SetLengths ( double definition1Pixels, double definition2Pixels ) : void

Set the lengths of the two definitions depending on the split behavior.

SetupDefinitionsToResize ( ) : bool

Determine which adjacent column or row definitions need to be included in the resize operation and set up resizeData accordingly.

SetupPreview ( ) : void

Add the preview layer to the Grid if it is not there already and then show the preview control.

UpdateTemplateOrientation ( ) : void

This code will run whenever the effective resize direction changes, to update the template being used to display this control.

Method Details

GridSplitter() public method

Initializes a new instance of the T:Microsoft.Silverlight.Testing.Controls.GridSplitter class.
public GridSplitter ( ) : System
return System

OnApplyTemplate() public method

Builds the visual tree for the T:Microsoft.Silverlight.Testing.Controls.GridSplitter control when a new template is applied.
public OnApplyTemplate ( ) : void
return void

OnCreateAutomationPeer() protected method

Returns a T:System.Windows.Automation.Peers.GridSplitterAutomationPeer for use by the Silverlight automation infrastructure.
protected OnCreateAutomationPeer ( ) : System.Windows.Automation.Peers.AutomationPeer
return System.Windows.Automation.Peers.AutomationPeer

Property Details

PreviewStyleProperty public_oe static_oe property

Identifies the P:Microsoft.Silverlight.Testing.Controls.GridSplitter.PreviewStyle dependency property.
public static DependencyProperty,System.Windows PreviewStyleProperty
return System.Windows.DependencyProperty

ShowsPreviewProperty public_oe static_oe property

Identifies the P:Microsoft.Silverlight.Testing.Controls.GridSplitter.ShowsPreview dependency property.
public static DependencyProperty,System.Windows ShowsPreviewProperty
return System.Windows.DependencyProperty