Genesys CTI User Forum
Genesys CTI User Forum => Genesys-related Development => Topic started by: petitspirou on March 21, 2017, 04:46:12 PM
-
Let's talk about Window: SystemTrayView (ISystemTrayContextMenu) <ref name="Windows" />
In the documentation, there is a screenshot of a customized systemtray but nothing about how we add item on it
Do you have information to share?
Thank you
-
Try this:
[code] container.RegisterType<ICustomMenuView, CustomMenuView>();
try
{
viewManager.ViewsByRegionName["SystemTrayFreeMenuItemsRegion"].Insert(0,
new ViewActivator()
{
ViewType = typeof(ICustomMenuView),
ViewName = "CustomMenuView",
ActivateView = true
});
}
catch(Exception e)
{
log.Error("Error SystemTrayMenuItem", e);
}[/code]
Where CustomMenuView is like this:
[code]<MenuItem x:Class="WDEScratchPad.CustomViews.CustomMenuView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:localization="clr-namespace:Tomers.WPF.Localization;assembly=Tomers.WPF.Localization"
xmlns:loc="http://schemas.tomer.com/winfx/2006/xaml/presentation"
Header="Test Menu" Click="MenuItem_Click">
</MenuItem>[/code]
-
It is Working fine
Thank you