Hello
Question about ===> public ControlTemplate SeparatorTemplateKey {get;set}
I don't know how to use (public ControlTemplate SeparatorTemplateKey {get;set}
). Please teach me.
I don't know how to use (public ControlTemplate SeparatorTemplateKey {get;set}
), so it's very difficult for me.
<
Window.Resources
>
<
ControlTemplate
x:Key
=
"SeparatorTemplate"
TargetType
=
"telerik:RadMenuItem"
>
<
Grid
HorizontalAlignment
=
"Stretch"
>
<
Rectangle
Fill
=
"Red"
Height
=
"20"
Width
=
"1"
VerticalAlignment
=
"Stretch"
/>
<
Rectangle
Fill
=
"Blue"
Height
=
"20"
Width
=
"1"
VerticalAlignment
=
"Stretch"
/>
</
Grid
>
</
ControlTemplate
>
</
Window.Resources
>
<
Grid
x:Name
=
"LayoutRoot"
Background
=
"White"
>
<
telerik:RadMenu
x:Name
=
"radMenu"
ClickToOpen
=
"False"
VerticalAlignment
=
"Top"
HorizontalAlignment
=
"Left"
Margin
=
"8,8,0,0"
>
<
telerik:RadMenuItem
Header
=
"File"
/>
<
telerik:RadMenuItem
Header
=
"Edit"
IsSeparator
=
"True"
Template
=
"{StaticResource SeparatorTemplate}"
/>
<
telerik:RadMenuItem
Header
=
"View"
/>
</
telerik:RadMenu
>
</
Grid
>
--------
using System.Windows.Controls;
public override ObservableCollection<MenuItem> GetMenu()
{
var contextmenuitem = new ObservableCollection<MenuItem>();
var eRNode = crateMenuItem("Report");
eRNode.Items.Add(createMenuItem("Sub"));
contextmenuitem.Add(Separate); <===
ControlTemplate template = new ControlTemplate();
template.key = "Tamplate";
contextmenuitem.Add(SeparatorTemplateKey(template)); <===ControlTemplate x:Key="Template" OF XAML.xaml File .... <==I don't know grammar. How do I write code?
contextmenuitem.Add(eRNode);
}
I am a genuine Teleric license user. I bought it about 10 years ago, but I lost the license.
I discourage using telerics because they don't answer questions.
Teleric is stingy with answers.Knowledge is better developed when you ask and answer questions about different ideas.
If you save knowledge, there is no progress.
I tell others not to use telerics.
there is no detail manual
Hello Anna, please note that the forums are not part of the Telerik's support services. They are a free community based resource and Telerik doesn't promise answers in the forum. We often join the forum conversations, but we are not obligated to do so. If you need guaranteed answers for your technical queries, I strongly suggest you to purchase a support plan and use the Telerik's ticketing support service.