We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Menu Modification or QuickCommand popup

Thread ID:

Created:

Updated:

Platform:

Replies:

144334 May 1,2019 10:57 AM UTC May 10,2019 04:56 AM UTC WPF 6
loading
Tags: SfDiagram
Mike Cowing
Asked On May 1, 2019 04:23 PM UTC

On the right click of a node I can modify the menu to only have the controls I want, but the Icon is only looking for a URI mapped to a jpg/png. Is that correct? I use XAML icons throughout the rest of the application and ideally would like to use those too. 

Secondly I don't see a way to have sub-menu-items for the menu. Is that possible?

Thirdly is it possible to have the QuickCommand invoke a menu or usercontrol of my own?

Finally the IDiagramCommands I'm struggling to be able to reference from XAML directly. If I build up a usercontrol menu, then I'd add this in XAML. I was hoping something like this would work: Command="{x:Static syncfusion:IDiagramCommands.SendToBack}"

Thanks...



Ramya Thirugnanam [Syncfusion]
Replied On May 2, 2019 02:11 PM UTC

Hi Mike, 
Please find the response for your queries. 
Reported scenarios  
Response  
Custom context menu with icons.


  
We can achieve this, and we have provided the sample to represent this. Please refer to the help document from the following link. 
Add submenu items  
We can achieve this, and we have provided the sample to represent this.  
Thirdly is it possible to have the QuickCommand invoke a menu or UserControl of my own?  
Yes, it is possible. We can invoke the user control in the custom quick command.   
Finally the IDiagramCommands I'm struggling to be able to reference from XAML directly. If I build up a usercontrol menu, then I'd add this in XAML. I was hoping something like this would work: Command="{x:Static syncfusion:IDiagramCommands.SendToBack}"  
We can invoke the diagram command into the user control menu.  
 
We have provided the sample to represent the requirements. Please find the sample from the below link. 
Sample Link:     
Regards, 
Ramya T 


Mike Cowing
Replied On May 3, 2019 10:47 AM UTC

Thank you for the response. The last three I can understand now, but I think you misunderstood my first question. 

I'm aware of the icon property and how to set that using a URI. My question was can I not use a XAML icon as created by your Metro Studio? All of the icons I use in my app are created this way. IDeally I don't want to have to start finding new icons.

For instance here is one of my Icons and how I normally use it:
    <Path Style="{StaticResource IconOil}" Width="46" Height="46"/>

<Style x:Key="IconOil" TargetType="{x:Type Path}">
<Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
<Setter Property="Fill" Value="#FFFFFFFF"/>
<Setter Property="Stretch" Value="Uniform"/>
<Setter Property="Height" Value="256"/>
<Setter Property="Width" Value="256"/>
<Setter Property="Data" Value="M63.953324,12.935C63.953324,12.935001 66.655212,19.538954 66.666916,21.288888 66.678711,23.037522 65.495122,24.461968 64.026325,24.474968 62.553732,24.482769 61.349235,23.070121 61.340038,21.321386 61.328335,19.571452 63.953324,12.935001 63.953324,12.935z M59.070447,10.221401L41.044401,20.4467 35.312588,14.7462 17.003941,14.7462 17.003941,26.183599 44.22541,26.183599z M5.5988922,3.5482807L3.5521278,7.5925307 13.838634,12.8412 13.838634,11.905 13.493435,7.5195899z M4.4440994,0L15.90234,5.7773404 16.46484,11.5795 23.226658,11.5795 23.226658,8.3737197 18.058746,8.3737197 18.058746,5.8828106 31.168077,5.8828106 31.168077,8.3737197 25.997665,8.3737197 25.997665,11.5795 36.714891,11.5795 36.714891,11.6407 41.603104,16.5261 61.010652,5.4765601 62.703255,7.8776202 63.392158,8.7669101 63.597858,9.0338705 64.005359,9.5612204 63.997559,9.5690901 64.29056,9.9609401C64.636861,10.4128 64.54316,11.0587 64.087459,11.4011 63.631758,11.7422 62.988457,11.6537 62.642155,11.198L62.574356,11.1082 45.695414,29.345099 45.691613,29.341199 45.691613,29.353 13.838634,29.353 13.838634,15.8035 0,8.7396197z"/>
<Setter Property="RenderTransform">
<Setter.Value>
<TransformGroup>
<TransformGroup.Children>
<RotateTransform Angle="0" />
<ScaleTransform ScaleX="1" ScaleY="1" />
</TransformGroup.Children>
</TransformGroup>
</Setter.Value>
</Setter>
</Style>


Prakash Perumal [Syncfusion]
Replied On May 6, 2019 01:01 PM UTC

Hi Mike, 
 
Currently we don’t have support to use Shapes as an icon for MenuItem. We have added it to our feature request list, but we don’t have any immediate plans to implement this feature. At the planning stage for every release cycle, we review all open features. We will let you know when this feature is implemented. Now, you can now track the status of your request, review the proposed resolution timeline, and contact us for any further inquiries through below link. 
 
 
We have provided the work around sample to represent this scenario. 
 
Regards, 
Prakash P 


Ramya Thirugnanam [Syncfusion]
Replied On May 8, 2019 12:04 PM UTC

Hi Mike, 
 
Requirement : support to use Shapes as an icon for MenuItem 
 
We have support to achieve your requirement by using custom menu item and custom property.  Please find the sample as below. 
 
Sample Link:  
  
Regards,  
Ramya T 


Mike Cowing
Replied On May 9, 2019 06:43 PM UTC

Excellent. Thanks...

Ramya Thirugnanam [Syncfusion]
Replied On May 10, 2019 04:56 AM UTC

Hi Mike,  
Thanks for your update. 
Regards, 
Ramya T 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon