Always show the same button on SplitButton

Always show the same button on SplitButton

rikard.nilsson
Collaborator Collaborator
800 Views
2 Replies
Message 1 of 3

Always show the same button on SplitButton

rikard.nilsson
Collaborator
Collaborator

Hi,

 

I have created some buttons and placed them inside a SplitButton.

The problem I have is that I want have the same effect that Revit has in thier buttons.

I want to show the same button always even if I choose one below in a SplitButton.

When I choose a button below in mySplitButton that always will be the new default that shows on the SplitButton.

 

Regards

Rikard

0 Likes
Accepted solutions (1)
801 Views
2 Replies
Replies (2)
Message 2 of 3

jeremytammik
Autodesk
Autodesk
Accepted solution

Dear Rikard,

 

Thank you for your nice query.

 

Yes. That is in fact very easy to achieve.

 

I show you how in my HoloLens Escape Path Waypoint JSON Exporter:

 

https://thebuildingcoder.typepad.com/blog/2016/09/hololens-escape-path-waypoint-json-exporter.html

 

The add-in displays the following ribbon panel:

 

ExportWaypointsJson ribbon panelExportWaypointsJson ribbon panel

     

You can either click the main button, which is always displayed at the top as the current option, to trigger the main command, or drop down the rest of the stacked button contents to display the option button:

  

ExportWaypointsJson main command and settings buttonsExportWaypointsJson main command and settings buttons

   

You can grab the entire Visual Studio solution and project from the ExportWaypointsJson GitHub repository:

 

https://github.com/jeremytammik/ExportWaypointsJson

 

I hope this helps.

 

Best regards,

 

Jeremy

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 3 of 3

rikard.nilsson
Collaborator
Collaborator

 

 

This was my simple solution..

splitButtonClearLoads.IsSynchronizedWithCurrentItem = false;

0 Likes