This example demonstrates how to customize WinForms Ribbon Templates. For details, refer to the How to: Customize a WinForms Template topic in XAF documentation.
See also: How to Customize a WinForms Template
Question Comments
Added By: Robert Fuchs at: 9/27/2012 5:02:17 PM
Wow, really?
So much code to just remove the Edit Model item from the Tools menu?
Sometimes XAF is ungraspable :(
I would expect some (pseudo!)code like this in a WinController would be enough:
private void Template_Changed(object sender, EventArgs e)
{
// ...
for (int i = 0; i < xxx.Actions.Count; i++)
{
if (xxx.Actions[i].Id == "EditModel")
{
xxx.Actions[i].Active.SetItemValue("My Template", false);
break;
}
}
}