xamlribbonvisioribbon-control

Orienting Controls on Ribbon.xaml


I have a Visio Addin that I have been adding controls to. I have a simple problem but I'm struggling to find an answer to.

I have these four controls in a group. I just added a new one called Query Preference.

I would like to align this in such a way where Modern Shapes shows up under Query Preference in the highlighted area below.

Ribbon Image

The Xaml code for this group is as follows.

I'm fairly certain there is alignment property, but I can't find for the group tag to do what I want.

Does anyone have experience with this?

<group id="connectionGroup" label="Manage">
  <button id="authenticate" label="Configure Connection" size="normal" getImage="GetImage" onAction="OnAction" getEnabled="GetEnabled" supertip="Set the server and authentication information"/>
  <button id="stencil" label="Generate Stencil" size="normal" getImage="GetImage" onAction="OnAction" getEnabled="GetEnabled" supertip="Generate a new stencil using the metamodel of the current server"/>
  <menu id="modernClassicShapesDropdown" getLabel="GetShapeStyleLabel" getImage="GetShapeStyleImage" getEnabled="GetEnabled" supertip="Determine how new shapes will be rendered">
    <button id="modernShapes" label="Modern Shapes" getImage="GetImage" onAction="OnShapeStyleAction"/>
    <button id="classicShapes" label="Classic Shapes"  getImage="GetImage" onAction="OnShapeStyleAction"/>
  </menu>
  <menu id="queryPreference" label="Query Preference" getImage="GetImage" getEnabled="GetEnabled" supertip="Determines how much Shape data is queried.">
    <button id="Low" label="Low" onAction="OnQueryPreferenceAction" supertip="Only component name and description are queried and available in shape data. Select this option for fastest drawing time."/>
    <button id="Medium" label="Medium" onAction="OnQueryPreferenceAction" supertip="Only native component properties are queried. Calculated properties are not initially available in shape data."/>
    <button id="High" label="High" onAction="OnQueryPreferenceAction" supertip="All component properties are queried and available in shape data, including calculated properties."/>
  </menu>
</group>

Solution

  • Why not just move the "Modern Shapes" menu item to after "Query Preference" and then insert a blank line:

    <button id="junk42" label=" " />