4 Answers, 1 is accepted
0
Hello Xaria D,
The only possible solution when sharing a visual element among multiple instance is to set x:Shared="false".
Kind regards,
Kaloyan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
The only possible solution when sharing a visual element among multiple instance is to set x:Shared="false".
<
Application
x:Class
=
"WpfApplication1.App"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
StartupUri
=
"MainWindow.xaml"
>
<
Application.Resources
>
<
telerik:RadContextMenu
x:Key
=
"contextMenu"
x:Shared
=
"false"
>
<
telerik:RadMenuItem
Header
=
"File"
/>
<
telerik:RadMenuItem
Header
=
"Open"
/>
<
telerik:RadMenuItem
Header
=
"Delete"
/>
</
telerik:RadContextMenu
>
</
Application.Resources
>
</
Application
>
Kind regards,
Kaloyan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Xaria D
Top achievements
Rank 1
answered on 14 Jun 2010, 03:52 PM
But how can the main window display a RadContextMenu?
<Window.ContextMenu>
<StaticResource ResourceKey="contextMenu"/>
</Window.ContextMenu>
accepts a ContextMenu, not RadContextMenu, and I cannot use RadWindow as MainWindow.
0
Hi Xaria D,
The RadContextMenu and the default WPF ContextMenu are two different controls. Check the code bellow that will help you refering the RadContextMenu as a resource:
Best wishes,
Kaloyan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
The RadContextMenu and the default WPF ContextMenu are two different controls. Check the code bellow that will help you refering the RadContextMenu as a resource:
<Window telerik:RadContextMenu.ContextMenu=
"{StaticResource contextMenu}"
/>
Best wishes,
Kaloyan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Xaria D
Top achievements
Rank 1
answered on 06 Jul 2010, 04:30 AM