This is a migrated thread and some comments may be shown as answers.

RadContextMenu without icon column in silverlight

3 Answers 56 Views
Menu
This is a migrated thread and some comments may be shown as answers.
pawan
Top achievements
Rank 1
pawan asked on 13 Jan 2011, 01:35 PM
Hi

how i can show RadContextMenu without icon column in silverlight?

I am unable to find any solution for below code.

<

 

Grid x:Name="LayoutRoot" Background="White">
<TextBox x:Name="textBox" Width="200" VerticalAlignment="Top">
<telerik:RadContextMenu.ContextMenu >
<telerik:RadContextMenu >
<telerik:RadMenuItem Header="Copy" />
<telerik:RadMenuItem Header="Paste" />
<telerik:RadMenuItem Header="Cut" />
</telerik:RadContextMenu>
</telerik:RadContextMenu.ContextMenu>
</TextBox>
</Grid>

Is there any property similar to IconColumnWidth  property ?
IconColumnWidth is used with menu not with RadContextMenu.ContextMenu


Pawan

 

3 Answers, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 13 Jan 2011, 01:50 PM
Hi pawan,

IconColumnWidth is defined in MenuBase class which is a base class for RadMenu and RadContextMenu. So both classes have IconColumnWidth property.
The problem is that you are trying to set it to the attached property (e.g. <telerik:RadContextMenu.ContextMenu>)
Instead you should set it to the instance of RadContextMenu (e.g. <telerik:RadContextMenu IconColumnWidth="0">) the child of <telerik:RadContextMenu.ContextMenu > element

Let us know if you need more information.

Regards,
Hristo
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
pawan
Top achievements
Rank 1
answered on 13 Jan 2011, 03:29 PM
thanks for reply

when i added <telerik:RadContextMenu IconColumnWidth="0" >
it is throwing an error.

<

 

UserControl x:Class="SLTest.RadContextMenuTest.RadContextMenuTest2"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation" Width="400" Height="300">
<Grid x:Name="LayoutRoot" Background="White">
<TextBox x:Name="textBox" Width="200" VerticalAlignment="Top">
<telerik:RadContextMenu.ContextMenu >
<telerik:RadContextMenu IconColumnWidth="0" >
<telerik:RadMenuItem Header="Copy" IsEnabled="False" />
<telerik:RadMenuItem Header="Paste" />
<telerik:RadMenuItem Header="Cut" />
</telerik:RadContextMenu>
</telerik:RadContextMenu.ContextMenu>
</TextBox>
</Grid>
</
UserControl>

 

so tell me where i will modify the code to workable.

Pawan
0
Hristo
Telerik team
answered on 14 Jan 2011, 09:02 AM
Hello pawan,

This is the correct way to set this property. If you get an error that this property is missing then this mean that you are using older version of RadControls for Silverlight. Please download the latest official version 2010.Q3 to get this property.

Do not hesitate to write back if you need further assistance.

Best wishes,
Hristo
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Tags
Menu
Asked by
pawan
Top achievements
Rank 1
Answers by
Hristo
Telerik team
pawan
Top achievements
Rank 1
Share this question
or