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 DisposableObjectBase 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

The WindowsColorSchemeType to use as a base for the colors.

public WindowsColorSchemeType BaseColorSchemeType { get; set; }

Property Value

WindowsColorSchemeType

NavigationBarBorder

The Border for a navigation bar.

public Border? NavigationBarBorder { get; set; }

Property Value

Border

NavigationBarHeaderBackgroundFill

The BackgroundFill for the header of a NavigationBar.

public BackgroundFill? NavigationBarHeaderBackgroundFill { get; set; }

Property Value

BackgroundFill

NavigationBarHeaderFont

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

public virtual Font? NavigationBarHeaderFont { get; set; }

Property Value

Font

Remarks

When null, text may not be rendered or a default system font may be used.

NavigationBarHeaderForeColor

The foreground color of the header of a NavigationBar.

public Color NavigationBarHeaderForeColor { get; set; }

Property Value

Color

NavigationBarHeaderPadding

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

public virtual int NavigationBarHeaderPadding { get; set; }

Property Value

int

NavigationBarPanelBackgroundFill

public BackgroundFill? NavigationBarPanelBackgroundFill { get; set; }

Property Value

BackgroundFill

NavigationBarSplitterBackgroundFill

The BackgroundFill for a navigation bar splitter.

public BackgroundFill? NavigationBarSplitterBackgroundFill { get; set; }

Property Value

BackgroundFill

NavigationBarSplitterDecorationBackBackgroundFill

The BackgroundFill for a background navigation bar splitter decoration.

public BackgroundFill? NavigationBarSplitterDecorationBackBackgroundFill { get; set; }

Property Value

BackgroundFill

NavigationBarSplitterDecorationForeBackgroundFill

The BackgroundFill for a foreground navigation bar splitter decoration.

public BackgroundFill? NavigationBarSplitterDecorationForeBackgroundFill { get; set; }

Property Value

BackgroundFill

NavigationBarSubHeaderBackgroundFill

The BackgroundFill for sub-headers of a NavigationBar.

public BackgroundFill? NavigationBarSubHeaderBackgroundFill { get; set; }

Property Value

BackgroundFill

NavigationBarSubHeaderFont

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

public virtual Font? NavigationBarSubHeaderFont { get; set; }

Property Value

Font

Remarks

When null, text may not be rendered or a default system font may be used.

NavigationBarSubHeaderForeColor

The foreground color of the sub-headers of a NavigationBar

public Color NavigationBarSubHeaderForeColor { get; set; }

Property Value

Color

NavigationBarSubHeaderPadding

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

public virtual int NavigationBarSubHeaderPadding { get; set; }

Property Value

int

NavigationPaneDefaultBackgroundFill

The BackgroundFill for a navigation pane.

public BackgroundFill? NavigationPaneDefaultBackgroundFill { get; set; }

Property Value

BackgroundFill

NavigationPaneDefaultButtonBackgroundFill

The BackgroundFill for a navigation pane button.

public BackgroundFill? NavigationPaneDefaultButtonBackgroundFill { get; set; }

Property Value

BackgroundFill

NavigationPaneDefaultButtonDisabledForeColor

The foreground color of a disabled navigation pane button.

public Color NavigationPaneDefaultButtonDisabledForeColor { get; set; }

Property Value

Color

NavigationPaneDefaultButtonFont

The Font to use when drawing a NavigationPaneButton.

public virtual Font? NavigationPaneDefaultButtonFont { get; set; }

Property Value

Font

Remarks

When null, text may not be rendered or a default system font may be used.

NavigationPaneDefaultButtonForeColor

The foreground color of a navigation pane button.

public Color NavigationPaneDefaultButtonForeColor { get; set; }

Property Value

Color

NavigationPaneDefaultButtonHotBackgroundFill

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

public BackgroundFill? NavigationPaneDefaultButtonHotBackgroundFill { get; set; }

Property Value

BackgroundFill

NavigationPaneDefaultButtonHotPressedBackgroundFill

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

public BackgroundFill? NavigationPaneDefaultButtonHotPressedBackgroundFill { get; set; }

Property Value

BackgroundFill

NavigationPaneDefaultButtonPressedBackgroundFill

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

public BackgroundFill? NavigationPaneDefaultButtonPressedBackgroundFill { get; set; }

Property Value

BackgroundFill

Methods

Dispose(bool)

Releases the unmanaged resources used by the object and optionally releases the managed resources.

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

true to release both managed and unmanaged resources; false to release only unmanaged resources.

Remarks

This method is called by the public Dispose() method and the Finalize method. Dispose invokes this method with the disposing parameter set to true. Finalize invokes this method with disposing set to false.

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

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

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

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

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

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

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

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

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

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

Extension Methods