ColorPicker > C1ColorPicker Task-Based Help > Setting the Palette |
ColorPicker for WPF and Silverlight includes over 20 predefined color palettes that match the themes used in Microsoft Office. For more information about palette choices, see Available ColorPicker Palettes. To change the color palette, you can set the C1ColorPicker.Palette property.
To set the C1ColorPicker.Palette property, complete the following steps:
Visual Basic Copy Code Private Sub Button1_Click(ByVal sender as Object, ByVal e as System.Windows.RoutedEventArgs) ' Set the color palette. Me.C1ColorPicker.Palette = ColorPalette.GetColorPalette(Office2007ColorTheme.GrayScale) End Sub
C# Copy Code private void button1_Click(object sender, System.Windows.RoutedEventArgs e) { // Change color palette. this.c1ColorPicker.Palette = ColorPalette.GetColorPalette(Office2007ColorTheme.GrayScale); }
Run the application and observe the following: