Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
330
WYSIWYG with Large Ribbons
posted

What is the ideal way to design a very large Infragistics ribbon?

 

  1. Since it is large, I would like to split it into several files.
  2. For my user-written code, I would like simple code-behind, without lots of backflips (e.g. Attached Behaviors).
  3. I would like to use the WYSIWYG editor in Blend/Studio.

 

Is it possible to satisfy all three requirements?

 

If I use a resource dictionary for the tabs, I think I get #1.

If I put it all in one file, I think I get #2 & #3.

If I write a class and do something like the XAML below, I get #1 and #2.

 

<igRibbon:RibbonTabItem x:Class="XYZ.Views.HomeTab"

             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"

             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"

             xmlns:igRibbon="http://infragistics.com/Ribbon"

             mc:Ignorable="d">

    <igRibbon:RibbonGroup>

        <igRibbon:ButtonTool Caption="xyz" LargeImage="{StaticResource xyz}"/>

    </igRibbon:RibbonGroup>

</igRibbon:RibbonTabItem>

  • 34510
    Offline posted

    Hello Wayne,

    How much do you want to split the ribbon up?  A XamRibbon can have n number of tabs and each tab can have n number groups which in turn can contain n number of controls.  Depending on your requirements it can get quite complicated trying to split things up.  At the simplest, you would only be interested in splitting each tab into it's own file which you can do using the method you already showed at the bottom of your post.  Essentially you derive your own class from RibbonTabItem which will go into it's own XAML and CS files.  Inside the XAML you define how the tab would appear and then in your Ribbon you can add instances of these derived classes to the Tabs collection.

    I'm no expert in Blend but I don't see why this approach wouldn't allow you to use it.  While blend won't be able to render each individual derived RibbonTabItem, you will be able to use it to add RibbonGroups and controls to the tab and modify their properties.  Once you add them to the ribbon though, they will be rendered.