When laying out a group, the Windows Ribbon Framework supports some predefined layouts. One of the layouts, which requires four buttons is called FourButtons
.
This layout supports 3 different sizes, Large, Medium, and Small. In each case it gives the layouts:
Large:
Medium:
Small:
Right now i am using the FourButtons
predefined template in my xml file as:
<?xml version="1.0" encoding="utf-8"?>
<Application xmlns="http://schemas.microsoft.com/windows/2009/Ribbon">
...
<Application.Views>
<Ribbon>
...
<Ribbon.Tabs>
<Tab CommandName="tabHome">
<Group CommandName="grpActivity" SizeDefinition="FourButtons">
<Button CommandName="cmdStartWorking" />
<Button CommandName="cmdStopWorking" />
<Button CommandName="cmdPrint" />
<Button CommandName="cmdDuplicateTicket" />
</Group>
</Tab>
</Ribbon.Tabs>
</Ribbon>
</Application.Views>
</Application>
And you can see the line
<Group CommandName="grpActivity" SizeDefinition="FourButtons">
which specifies the FourButtons
layout template.
And my layout is FourButtons:
Except i don't want FourButtons layout, i want "Four Buttons, Two Big Two Small".
In the same way that there is ThreeButtons-OneBigAndTwoSmall
:
And there is a FiveButtons
:
i want a FourButtons-TwoBigTwoSmall
, which i can manually mockup:
Unfortunately declarative programming that Microsoft invented for creating custom layouts confounds me as a programmer.
Can anyone decipher the declarative language example at the bottom of the page and come up with a FourButton-TwoBigTwoSmall template?
Note: All the pretty graphics, formatting, links, and stuff are used to attract squirrels - who love shiny graphics. And if you actually read this far i could actually use your help.
you should use BigButtonsAndSmallButtonsOrInputs SizeDefinition
e.g.
<Group CommandName="cmdGroupBatch" SizeDefinition="BigButtonsAndSmallButtonsOrInputs">
<ControlGroup>
<Button CommandName="cmdButtonGetBatch" />
<Button CommandName="cmdButtonPutBatch" />
</ControlGroup>
<ControlGroup>
<Button CommandName="cmdButtonSaveBatch" />
<Button CommandName="cmdButtonDiscartBatch" />
</ControlGroup>
</Group>
Just check, if your Group has Size="Large" in your Tab.ScalingPolicy.