skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop
    Web
    Kendo UI UI for jQuery UI for Angular UI for React UI for Vue UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX UI for Silverlight UI for PHP UI for JSP
    Mobile
    UI for .NET MAUI UI for Xamarin
    Document Management
    Telerik Document Processing
    Desktop
    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF UI for UWP
    Reporting & Mocking
    Telerik Reporting Telerik Report Server Telerik JustMock
    Automated Testing
    Test Studio Test Studio Dev Edition
    CMS
    Sitefinity
    UI/UX Tools
    ThemeBuilder Design System Kit
    Debugging
    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Jam FiddlerCap FiddlerCore
    Extended Reality
    UI for Unity XR
    Free Tools
    JustAssembly JustDecompile VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Release History
  • Docs & Support
  • Pricing
  • Search
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class OfficeColorPalette

OfficeColorPalette is the base class for all MSOffice2007 palettes. All office palettes inherit this class and implement GetHeaderColors() and GetGeneratedColors() as well as GetColors() methods.

Inheritance
System.Object
ColorPaletteBase
OfficeColorPalette
ApexPalette
AspectPalette
CivicPalette
ConcoursePalette
EquityPalette
FlowPalette
FoundryPalette
MedianPalette
MetroPalette
ModulePalette
OfficePalette
OpulentPalette
OrielPalette
OriginPalette
PaperPalette
SolsticePalette
TechniquePalette
TrekPalette
UrbanPalette
VervePalette
Inherited Members
ColorPaletteBase.HexStringToColor(String)
Namespace: Telerik.Windows.Controls
Assembly: Telerik.Windows.Controls.Input.dll

Syntax

public abstract class OfficeColorPalette : ColorPaletteBase

Constructors

OfficeColorPalette()

Declaration
protected OfficeColorPalette()

Properties

ColumnsCount

Represent the number of columns in a Palette. If you want the colors in a Palette to be in a particular order use this property.

Declaration
public override int ColumnsCount { get; set; }
Property Value
System.Int32

The columns count.

Overrides
ColorPaletteBase.ColumnsCount

ItemsFlow

Gets or sets the items flow direction in a Palette..

Declaration
public override Orientation ItemsFlow { get; set; }
Property Value
System.Windows.Controls.Orientation

The items flow.

Overrides
ColorPaletteBase.ItemsFlow

Methods

GetColors()

GetColors represent all the colors in a particular Palette including header and main palette colors.

Declaration
public override IEnumerable<Color> GetColors()
Returns
System.Collections.Generic.IEnumerable<System.Windows.Media.Color>

Returns a collection of all colors: header and main.

Overrides
ColorPaletteBase.GetColors()

GetGeneratedColors()

GetGeneratedColors is used when you want to get only the generated(the production from the base colors) colors for a specific Office palette.

Declaration
public abstract IEnumerable<Color> GetGeneratedColors()
Returns
System.Collections.Generic.IEnumerable<System.Windows.Media.Color>

Returns a collection of the generated colors.

Remarks

This method returns the main palette colors and it is implemented in all classes that derive from OfficeColorPalette.

GetHeaderColors()

GetHeaderColors is used when you want to get only the base(header) colors for a specific Office palette.

Declaration
public abstract IEnumerable<Color> GetHeaderColors()
Returns
System.Collections.Generic.IEnumerable<System.Windows.Media.Color>

Returns a collection of the header colors.

Remarks

This method returns the header colors and it is implemented in all classes that derive from OfficeColorPalette.

GetPaletteFromBaseColors(IEnumerable<Color>)

A helper to generate a MSOffice2007 like palette. This method generate a production of each color using its brightness and all generated colors form a Palette.

Declaration
public static IEnumerable<Color> GetPaletteFromBaseColors(IEnumerable<Color> baseColors)
Parameters
System.Collections.Generic.IEnumerable<System.Windows.Media.Color> baseColors

The base colors. This is a collection with colors that are used for generating the palette colors.

Returns
System.Collections.Generic.IEnumerable<System.Windows.Media.Color>

Extension Methods

CollectionExtensions.ToEnumerable<T>(T)
EnumerableExtensions.ToEnumerable<T>(T)

Was this article helpful?

Tell us how we can improve this article

Skip
Getting Started
  • Install Now
  • Demos
  • SDK Samples Browser
  • Sample Applications
Support Resources
  • Code Library
  • Knowledge Base
  • MVVM Support
  • Videos
  • GitHub SDK Repository
Community
  • Forums
  • Blogs
  • XAML Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.