• .NET

    WPF / Silverlight: Integrating RadChart and RadContextMenu Controls

    One common request that we are receiving recently is how to integrate the RadChart and RadContextMenu controls so they play nicely together. A typical real-life scenario would probably require that each ChartItem should display different (context-specific) set of menu items. In order to address the increased interest in this functionality we decided to add a new integration example for the Q1 2010 release but for those of you that need something working right now, here is a quick overview of the required steps to add context-specific menu to Bar series items in RadChart (this can be applied to any series...
  • .NET

    Drop-Down Menu Button with Telerik ContextMenu for Silverlight

    September 07, 2009 Share
    Sometimes, when a button is clicked we want to display a drop-down menu with options. This is handy interface, usually present in toolbars, but sometimes - as standalone buttons, like the Save As button in the the VS2008 Save As dialog. Sometimes the drop-down buttons consist of two parts – action and menu, and are called split buttons. In this post I will demonstrate how to achieve the drop-down menu button part. If you need a split button, just add another button and keep track of what was the last clicked menu item. Note, that with Q3 2009 we will...
  • .NET

    RadioButton and CheckBox Menu Items with RadMenu for Silverlight

    June 19, 2009 Share
    RadMenu for Silverlight supports simple checkable items, but still does not support radio button items. This feature is scheduled for development and most probably will come with Q3 2009, but until then you have to code it by yourself. Fortunately, this is relatively easy with a proper ViewModel, that contains the radio-button logic: The CommandItem class contains the properties and the logic for a RadMenuItem. It implements INotifyPropertyChanged and its most important property is IsChecked: public bool IsChecked { get { return this.isChecked; } set ...
  • .NET

    Scrollable Menu – Workaround with a Multi-Column Menu and RadControls for Silverlight

    June 18, 2009 Share
    RadMenu and RadContextMenu for Silverlight cannot automatically scroll their items if their height exceeds a certain height. We are planning to implement this feature in the near future, but at the moment there are two workarounds for the developers: override the RadMenu control template and add ScrollViewer controls around the ItemsPresenters, or customize the ItemsPanel of the RadMenuItem controls, so the sub-items are displayed in columns. The second option is much easier and looks good enough: The main idea is to replace the RadMenuItem ItemsPanel, that is a StackPanel by default, with a WrapPanel. To set the ItemsPanel property of all...
  • .NET

    Data-binding menu, context menu and toolbar, a.k.a. a simple text editor for Silverlight

    June 02, 2009 Share
    This demo extends my previous sample, that demonstrated how to add a right click context menu on a TextBox. Here I will show how to create context sensitive main menu and toolbar, in addition to the context menu. The demo will also demonstrate some advanced enhancements that we added to the Silverlight 2 Framework, such as merged dictionaries and container bindings. The application enables/disables the Cut and Copy commands when there is no selection and also disables the Paste command when there is no clipboard content. As in the previous blog post, the clipboard methods work only in IE. Here is how...