C# Class Dev2.Studio.Dock.ContentPaneFactory

Class used to generate ContentPane instances based on a given source collection of items (ContainerFactoryBase.ItemsSource).
Inheritance: ContainerFactory
显示文件 Open project: Warewolf-ESB/Warewolf Class Usage Examples

Public Properties

Property Type Description
ContentPathProperty System.Windows.DependencyProperty
HeaderPathProperty System.Windows.DependencyProperty
InitializeContentPaneEvent System.Windows.RoutedEvent
PaneFactoryProperty System.Windows.DependencyProperty
RemoveItemOnCloseProperty System.Windows.DependencyProperty
TabHeaderPathProperty System.Windows.DependencyProperty

Private Properties

Property Type Description
ContentPaneFactory System
GetPaneFactory ContentPaneFactory
GetSiblingDocument ContentPane
OnPaneClosed void
OnPaneFactoryChanged void
RaiseInitializeContentPane void
SetTabName void
ViewModelDeactivated void
pane_PreviewLostKeyboardFocus void

Public Methods

Method Description
AddInitializeContentPaneHandler ( DependencyObject element, EventHandler handler ) : void

Adds a handler for the InitializeContentPane attached event

OnPaneClosing ( object sender, PaneClosingEventArgs e ) : void
RemoveInitializeContentPaneHandler ( DependencyObject element, EventHandler handler ) : void

Removes a handler for the InitializeContentPane attached event

SetPaneFactory ( DependencyObject d, ContentPaneFactory value ) : void

Sets the object that will create ContentPane instances based on the items in the associate ContainerFactoryBase.ItemsSource

Protected Methods

Method Description
AddPane ( ContentPane pane ) : void

Invoked when a new ContentPane has been created and needs to be added to the appropriate target collection.

ClearContainerForItem ( DependencyObject container, object item ) : void

Used to clear any settings applied to a container in the PrepareContainerForItem

OnItemInserted ( DependencyObject container, object item, int index ) : void

Invoked when an element for an item has been generated.

OnItemMoved ( DependencyObject container, object item, int oldIndex, int newIndex ) : void

Invoked when an item has been moved in the source collection.

OnItemRemoved ( DependencyObject container, object oldItem ) : void

Invoked when an element created for an item has been removed

PrepareContainerForItem ( DependencyObject container, object item ) : void

Used to initialize a container for a given item.

RemovePane ( ContentPane cp ) : void

Invoked when a ContentPane for a given item is being removed.

ValidateContainerType ( Type elementType ) : void

Invoked when the ContainerFactory.ContainerType is about to be changed to determine if the specified type is allowed.

Private Methods

Method Description
ContentPaneFactory ( ) : System
GetPaneFactory ( DependencyObject d ) : ContentPaneFactory
GetSiblingDocument ( ) : ContentPane
OnPaneClosed ( object sender, PaneClosedEventArgs e ) : void
OnPaneFactoryChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
RaiseInitializeContentPane ( ContentPane pane ) : void
SetTabName ( ContentPane pane, object item ) : void
ViewModelDeactivated ( object sender, DeactivationEventArgs e ) : void
pane_PreviewLostKeyboardFocus ( object sender, System.Windows.Input.KeyboardFocusChangedEventArgs e ) : void

Method Details

AddInitializeContentPaneHandler() public static method

Adds a handler for the InitializeContentPane attached event
public static AddInitializeContentPaneHandler ( DependencyObject element, EventHandler handler ) : void
element System.Windows.DependencyObject UIElement or ContentElement that listens to the event
handler EventHandler Event handler to be added
return void

AddPane() protected method

Invoked when a new ContentPane has been created and needs to be added to the appropriate target collection.
protected AddPane ( ContentPane pane ) : void
pane ContentPane The pane that was created and needs to be added to the appropriate collection
return void

ClearContainerForItem() protected method

Used to clear any settings applied to a container in the PrepareContainerForItem
protected ClearContainerForItem ( DependencyObject container, object item ) : void
container System.Windows.DependencyObject The container element
item object The item from the source collection
return void

OnItemInserted() protected final method

Invoked when an element for an item has been generated.
protected final OnItemInserted ( DependencyObject container, object item, int index ) : void
container System.Windows.DependencyObject The element that was generated
item object The underlying item for which the element has been generated
index int The index at which the item existed
return void

OnItemMoved() protected final method

Invoked when an item has been moved in the source collection.
protected final OnItemMoved ( DependencyObject container, object item, int oldIndex, int newIndex ) : void
container System.Windows.DependencyObject The associated element
item object The item that was moved
oldIndex int The old index
newIndex int The new index
return void

OnItemRemoved() protected final method

Invoked when an element created for an item has been removed
protected final OnItemRemoved ( DependencyObject container, object oldItem ) : void
container System.Windows.DependencyObject The element that has been removed
oldItem object The item associated with the element that was removed
return void

OnPaneClosing() public method

public OnPaneClosing ( object sender, PaneClosingEventArgs e ) : void
sender object
e PaneClosingEventArgs
return void

PrepareContainerForItem() protected method

Used to initialize a container for a given item.
protected PrepareContainerForItem ( DependencyObject container, object item ) : void
container System.Windows.DependencyObject The container element
item object The item from the source collection
return void

RemoveInitializeContentPaneHandler() public static method

Removes a handler for the InitializeContentPane attached event
public static RemoveInitializeContentPaneHandler ( DependencyObject element, EventHandler handler ) : void
element System.Windows.DependencyObject UIElement or ContentElement that listens to the event
handler EventHandler Event handler to be removed
return void

RemovePane() protected method

Invoked when a ContentPane for a given item is being removed.
protected RemovePane ( ContentPane cp ) : void
cp ContentPane The pane being removed
return void

SetPaneFactory() public static method

Sets the object that will create ContentPane instances based on the items in the associate ContainerFactoryBase.ItemsSource
public static SetPaneFactory ( DependencyObject d, ContentPaneFactory value ) : void
d System.Windows.DependencyObject
value ContentPaneFactory
return void

ValidateContainerType() protected final method

Invoked when the ContainerFactory.ContainerType is about to be changed to determine if the specified type is allowed.
protected final ValidateContainerType ( Type elementType ) : void
elementType System.Type The new element type
return void

Property Details

ContentPathProperty public_oe static_oe property

Identifies the ContentPath dependency property
public static DependencyProperty,System.Windows ContentPathProperty
return System.Windows.DependencyProperty

HeaderPathProperty public_oe static_oe property

Identifies the HeaderPath dependency property
public static DependencyProperty,System.Windows HeaderPathProperty
return System.Windows.DependencyProperty

InitializeContentPaneEvent public_oe static_oe property

InitializeContentPane Attached Routed Event
public static RoutedEvent,System.Windows InitializeContentPaneEvent
return System.Windows.RoutedEvent

PaneFactoryProperty public_oe static_oe property

PaneFactory Attached Dependency Property
public static DependencyProperty,System.Windows PaneFactoryProperty
return System.Windows.DependencyProperty

RemoveItemOnCloseProperty public_oe static_oe property

Identifies the RemoveItemOnClose dependency property
public static DependencyProperty,System.Windows RemoveItemOnCloseProperty
return System.Windows.DependencyProperty

TabHeaderPathProperty public_oe static_oe property

Identifies the TabHeaderPath dependency property
public static DependencyProperty,System.Windows TabHeaderPathProperty
return System.Windows.DependencyProperty