Is it possible to use the MenuAdv also as Contextmenu

Hello,

ist it possible to use the MenuAdv also as a Contextmenu.

As Example when clicking on the Notifyicon, I want to open a menu like this:



Than


8 Replies 1 reply marked as answer

VR Vijayalakshmi Roopkumar Syncfusion Team July 23, 2021 07:09 AM UTC

Hi Uwe 
 
Thank you for contacting Syncfusion Support. 
 
We have checked your requirement to add MenuAdv as contextmenu in NotifyIcon. Yes we can add it using the following code. 
 
Code:[XAML] 
 
 
<syncfusion:NotifyIcon 
Name="notifyIcon" 
Icon="Images/floppy-icon.png" 
ShowInTaskBar="True" 
Text="Notify ToolTip" MouseLeftButtonDown="notifyIcon_MouseLeftButtonDown"> 
 
<!--Adding menuitem as contextmenu in NotifyIcon--> 
<syncfusion:NotifyIcon.ContextMenu> 
<ContextMenu> 
<syncfusion:MenuItemAdv Header="New"> 
<syncfusion:MenuItemAdv.Icon> 
<Image 
Width="15" 
Height="15" 
Source="/Images/base_charts.png" /> 
</syncfusion:MenuItemAdv.Icon> 
</syncfusion:MenuItemAdv> 
<syncfusion:MenuItemAdv Header="Open"> 
<syncfusion:MenuItemAdv.Icon> 
<Image 
Width="15" 
Height="15" 
Source="/Images/Green.png" /> 
</syncfusion:MenuItemAdv.Icon> 
</syncfusion:MenuItemAdv> 
<syncfusion:MenuItemAdv Header="Save"> 
<syncfusion:MenuItemAdv.Icon> 
<Image 
Width="15" 
Height="15" 
Source="/Images/Orange.png" /> 
</syncfusion:MenuItemAdv.Icon> 
</syncfusion:MenuItemAdv> 
<syncfusion:MenuItemAdv Header="Close"> 
<syncfusion:MenuItemAdv.Icon> 
<Image 
Width="15" 
Height="15" 
Source="Images/Blue.png" /> 
</syncfusion:MenuItemAdv.Icon> 
</syncfusion:MenuItemAdv> 
 
 
 
 
Screenshot : 
 
 
 
 
 
Please try this solution and let us know if it is helpful. 
 
Regards, 
Vijayalakshmi VR 



UP Uwe Porsch July 23, 2021 07:49 AM UTC

Perfect. Thanks alot.

Regards

Uwe



UP Uwe Porsch July 23, 2021 11:55 AM UTC

One more question. It works perfect. But when I add an Seperator

                    <syncfusion:MenuItemAdv x:Name="MenuAbout" Header="Nach _Updates suchen" Click="menuAbout_Click">

                        <syncfusion:MenuItemAdv.Icon>

                            <Image

                                Width="32"

                                Height="32"

                                Source="/images/btn_about_lrg.png" />

                        </syncfusion:MenuItemAdv.Icon>

                    </syncfusion:MenuItemAdv>

                    <syncfusion:MenuItemSeparator/>

                    <syncfusion:MenuItemAdv x:Name="MenuBeenden" Header="_Beenden" Click="menuBeenden_Click">

                        <syncfusion:MenuItemAdv.Icon>

                            <Image

                                Width="32"

                                Height="32"

                                Source="/images/exit_32.png" />

                        </syncfusion:MenuItemAdv.Icon>

                    </syncfusion:MenuItemAdv>


Then it looks like this:



It shows an empty line, but not the Seperator line.


Thanks and regards

Uwe






VR Vijayalakshmi Roopkumar Syncfusion Team July 26, 2021 12:52 PM UTC

Hi Uwe 
  
Thank you for your update. 
  
We have checked the reported behavior "MenuItemSeperator is not visible" with MenuAdv and confirmed it is a defect at our end. We have logged a report on this and the patch for this fix is estimated to be available on 9th August , 2021. 
  
You can track the status of this defect using the following feedback link: 
  
  
Regards. 
Vijayalakshmi VR 



UP Uwe Porsch July 26, 2021 12:55 PM UTC

Hi Vijayalakshmi,

thanks for the information. So I wait until it fixed.

Regrads

Uwe



VR Vijayalakshmi Roopkumar Syncfusion Team August 9, 2021 08:58 AM UTC

Hi Uwe 
 
Thank you for your patience. 
 
On further analyzing, we have been implemented the margin space of  MenuItemSeparator to be incorporate only for our MenuAdv control. So when we use the MenuAdv , the MenuItemSeparator has been recommended. However it does not support for MenuAdv when it has been using as Context Menu. We can confirm it is a behavior of our MenuAdv control. So we suggest you to use the standard Separator in this case. 
 
Please let us know if you need any other assistance on this. 
 
Regards, 
Vijayalakshmi VR 


Marked as answer

UP Uwe Porsch August 9, 2021 11:46 AM UTC

Thanks that works.



VR Vijayalakshmi Roopkumar Syncfusion Team August 10, 2021 04:41 AM UTC

Hi Uwe 
  
Thank you for the update. 
  
Please let us know if you need any further assistance on this. 
  
Regards, 
Vijayalakshmi VR 


Loader.
Up arrow icon