【发布时间】:2010-08-04 15:25:34
【问题描述】:
布局组时,Windows 功能区框架支持some predefined layouts。其中一种需要四个按钮的布局称为FourButtons。
此布局支持 3 种不同的尺寸,Large、Medium 和 Small。在每种情况下,它都会给出布局:
大:
中等:
小:
现在我在我的 xml 文件中使用 FourButtons 预定义模板:
<?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>
你可以看到这条线
<Group CommandName="grpActivity" SizeDefinition="FourButtons">
指定FourButtons 布局模板。
而我的布局是FourButtons:
除了我不想要 FourButtons 布局,我想要“四个按钮,两个大两个小”。
同理有ThreeButtons-OneBigAndTwoSmall:
还有一个FiveButtons:
我想要一个FourButtons-TwoBigTwoSmall,我可以手动制作模型:
不幸的是,声明式编程that Microsoft invented for creating custom layouts 让我作为程序员感到困惑。
谁能破译页面底部的声明性语言示例并想出一个 FourButton-TwoBigTwoSmall 模板?
注意:所有漂亮的图形、格式、链接和东西都用来吸引松鼠——它们喜欢闪亮的图形。如果你真的读到这里,我可以实际上使用你的帮助。
【问题讨论】:
标签: windows-7 ribbon windows-ribbon-framework scenic-ribbon uiribbon