In This Article

OfficeLunaNavigationBarRenderer Class

Provides a renderer for the NavigationBar control for Office classic that has a luna color scheme.

[TypeConverter(typeof(OfficeLunaNavigationBarRendererConverter))]
public class OfficeLunaNavigationBarRenderer : NavigationBarRenderer, IDisposable, INavigationBarRenderer, IUIRenderer
Inheritance:
object MarshalByRefObject DisposableObject UIRenderer NavigationBarRenderer object
Derived:
MetroNavigationBarRenderer OfficeClassicNavigationBarRenderer
Implements:
IDisposable INavigationBarRenderer IUIRenderer

Constructors

OfficeLunaNavigationBarRenderer()

Initializes a new instance of the class.

public OfficeLunaNavigationBarRenderer()

Remarks

The default constructor initializes all fields to their default values.

OfficeLunaNavigationBarRenderer(IWindowsColorScheme)

Initializes a new instance of the class.

public OfficeLunaNavigationBarRenderer(IWindowsColorScheme colorScheme)
Parameter Type Description
colorScheme IWindowsColorScheme

The IWindowsColorScheme to use as a base for the colors.

OfficeLunaNavigationBarRenderer(WindowsColorSchemeType)

Initializes a new instance of the class.

public OfficeLunaNavigationBarRenderer(WindowsColorSchemeType colorSchemeType)
Parameter Type Description
colorSchemeType WindowsColorSchemeType

The WindowsColorSchemeType to use as a base for the colors.

Properties

BaseColorSchemeType

Gets or sets the WindowsColorSchemeType to use as a base for the colors.

public WindowsColorSchemeType BaseColorSchemeType { get; set; }

Property Value

WindowsColorSchemeType:

The WindowsColorSchemeType to use as a base for the colors.

NavigationBarBorder

Gets or sets the Border for a navigation bar.

public Border NavigationBarBorder { get; set; }

Property Value

Border:

The Border for a navigation bar.

NavigationBarHeaderBackgroundFill

Gets or sets the BackgroundFill for the header of a NavigationBar.

public BackgroundFill NavigationBarHeaderBackgroundFill { get; set; }

Property Value

BackgroundFill:

The BackgroundFill for the header of a NavigationBar.

NavigationBarHeaderFont

Gets or sets the Font to use when drawing the headers of a NavigationBar.

public virtual Font NavigationBarHeaderFont { get; set; }

Property Value

Font:

The Font to use when drawing the headers of a NavigationBar.

NavigationBarHeaderForeColor

Gets or sets the foreground color of the header of a NavigationBar.

public Color NavigationBarHeaderForeColor { get; set; }

Property Value

Color:

A Color object specifying the foreground color of the header of a NavigationBar.

NavigationBarHeaderPadding

Gets or sets the padding to use when drawing the headers of a NavigationBar.

public virtual int NavigationBarHeaderPadding { get; set; }

Property Value

int:

The padding to use when drawing the headers of a NavigationBar.

NavigationBarPanelBackgroundFill

Gets or sets the BackgroundFill for a NavigationBarPanel.

public BackgroundFill NavigationBarPanelBackgroundFill { get; set; }

Property Value

BackgroundFill:

The BackgroundFill for a NavigationBarPanel.

NavigationBarSplitterBackgroundFill

Gets or sets the BackgroundFill for a navigation bar splitter.

public BackgroundFill NavigationBarSplitterBackgroundFill { get; set; }

Property Value

BackgroundFill:

The BackgroundFill for a navigation bar splitter.

NavigationBarSplitterDecorationBackBackgroundFill

Gets or sets the BackgroundFill for a background navigation bar splitter decoration.

public BackgroundFill NavigationBarSplitterDecorationBackBackgroundFill { get; set; }

Property Value

BackgroundFill:

The BackgroundFill for a background navigation bar splitter decoration.

NavigationBarSplitterDecorationForeBackgroundFill

Gets or sets the BackgroundFill for a foreground navigation bar splitter decoration.

public BackgroundFill NavigationBarSplitterDecorationForeBackgroundFill { get; set; }

Property Value

BackgroundFill:

The BackgroundFill for a foreground navigation bar splitter decoration.

NavigationBarSubHeaderBackgroundFill

Gets or sets the BackgroundFill for sub-headers of a NavigationBar.

public BackgroundFill NavigationBarSubHeaderBackgroundFill { get; set; }

Property Value

BackgroundFill:

The BackgroundFill for sub-headers of a NavigationBar.

NavigationBarSubHeaderFont

Gets or sets the Font to use when drawing the sub-headers of a NavigationBar.

public virtual Font NavigationBarSubHeaderFont { get; set; }

Property Value

Font:

The Font to use when drawing the sub-headers of a NavigationBar.

NavigationBarSubHeaderForeColor

Gets or sets the foreground color of the sub-headers of a NavigationBar

public Color NavigationBarSubHeaderForeColor { get; set; }

Property Value

Color:

A Color object specifying the foreground color of the sub-headers of a NavigationBar.

NavigationBarSubHeaderPadding

Gets or sets the padding to use when drawing the sub-headers of a NavigationBar.

public virtual int NavigationBarSubHeaderPadding { get; set; }

Property Value

int:

The padding to use when drawing the sub-headers of a NavigationBar.

NavigationPaneDefaultBackgroundFill

Gets or sets the BackgroundFill for a navigation pane.

public BackgroundFill NavigationPaneDefaultBackgroundFill { get; set; }

Property Value

BackgroundFill:

The BackgroundFill for a navigation pane.

NavigationPaneDefaultButtonBackgroundFill

Gets or sets the BackgroundFill for a navigation pane button.

public BackgroundFill NavigationPaneDefaultButtonBackgroundFill { get; set; }

Property Value

BackgroundFill:

The BackgroundFill for a navigation pane button.

NavigationPaneDefaultButtonDisabledForeColor

Gets or sets the foreground color of a disabled navigation pane button.

public Color NavigationPaneDefaultButtonDisabledForeColor { get; set; }

Property Value

Color:

A Color object specifying the foreground color of a disabled navigation pane button.

NavigationPaneDefaultButtonFont

Gets or sets the Font to use when drawing a NavigationPaneButton.

public virtual Font NavigationPaneDefaultButtonFont { get; set; }

Property Value

Font:

The Font to use when drawing a NavigationPaneButton.

NavigationPaneDefaultButtonForeColor

Gets or sets the foreground color of a navigation pane button.

public Color NavigationPaneDefaultButtonForeColor { get; set; }

Property Value

Color:

A Color object specifying the foreground color of a navigation pane button.

NavigationPaneDefaultButtonHotBackgroundFill

Gets or sets the BackgroundFill for a navigation pane button in a hot state.

public BackgroundFill NavigationPaneDefaultButtonHotBackgroundFill { get; set; }

Property Value

BackgroundFill:

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

NavigationPaneDefaultButtonHotPressedBackgroundFill

Gets or sets the BackgroundFill for a navigation pane button in a hot pressed state.

public BackgroundFill NavigationPaneDefaultButtonHotPressedBackgroundFill { get; set; }

Property Value

BackgroundFill:

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

NavigationPaneDefaultButtonPressedBackgroundFill

Gets or sets the BackgroundFill for a navigation pane button in a pressed state.

public BackgroundFill NavigationPaneDefaultButtonPressedBackgroundFill { get; set; }

Property Value

BackgroundFill:

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

Methods

Dispose(bool)

Disposes any resources used by the object.

protected override void Dispose(bool disposing)
Parameter Type Description
disposing bool

Whether the object is being disposed.

DrawNavigationBarBackground(PaintEventArgs, Rectangle, NavigationBar)

Draws the background of a NavigationBar control.

public override void DrawNavigationBarBackground(PaintEventArgs e, Rectangle bounds, NavigationBar navigationBar)
Parameter Type Description
e PaintEventArgs

A PaintEventArgs that contains the event data.

bounds Rectangle

The bounds in which to draw.

navigationBar NavigationBar

The NavigationBar being painted.

DrawNavigationBarHeader(PaintEventArgs, Rectangle, NavigationBar)

Draws the header of a NavigationBar control.

public override void DrawNavigationBarHeader(PaintEventArgs e, Rectangle bounds, NavigationBar navigationBar)
Parameter Type Description
e PaintEventArgs

A PaintEventArgs that contains the event data.

bounds Rectangle

The bounds in which to draw.

navigationBar NavigationBar

The NavigationBar being painted.

DrawNavigationBarHeader(PaintEventArgs, Rectangle, NavigationBarPanel)

Draws the header of a NavigationBarPanel control.

public override void DrawNavigationBarHeader(PaintEventArgs e, Rectangle bounds, NavigationBarPanel navigationBarPanel)
Parameter Type Description
e PaintEventArgs

A PaintEventArgs that contains the event data.

bounds Rectangle

The bounds in which to draw.

navigationBarPanel NavigationBarPanel

The NavigationBarPanel being painted.

DrawNavigationBarOverflowArea(PaintEventArgs, Rectangle, NavigationBar)

Draws the overflow area of a NavigationBar control.

public override void DrawNavigationBarOverflowArea(PaintEventArgs e, Rectangle bounds, NavigationBar navigationBar)
Parameter Type Description
e PaintEventArgs

A PaintEventArgs that contains the event data.

bounds Rectangle

The bounds in which to draw.

navigationBar NavigationBar

The NavigationBar being painted.

DrawNavigationBarOverflowMenuButton(PaintEventArgs, Rectangle, NavigationBarOverflowMenuButton)

Draws the overflow menu button of a NavigationBar control.

public override void DrawNavigationBarOverflowMenuButton(PaintEventArgs e, Rectangle bounds, NavigationBarOverflowMenuButton menuButton)
Parameter Type Description
e PaintEventArgs

A PaintEventArgs that contains the event data.

bounds Rectangle

The bounds in which to draw.

menuButton NavigationBarOverflowMenuButton

The NavigationBarOverflowMenuButton being painted.

DrawNavigationBarPanelBackground(PaintEventArgs, Rectangle, NavigationBarPanel)

Draws the background of a NavigationBarPanel control.

public override void DrawNavigationBarPanelBackground(PaintEventArgs e, Rectangle bounds, NavigationBarPanel navigationBarPanel)
Parameter Type Description
e PaintEventArgs

A PaintEventArgs that contains the event data.

bounds Rectangle

The bounds in which to draw.

navigationBarPanel NavigationBarPanel

The NavigationBarPanel being painted.

DrawNavigationBarSplitter(PaintEventArgs, Rectangle, NavigationBar)

Draws the splitter of a NavigationBar control.

public override void DrawNavigationBarSplitter(PaintEventArgs e, Rectangle bounds, NavigationBar navigationBar)
Parameter Type Description
e PaintEventArgs

A PaintEventArgs that contains the event data.

bounds Rectangle

The bounds in which to draw.

navigationBar NavigationBar

The NavigationBar being painted.

DrawNavigationBarSplitterDecoration(PaintEventArgs, int, int, SizeF)

Draws a decoration for a splitter of a NavigationBar control.

protected void DrawNavigationBarSplitterDecoration(PaintEventArgs e, int x, int y, SizeF scaleFactor)
Parameter Type Description
e PaintEventArgs

A PaintEventArgs that contains the event data.

x int

The x-coordinate at which to draw.

y int

The y-coordinate at which to draw.

scaleFactor SizeF

The scale factor.

DrawNavigationPaneBackground(PaintEventArgs, Rectangle, NavigationPane)

Draws the background of a NavigationPane control.

public override void DrawNavigationPaneBackground(PaintEventArgs e, Rectangle bounds, NavigationPane navigationPane)
Parameter Type Description
e PaintEventArgs

A PaintEventArgs that contains the event data.

bounds Rectangle

The bounds in which to draw.

navigationPane NavigationPane

The NavigationPane being painted.

DrawNavigationPaneButton(PaintEventArgs, Rectangle, NavigationPaneButton)

Draws the NavigationPaneButton for a NavigationPane in a NavigationBar control.

public override void DrawNavigationPaneButton(PaintEventArgs e, Rectangle bounds, NavigationPaneButton button)
Parameter Type Description
e PaintEventArgs

A PaintEventArgs that contains the event data.

bounds Rectangle

The bounds in which to draw.

button NavigationPaneButton

The NavigationPaneButton to draw.

MeasureNavigationBarHeader(Graphics, NavigationBar)

Measures the header for the specified NavigationBar.

public override Size MeasureNavigationBarHeader(Graphics g, NavigationBar navigationBar)
Parameter Type Description
g Graphics

The Graphics object used to measure.

navigationBar NavigationBar

The NavigationBar whose header is being measured.

Returns

Size:

The Size of the header.

MeasureNavigationBarHeader(Graphics, NavigationBarPanel)

Measures the header for the specified NavigationBarPanel.

public override Size MeasureNavigationBarHeader(Graphics g, NavigationBarPanel navigationBarPanel)
Parameter Type Description
g Graphics

The Graphics object used to measure.

navigationBarPanel NavigationBarPanel

The NavigationBarPanel whose header is being measured.

Returns

Size:

The Size of the header.

ResetAll(bool)

Resets all property values to their defaults.

protected override void ResetAll(bool force)
Parameter Type Description
force bool

Whether to force resetting.

ResetNavigationBarBorder()

Resets the NavigationBarBorder property to its default value.

public virtual void ResetNavigationBarBorder()

ResetNavigationBarHeaderBackgroundFill()

Resets the NavigationBarHeaderBackgroundFill property to its default value.

public virtual void ResetNavigationBarHeaderBackgroundFill()

ResetNavigationBarHeaderFont()

Resets the NavigationBarHeaderFont property to its default value.

public virtual void ResetNavigationBarHeaderFont()

ResetNavigationBarHeaderForeColor()

Resets the NavigationBarHeaderForeColor property to its default value.

public virtual void ResetNavigationBarHeaderForeColor()

ResetNavigationBarHeaderPadding()

Resets the NavigationBarHeaderPadding property to its default value.

public virtual void ResetNavigationBarHeaderPadding()

ResetNavigationBarPanelBackgroundFill()

Resets the NavigationBarPanelBackgroundFill property to its default value.

public virtual void ResetNavigationBarPanelBackgroundFill()

ResetNavigationBarSplitterBackgroundFill()

Resets the NavigationBarSplitterBackgroundFill property to its default value.

public virtual void ResetNavigationBarSplitterBackgroundFill()

ResetNavigationBarSplitterDecorationBackBackgroundFill()

Resets the NavigationBarSplitterDecorationBackBackgroundFill property to its default value.

public virtual void ResetNavigationBarSplitterDecorationBackBackgroundFill()

ResetNavigationBarSplitterDecorationForeBackgroundFill()

Resets the NavigationBarSplitterDecorationForeBackgroundFill property to its default value.

public virtual void ResetNavigationBarSplitterDecorationForeBackgroundFill()

ResetNavigationBarSubHeaderBackgroundFill()

Resets the NavigationBarSubHeaderBackgroundFill property to its default value.

public virtual void ResetNavigationBarSubHeaderBackgroundFill()

ResetNavigationBarSubHeaderFont()

Resets the NavigationBarSubHeaderFont property to its default value.

public virtual void ResetNavigationBarSubHeaderFont()

ResetNavigationBarSubHeaderForeColor()

Resets the NavigationBarSubHeaderForeColor property to its default value.

public virtual void ResetNavigationBarSubHeaderForeColor()

ResetNavigationBarSubHeaderPadding()

Resets the NavigationBarSubHeaderPadding property to its default value.

public virtual void ResetNavigationBarSubHeaderPadding()

ResetNavigationPaneDefaultBackgroundFill()

Resets the NavigationPaneDefaultBackgroundFill property to its default value.

public virtual void ResetNavigationPaneDefaultBackgroundFill()

ResetNavigationPaneDefaultButtonBackgroundFill()

Resets the NavigationPaneDefaultButtonBackgroundFill property to its default value.

public virtual void ResetNavigationPaneDefaultButtonBackgroundFill()

ResetNavigationPaneDefaultButtonDisabledForeColor()

Resets the NavigationPaneDefaultButtonDisabledForeColor property to its default value.

public virtual void ResetNavigationPaneDefaultButtonDisabledForeColor()

ResetNavigationPaneDefaultButtonFont()

Resets the NavigationPaneDefaultButtonFont property to its default value.

public virtual void ResetNavigationPaneDefaultButtonFont()

ResetNavigationPaneDefaultButtonForeColor()

Resets the NavigationPaneDefaultButtonForeColor property to its default value.

public virtual void ResetNavigationPaneDefaultButtonForeColor()

ResetNavigationPaneDefaultButtonHotBackgroundFill()

Resets the NavigationPaneDefaultButtonHotBackgroundFill property to its default value.

public virtual void ResetNavigationPaneDefaultButtonHotBackgroundFill()

ResetNavigationPaneDefaultButtonHotPressedBackgroundFill()

Resets the NavigationPaneDefaultButtonHotPressedBackgroundFill property to its default value.

public virtual void ResetNavigationPaneDefaultButtonHotPressedBackgroundFill()

ResetNavigationPaneDefaultButtonPressedBackgroundFill()

Resets the NavigationPaneDefaultButtonPressedBackgroundFill property to its default value.

public virtual void ResetNavigationPaneDefaultButtonPressedBackgroundFill()

ShouldSerializeNavigationBarBorder()

Indicates whether the NavigationBarBorder property should be persisted.

public virtual bool ShouldSerializeNavigationBarBorder()

Returns

bool:

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

ShouldSerializeNavigationBarHeaderBackgroundFill()

Indicates whether the NavigationBarHeaderBackgroundFill property should be persisted.

public virtual bool ShouldSerializeNavigationBarHeaderBackgroundFill()

Returns

bool:

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

ShouldSerializeNavigationBarHeaderFont()

Indicates whether the NavigationBarHeaderFont property should be persisted.

public virtual bool ShouldSerializeNavigationBarHeaderFont()

Returns

bool:

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

ShouldSerializeNavigationBarHeaderForeColor()

Indicates whether the NavigationBarHeaderForeColor property should be persisted.

public virtual bool ShouldSerializeNavigationBarHeaderForeColor()

Returns

bool:

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

ShouldSerializeNavigationBarHeaderPadding()

Indicates whether the NavigationBarHeaderPadding property should be persisted.

public virtual bool ShouldSerializeNavigationBarHeaderPadding()

Returns

bool:

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

ShouldSerializeNavigationBarPanelBackgroundFill()

Indicates whether the NavigationBarPanelBackgroundFill property should be persisted.

public virtual bool ShouldSerializeNavigationBarPanelBackgroundFill()

Returns

bool:

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

ShouldSerializeNavigationBarSplitterBackgroundFill()

Indicates whether the NavigationBarSplitterBackgroundFill property should be persisted.

public virtual bool ShouldSerializeNavigationBarSplitterBackgroundFill()

Returns

bool:

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

ShouldSerializeNavigationBarSplitterDecorationBackBackgroundFill()

Indicates whether the NavigationBarSplitterDecorationBackBackgroundFill property should be persisted.

public virtual bool ShouldSerializeNavigationBarSplitterDecorationBackBackgroundFill()

Returns

bool:

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

ShouldSerializeNavigationBarSplitterDecorationForeBackgroundFill()

Indicates whether the NavigationBarSplitterDecorationForeBackgroundFill property should be persisted.

public virtual bool ShouldSerializeNavigationBarSplitterDecorationForeBackgroundFill()

Returns

bool:

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

ShouldSerializeNavigationBarSubHeaderBackgroundFill()

Indicates whether the NavigationBarSubHeaderBackgroundFill property should be persisted.

public virtual bool ShouldSerializeNavigationBarSubHeaderBackgroundFill()

Returns

bool:

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

ShouldSerializeNavigationBarSubHeaderFont()

Indicates whether the NavigationBarSubHeaderFont property should be persisted.

public virtual bool ShouldSerializeNavigationBarSubHeaderFont()

Returns

bool:

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

ShouldSerializeNavigationBarSubHeaderForeColor()

Indicates whether the NavigationBarSubHeaderForeColor property should be persisted.

public virtual bool ShouldSerializeNavigationBarSubHeaderForeColor()

Returns

bool:

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

ShouldSerializeNavigationBarSubHeaderPadding()

Indicates whether the NavigationBarSubHeaderPadding property should be persisted.

public virtual bool ShouldSerializeNavigationBarSubHeaderPadding()

Returns

bool:

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

ShouldSerializeNavigationPaneDefaultBackgroundFill()

Indicates whether the NavigationPaneDefaultBackgroundFill property should be persisted.

public virtual bool ShouldSerializeNavigationPaneDefaultBackgroundFill()

Returns

bool:

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

ShouldSerializeNavigationPaneDefaultButtonBackgroundFill()

Indicates whether the NavigationPaneDefaultButtonBackgroundFill property should be persisted.

public virtual bool ShouldSerializeNavigationPaneDefaultButtonBackgroundFill()

Returns

bool:

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

ShouldSerializeNavigationPaneDefaultButtonDisabledForeColor()

Indicates whether the NavigationPaneDefaultButtonDisabledForeColor property should be persisted.

public virtual bool ShouldSerializeNavigationPaneDefaultButtonDisabledForeColor()

Returns

bool:

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

ShouldSerializeNavigationPaneDefaultButtonFont()

Indicates whether the NavigationPaneDefaultButtonFont property should be persisted.

public virtual bool ShouldSerializeNavigationPaneDefaultButtonFont()

Returns

bool:

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

ShouldSerializeNavigationPaneDefaultButtonForeColor()

Indicates whether the NavigationPaneDefaultButtonForeColor property should be persisted.

public virtual bool ShouldSerializeNavigationPaneDefaultButtonForeColor()

Returns

bool:

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

ShouldSerializeNavigationPaneDefaultButtonHotBackgroundFill()

Indicates whether the NavigationPaneDefaultButtonHotBackgroundFill property should be persisted.

public virtual bool ShouldSerializeNavigationPaneDefaultButtonHotBackgroundFill()

Returns

bool:

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

ShouldSerializeNavigationPaneDefaultButtonHotPressedBackgroundFill()

Indicates whether the NavigationPaneDefaultButtonHotPressedBackgroundFill property should be persisted.

public virtual bool ShouldSerializeNavigationPaneDefaultButtonHotPressedBackgroundFill()

Returns

bool:

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

ShouldSerializeNavigationPaneDefaultButtonPressedBackgroundFill()

Indicates whether the NavigationPaneDefaultButtonPressedBackgroundFill property should be persisted.

public virtual bool ShouldSerializeNavigationPaneDefaultButtonPressedBackgroundFill()

Returns

bool:

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

Inherited Members