K
kapkema
I am having trouble creating new controls on the Ribbon at Runtime.
Given the following sample scenario:
When a user opens a certain task - I want to replace the ribbon and add a
set of buttons based on that specific task.
The problem is the number of buttons being added is not fixed. So Task A
might have 3 buttons and Task B might have 5 buttons. Since the number of
buttons isn't fixed, I don't see a way to define the buttons ahead of time in
the RibbonX definition and use callbacks to update the content of each button.
So, I also looked at using the GetCustomUI call to change the XML that is
loaded, but this only called the first time Ribbon loads - even if I call
Invalidate, so it works for the first task that opens, but how do I update it
for the next task that opens?
Does anyone have a similar problem or a solution to adding the buttons to
the Ribbon in the C# code at runtime?
Given the following sample scenario:
When a user opens a certain task - I want to replace the ribbon and add a
set of buttons based on that specific task.
The problem is the number of buttons being added is not fixed. So Task A
might have 3 buttons and Task B might have 5 buttons. Since the number of
buttons isn't fixed, I don't see a way to define the buttons ahead of time in
the RibbonX definition and use callbacks to update the content of each button.
So, I also looked at using the GetCustomUI call to change the XML that is
loaded, but this only called the first time Ribbon loads - even if I call
Invalidate, so it works for the first task that opens, but how do I update it
for the next task that opens?
Does anyone have a similar problem or a solution to adding the buttons to
the Ribbon in the C# code at runtime?