In This Article

NavigationPane Class

Represents a pane for a NavigationBar control.

public class NavigationPane : UIContainerControl, IUIControl, IUIElement, ILogicalTreeNode, IDpiAwareElement, IDisposable, IImageListProvider
Inheritance:
object MarshalByRefObject Component Control ScrollableControl ContainerControl UIContainerControl object
Implements:
IUIControl IUIElement ILogicalTreeNode IDpiAwareElement IDisposable IImageListProvider

Constructors

NavigationPane()

Initializes an instance of the class.

public NavigationPane()

NavigationPane(string?, string, Image, Image)

Initializes an instance of the class.

public NavigationPane(string? key, string text, Image largeImage, Image smallImage)
Parameter Type Description
key string

A string-based key that identifies an object within its parent collection.

text string

The text caption.

largeImage Image

The large Image.

smallImage Image

The small Image.

NavigationPane(string?, string, int)

Initializes an instance of the class.

public NavigationPane(string? key, string text, int imageIndex)
Parameter Type Description
key string

A string-based key that identifies an object within its parent collection.

text string

The text caption.

imageIndex int

The index of an image within an ImageList.

Properties

Active

Indicates whether the pane is visible.

public bool Active { get; set; }

Property Value

bool:

true if the pane is visible; otherwise, false. The default value is true.

Anchor

Gets or sets the edges of the container to which a control is bound and determines how a control is resized with its parent.

[Browsable(false)]
public override AnchorStyles Anchor { get; set; }

Property Value

AnchorStyles:

A bitwise combination of the AnchorStyles values. The default is Top and Left.

BackgroundFill

The pane-specific BackgroundFill for the navigation pane.

public BackgroundFill? BackgroundFill { get; set; }

Property Value

BackgroundFill

ButtonBackgroundFill

The pane-specific BackgroundFill for a navigation pane button.

public BackgroundFill? ButtonBackgroundFill { get; set; }

Property Value

BackgroundFill

ButtonDisabledForeColor

The pane-specific foreground color of a disabled navigation pane button.

public Color ButtonDisabledForeColor { get; set; }

Property Value

Color

ButtonFont

The pane-specific Font to use when drawing a NavigationPaneButton.

public virtual Font? ButtonFont { get; set; }

Property Value

Font

ButtonForeColor

The pane-specific foreground color of a navigation pane button.

public Color ButtonForeColor { get; set; }

Property Value

Color

ButtonHotBackgroundFill

The pane-specific BackgroundFill for a navigation pane button in a hot state.

public BackgroundFill? ButtonHotBackgroundFill { get; set; }

Property Value

BackgroundFill

ButtonHotPressedBackgroundFill

The pane-specific BackgroundFill for a navigation pane button in a hot/pressed state.

public BackgroundFill? ButtonHotPressedBackgroundFill { get; set; }

Property Value

BackgroundFill

ButtonLocation

A NavigationPaneButtonLocation indicating the current location of the pane.

[Browsable(false)]
public NavigationPaneButtonLocation ButtonLocation { get; }

Property Value

NavigationPaneButtonLocation

ButtonPressedBackgroundFill

The pane-specific BackgroundFill for a navigation pane button in a pressed state.

public BackgroundFill? ButtonPressedBackgroundFill { get; set; }

Property Value

BackgroundFill

DefaultActive

The default value for the Active property that is set whenever the Reset button is pressed in the Navigation Bar Options form.

public bool DefaultActive { get; set; }

Property Value

bool:

true if the Active property should be set by default; otherwise, false.

DefaultSortOrder

The default sort order for the pane whenever the Reset button is pressed in the Navigation Bar Options form.

public int DefaultSortOrder { get; set; }

Property Value

int

Dock

Gets or sets which control borders are docked to its parent control and determines how a control is resized with its parent.

[Browsable(false)]
public override DockStyle Dock { get; set; }

Property Value

DockStyle:

One of the DockStyle values. The default is None.

Exceptions

Type Condition
InvalidEnumArgumentException

The value assigned is not one of the DockStyle values.

ImageIndex

The index of an image within an ImageList that is displayed on the pane.

[ImageIndex]
[TypeConverter(typeof(ImageIndexConverter))]
public int ImageIndex { get; set; }

Property Value

int:

The default value is -1.

IsSelected

Indicates whether the pane is selected.

[Browsable(false)]
public bool IsSelected { get; }

Property Value

bool:

true if the pane is selected; otherwise, false.

Key

A string-based key that identifies an object within its parent collection.

public string? Key { get; set; }

Property Value

string

LargeImage

The large image that is displayed on the pane.

public Image? LargeImage { get; set; }

Property Value

Image:

The default value is null.

NavigationBar

The NavigationBar, if any, that contains the pane.

[Browsable(false)]
public NavigationBar? NavigationBar { get; }

Property Value

NavigationBar

SmallImage

The small image that is displayed on the pane.

public Image? SmallImage { get; set; }

Property Value

Image:

The default value is null.

TabIndex

Gets or sets the tab order of the control within its container.

[Browsable(false)]
public int TabIndex { get; set; }

Property Value

int:

The index value of the control within the set of controls within its container. The controls in the container are included in the tab order.

TabStop

Gets or sets a value indicating whether the user can give the focus to this control using the TAB key.

[Browsable(false)]
public bool TabStop { get; set; }

Property Value

bool:
    <code>true</code> if the user can give the focus to the control using the TAB key; otherwise, <code>false</code>. The default is <code>true</code>.

Note: This property will always return true for an instance of the Form class.

Text

Gets or sets the text associated with this control.

public override string Text { get; set; }

Property Value

string:

The text associated with this control.

UseControlGraphicsForMeasure

Indicates whether to use a call to the control's CreateGraphics method to obtain the Graphics used for measure routines.

protected override bool UseControlGraphicsForMeasure { get; }

Property Value

bool:

true if the control's CreateGraphics method should be called; otherwise, false. The default value is true.

UseExtendedDoubleBuffering

Indicates whether to use extended double buffering for rendering.

protected override bool UseExtendedDoubleBuffering { get; }

Property Value

bool:

true if extended double buffering should be used; otherwise, false.

Visible

Gets or sets a value indicating whether the control and all its child controls are displayed.

[Browsable(false)]
public bool Visible { get; set; }

Property Value

bool:

true to display the control and its child controls; otherwise, false. The default is true. When getting the value, true is returned only if the control is visible and the parent control, if it exists, is visible.

Methods

CreateControlsInstance()

Creates a new instance of the control collection for the control.

protected override Control.ControlCollection CreateControlsInstance()

Returns

Control.ControlCollection:

A new instance of Control.ControlCollection assigned to the control.

GetLargeImage()

Returns the large Image associated with the pane.

public Image? GetLargeImage()

Returns

Image

Remarks

If an image has been set to the LargeImage property, that will be returned. Otherwise, the ImageIndex property will be used to find an image in a parent ImageList.

GetSmallImage()

Returns the small Image associated with the pane.

public Image? GetSmallImage()

Returns

Image

Remarks

If an image has been set to the SmallImage property, that will be returned. Otherwise, the ImageIndex property will be used to find an image in a parent ImageList.

OnRender(PaintEventArgs)

Renders the element.

protected override void OnRender(PaintEventArgs e)
Parameter Type Description
e PaintEventArgs

The event data.

ResetBackgroundFill()

Resets the BackgroundFill property to its default value.

public virtual void ResetBackgroundFill()

ResetButtonBackgroundFill()

Resets the ButtonBackgroundFill property to its default value.

public virtual void ResetButtonBackgroundFill()

ResetButtonDisabledForeColor()

Resets the ButtonDisabledForeColor property to its default value.

public virtual void ResetButtonDisabledForeColor()

ResetButtonFont()

Resets the ButtonFont property to its default value.

public virtual void ResetButtonFont()

ResetButtonForeColor()

Resets the ButtonForeColor property to its default value.

public virtual void ResetButtonForeColor()

ResetButtonHotBackgroundFill()

Resets the ButtonHotBackgroundFill property to its default value.

public virtual void ResetButtonHotBackgroundFill()

ResetButtonHotPressedBackgroundFill()

Resets the ButtonHotPressedBackgroundFill property to its default value.

public virtual void ResetButtonHotPressedBackgroundFill()

ResetButtonPressedBackgroundFill()

Resets the ButtonPressedBackgroundFill property to its default value.

public virtual void ResetButtonPressedBackgroundFill()

ShouldSerializeBackgroundFill()

Indicates whether the BackgroundFill property should be persisted.

public virtual bool ShouldSerializeBackgroundFill()

Returns

bool:

true if the property value has changed from its default; otherwise, false.

ShouldSerializeButtonBackgroundFill()

Indicates whether the ButtonBackgroundFill property should be persisted.

public virtual bool ShouldSerializeButtonBackgroundFill()

Returns

bool:

true if the property value has changed from its default; otherwise, false.

ShouldSerializeButtonDisabledForeColor()

Indicates whether the ButtonDisabledForeColor property should be persisted.

public virtual bool ShouldSerializeButtonDisabledForeColor()

Returns

bool:

true if the property value has changed from its default; otherwise, false.

ShouldSerializeButtonFont()

Indicates whether the ButtonFont property should be persisted.

public virtual bool ShouldSerializeButtonFont()

Returns

bool:

true if the property value has changed from its default; otherwise, false.

ShouldSerializeButtonForeColor()

Indicates whether the ButtonForeColor property should be persisted.

public virtual bool ShouldSerializeButtonForeColor()

Returns

bool:

true if the property value has changed from its default; otherwise, false.

ShouldSerializeButtonHotBackgroundFill()

Indicates whether the ButtonHotBackgroundFill property should be persisted.

public virtual bool ShouldSerializeButtonHotBackgroundFill()

Returns

bool:

true if the property value has changed from its default; otherwise, false.

ShouldSerializeButtonHotPressedBackgroundFill()

Indicates whether the ButtonHotPressedBackgroundFill property should be persisted.

public virtual bool ShouldSerializeButtonHotPressedBackgroundFill()

Returns

bool:

true if the property value has changed from its default; otherwise, false.

ShouldSerializeButtonPressedBackgroundFill()

Indicates whether the ButtonPressedBackgroundFill property should be persisted.

public virtual bool ShouldSerializeButtonPressedBackgroundFill()

Returns

bool:

true if the property value has changed from its default; otherwise, false.

Inherited Members

Extension Methods