Telerik blogs

Latest

  • Web

    Binding a ComboBox to Enum Values with RadControls for Silverlight

    A common request in our support is to display a combo box, containing all values of a specific Enum. This is fairly easy with RadComboBox for Silverlight - all you need to do is to fill its ItemsSource collection with the Enum values. The best way to do this is to create a view model for the Enum: using System; using System.Collections; using System.Linq; using System.Reflection; namespace SilverlightApplication1 { public class EnumModel { private Type enumType; public IEnumerable Values { get; private set; } [TypeConverter(typeof(TypeTypeConverter))] ...
    June 12, 2009
  • Web

    Silverlight/WPF RadChart axis improvements.

    Along with the numerous updates that are coming up with the Q2.2009 version of RadChart for WPF/SL, we are going to introduce significant improvements of the way our horizontal axis handles user data. Actually, a bunch of new features will make the horizontal axis much more intelligent and easy to use. First of all, the horizontal axis will be able to properly handle "X" value data! As soon as a DataPoint with meaningful "X" value is received, the horizontal axis will enter "strict" mode and will place it appropriately.      To make this possible we also implemented the following supporting features: Automatic range calculation...
    June 04, 2009
  • Web ASP.NET AJAX

    Common RadWindow issues and their solution

    The RadWindow control is part of the Telerik’s RadControls for ASP.NET AJAX suite and is intended to replace the standard browser’s popup (window.open()). Since the control is based on an IFRAME, it behaves just like one – basically, whatever can be done with an IFRAME, can be achieved with RadWindow as well. This fact is useful when you investigate a reason for some problem related to the RadWindow control. Just replace the RadWindow with a standard IFRAME or browser’s popup and see how your application will behave in this case. If the problem still exists, then it is not related to the...
    June 04, 2009
  • Web

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

    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...
  • Web

    Reusing and customizing a single ContextMenu on a TreeView with RadControls for Silverlight

    This is part two of my Attaching a ContextMenu on TreeView blog post. I will show another approach for adding context menu on a treeview, that uses a single menu that is customized for each treeview item. One context menu per treeview should provide much better performance if the treeview is bound to a large data set, since there are much less visual elements that have to be created. I am also using an updated view model, where each item contains a reference to its parent. This will help me to rely entirely on the model for my application logic, which greatly...
    June 01, 2009