Telerik Forums
UI for Silverlight Forum
5 answers
141 views

Using this example as a base, I created a custom class to add a special right click menu onto any RadGridView item:

Example: https://github.com/telerik/xaml-sdk/blob/master/GridView/CopyPasteFunctionality/GridViewClipboardContextMenu.cs

Code:

 

public GridViewCopyContextMenu(RadGridView grid)
{
    this.gridView = grid;
 
    Image iconCopy = new Image() {
        Stretch = Stretch.None,
        Source = new BitmapImage(new Uri("/Images/copyIcon.png", UriKind.RelativeOrAbsolute))
    };
 
    this.contextMenu = new RadContextMenu();
    this.contextMenu.Items.Add(new RadMenuItem() { Header = GridViewCopyContextMenu.COPY_SELECTED_CELL_WITHOUT_HEADER_HEADER });
    this.contextMenu.Items.Add(new RadMenuItem() { Header = GridViewCopyContextMenu.COPY_SELECTED_CELL_WITH_HEADER_HEADER });
    this.contextMenu.Items.Add(new RadMenuItem() { Header = GridViewCopyContextMenu.COPY_SELECTED_ROW_WITHOUT_HEADER_HEADER });
    this.contextMenu.Items.Add(new RadMenuItem() { Header = GridViewCopyContextMenu.COPY_SELECTED_ROW_WITH_HEADER_HEADER });
    this.contextMenu.Items.Add(new RadMenuItem() { Header = GridViewCopyContextMenu.COPY_ALL_ROW_WITHOUT_HEADER_HEADER });
    this.contextMenu.Items.Add(new RadMenuItem() { Header = GridViewCopyContextMenu.COPY_ALL_ROW_WITH_HEADER_HEADER });
 
    this.contextMenu.Opened += RadContextMenu_Opened;
    this.contextMenu.ItemClick += RadContextMenu_ItemClick;
 
    RadContextMenu.SetContextMenu(this.gridView, this.contextMenu);
}

If I modify any single item to add "Icon = iconCopy, " into the properties, I get the following runtime error:

Category: ParserError
Message: Failed to assign to property 'System.Windows.Controls.ContentPresenter.Content'.

I've tried using "/Images/copyIcon.png" and "MyProject;component/Images/copyIcon.png"; the end result is the same. If I put the source with the either format in xaml on a RadContextMenu, I can see the actual intended image during design time, but I get the same runtime error during runtime.

 

What can I do to fix this so my icon will show? I am using Silverlight 5, on Runtime Version v4.0.30319, with Telerik Version 2014.1.224.1050.

 

Thanks
Nasko
Telerik team
 answered on 14 Oct 2015
0 answers
40 views

I have a radTreeListView with multiple parent nodes,which can contain multiple child nodes which can also contain multiple sub-child nodes.

I want to make sure only 8 items are selected and no more than that. Those 8 selections MUST also be under the same parent node.

Biya
Top achievements
Rank 1
 asked on 01 Nov 2013
2 answers
37 views
I'm new to Silverlight and I'm struggling with something that seems like it should be simple and would appreciate any help that can be provided.

I'm trying to implement the RadContextMenu in our applications and the addition of the RadContextMenu itself has been very simple but we use Silverlight's ContextMenuService to dynamically add items to the context menu (such as adding common functionality from our customized data grid control). I have not been able to figure out a way to continue to use the ContextMenuService and add a RadMenuItem to a RadContextMenu. Are there any examples or documentation that dives into this a bit deeper on how to implement this? I've referred to the Telerik documentation but the examples are simple and don't cover this scenario and I feel at a loss.

Thank you.
Michael
Top achievements
Rank 1
 answered on 04 Jan 2013
4 answers
181 views
Hi,
I want to Highlight the selected Rad Menu item from my menu. But i'm unable to highlight it. I have added 'checked' Visual State in NavBarTopLevelItemTemplate but still not help. Any help on how to highlight the selected menu item?

 

 

Mahesh
Top achievements
Rank 1
 answered on 23 Nov 2012
3 answers
104 views
Hi...
I would like to create someway of navigation, that when a user clicks on a menu button, for example a RadRibbonButton, the application will dynamically create a new RadTabItem, unless that RadTabItem isn't already created.

I want to do this using the MVVM pattern. Inside each RadTabItem, by passing a parameter, i will load a view, for example a Customer view.

Someone could give me some tips of how to implement this?

Thanks!
Hristo
Telerik team
 answered on 12 Oct 2012
2 answers
55 views
Hi:

I am upgrading a Telerik Silverlight app to use roles for the menu -- i.e. only allow people in certain ASP.NET membership roles to see or execute certain menu items.  In non-SL code, I would use a sitemap, but that does not seem to be an option here.  How do I enforce roles with a RadMenu?
Terry
Top achievements
Rank 1
 answered on 25 Jun 2012
2 answers
98 views
Hi,

I have installed 2011 Q2 version and from that time I'm getting the bellow error

Failed to create a 'System.Type' from the text 'telerik:RadNavigationButton'

The previous version I was using was 2010 Q3 . I'd be thankful you let me know what I should do to fix the issue.

Many thanks,
Naseem
Tina Stancheva
Telerik team
 answered on 26 Apr 2012
1 answer
39 views
Hello,

I am working in a Silverlight 4 business application where I would like to have a specific area on the main page where I would like to have a kind of Navigation Bar control, that is present on iOS for example:
http://developer.apple.com/library/ios/#documentation/userexperience/conceptual/mobilehig/UIElementGuidelines/UIElementGuidelines.html

There is a nice transition when you navigate back and forth and a button on the upper left containg the previous "Mater" item that was selected.

Is there any control on Telerik that can produces the same results?

Thank you,

Igor.
Miro Miroslavov
Telerik team
 answered on 18 Apr 2012
1 answer
80 views
Hi,

How can I create a navigation pane like MS Outlook or Telerik controls site?Please let me know.

Like Telerik controla explanation ,

Controls an left side navigation pane and the explanation of controls on the right hand side on same page.


Thanks in advance
Spoorthy.
Tina Stancheva
Telerik team
 answered on 06 Mar 2012
2 answers
38 views

I have a situation where I am trying to setup my project to use the RadMenu control.  I have copies of the Telerik 2011 Q2 Retail Binaries in a 3rdParty folder within the solution.  I reference those files in my project and create a simple implementation of the RadMenu,

<telerik:RadMenu Grid.Row="0">
    <telerik:RadMenuItem>
        <telerik:RadMenuItem>Title</telerik:RadMenuItem>
    </telerik:RadMenuItem>
</telerik:RadMenu>

At this point, I get the HRESULT error,
Exception: Error HRESULT E_FAIL has been returned from a call to a COM component.
Now, if I were to use the RadControls Silverlight Application project, and repeat the same workflow, I would get a page that would work just as expected.

So I ask, is adding the DLL's to a Silverlight project an unsupported means to include telerik controls?
Thanks
Rick

Petar Mladenov
Telerik team
 answered on 06 Oct 2011
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?