Message 1 of 5
Not applicable
08-06-2019
01:02 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to make a split button exactly like in Revit.
For Exemple Slab in "Structure"
As you can see the label is different from the first choice.
When I am creating my own splitButton with this code (I create from a custom model)
var splitButtonData = new SplitButtonData(dropDownButton.Name, dropDownButton.Name);
var splitButton = ribbonPanel.AddItem(splitButtonData) as SplitButton;
if (splitButton != null)
splitButton.IsSynchronizedWithCurrentItem = false;
foreach (var pushButtonContent in dropDownButton)
{
var button = new PushButtonData(
pushButtonContent.CommandType.Name,
pushButtonContent.Text,
pushButtonContent.CommandType.Assembly.Location,
pushButtonContent.CommandType.FullName);
if (pushButtonContent.LargeImage != null)
button.LargeImage = BitmapToImageSourceConverter.Convert(pushButtonContent.LargeImage);
if (!string.IsNullOrEmpty(pushButtonContent.AvailabilityClassName))
button.AvailabilityClassName = pushButtonContent.AvailabilityClassName;
splitButton?.AddPushButton(button);
}Basically, dropDownButton.Name is "Form Deck", but
I get this
I don't want the top button and description to be linked to first item.
Also if possible I would like the top button to be independent and have it own command handler based on a algorithm to chose the best option base on the selection in Revit.
Thank you for helping me.
Charles
Solved! Go to Solution.