Home » 2010 » May

WPF Ribbon (CTP) – Part 6 – Creating a Ribbon Color Control

Creating a Ribbon Color Control

Let’s take Word for example: we can easily select the color for a piece of text or for a shape. The CTP version does not have any such control, so I would like to give you an example of how you can create one.

Entire Tutorial:

Summary

  • Step 1: Creating a new application
  • Step 2: Creating the custom RibbonColorButton
  • Step 3: Binding the RibbonColorButton to the TextBlock

Read more

WPF Ribbon (CTP) – Part 5 – Creating Custom Controls and Viewing Templates

Creating Custom Controls

Sometimes the default controls might not be enough for our needs. So what can we do then? Well, it’s simple: create our own controls. For example the CTP version does not have a color picker, but we can create our own.

Entire Tutorial:

Summary

  • Step 1: Creating a new application
  • Step 2: Implementing the IRibbonControl interface
  • Step 3: Changing the template of an existing RibbonControl – e.g. RibbonTextBox
    • Step 3a: Removing the image from the RibbonTextBox
    • Step 3b: Set a fixed width for the visual text area inside the RibbonTextBox
    • Step 3c: Set a fixed width for the label and text area inside the RibbonTextBox
  • Step 4: Viewing the templates of the basic ribbon controls
    • RibbonTab
    • RibbonButton
    • RibbonDropDownButton
    • RibbonSplitButton
    • RibbonCheckBox
    • RibbonTextBox
    • RibbonLabel
    • RibbonComboBox

Read more