To implement Live Preview functionality in DotNetBar for WPF follow these steps:

1. On ButtonDropDown control set attached property Ribbon.LivePreviewEnabled=”true” to enable live preview for that button
2. Handle attached event Ribbon.LivePreview

2.1. Save the current state so you can restore it if users chooses to back out
2.2. Apply the effect of the command to let user preview what it does

3. Handle attached event Ribbon.UndoLivePreview in which you undo using information saved at point 2.1 the preview you applied in point 2.2

The events provided by Ribbon control are bubbling up the chain which means that for example if you are enabling live preview on gallery, you can add handlers on Gallery level. Here is sample XAML that has Gallery and couple of buttons with Live Preview enabled:

<dc:Gallery Header=“Quick Styles“ SuggestedContainerWidth=“300“ Height=“56“ <strong>dc:Ribbon.LivePreview=“RibbonLivePreview“</strong> <strong>dc:Ribbon.UndoLivePreview=“RibbonUndoLivePreview“</strong>>
  <dc:ButtonDropDown Header=“Apex“ ImagePosition=“Top“ PartVisibility=“ImageOnly“ dc:Gallery.Category=“Standard“ <strong>dc:Ribbon.LivePreviewEnabled=“true“</strong>>
    <dc:ButtonDropDown.Image>
      <Image Source=“images/Apex.png“/>
    </dc:ButtonDropDown.Image>
  </dc:ButtonDropDown>
  <dc:ButtonDropDown Header=“Aspect“ ImagePosition=“Top“ PartVisibility=“ImageOnly“ dc:Gallery.Category=“Standard“ <strong>dc:Ribbon.LivePreviewEnabled=“true“</strong>>
    <dc:ButtonDropDown.Image>
      <Image Source=“images/Aspect.png“/>
    </dc:ButtonDropDown.Image>
  </dc:ButtonDropDown>

Related posts:

  1. Using Wpf-Ribbon Galleries
  2. How to create Backstage application menu in DotNetBar for WPF Ribbon Control
  3. How to disable run-time customization for buttons
  4. How To Start Using Wpf-Ribbon Control
  5. How to build Office 2010 style Backstage application menu with DotNetBar for WPF