Telerik blogs
  • Web

    Just Another Way to Visualize Your Data Using RadTreeView for Silverlight

    For the past couple of days I've been playing with the way RadTreeView renders its items. To be honest, I wasn't looking for any particular outcome. I was doing it just for fun, hoping that something interesting might come out. And it did. I ended up with something quite interesting and it would be a shame not to share it. Bellow are few screenshots which show the TreeView from its initial state to the point where its deepest item is expanded. Note: I do lack certain designer skills :) The TreeView is bound to an XML data source which has the following...
  • Web

    Reading/Writing cookies with HtmlPlaceholder for Silverlight

    Recently we received a support ticket with a question whether RadHtmlPlaceholder provides support for cookies. By default, RadHtmlPlaceholder doesn't have a mechanism for reading/writing cookies. However, with the right bits of JavaScript, everything is possible :) Imagine you have an HTML page which you want to read/write cookies to and all this has to happen from Silverlight. First, you need few JavaScript methods for reading/writing cookies. Let's call the page we want to read/write cookies to CookiesPage.html. <html>     <head>         <title>Cookies Page</title>         <script type="text/javascript">             // Create a cookie with the specified name and value             function SetCookie(name, value) {                 document.cookie = name + "=" + value;                 alert("Cookie successfully set");             }             // Retrieve the value of...
  • Web

    Performance Improvements in RadSlider

    As Miro mentioned in his last post, with the upcoming 2011 Q1 Beta, we will release a new and improved version of RadSlider. A lot new features are being added and many of the existing hot spots were addressed along the way. One of them - the performance hit when RadSlider has to re-render its ticks. I took the liberty to compare the impact of RadSlider on an application before and after we made the improvements. Scenario: Every second, for 60 seconds, generate a new ViewModel and set it as DataContext to RadSlider. Goal: See how many times the LayoutUpdated event will...
    April 22, 2011
  • Desktop WPF

    How To Drag A File From Desktop And Drop It In RadTreeView Placed In WPF Application

      Sometimes we need to extend the RadTreeView’s Drag’and’Drop abilities in order to accept external data from other applications or Windows. In this post I will show you how to successfully drag and drop images from  windows desktop / windows explorer to a RadTreeView located in a running WPF Application. Imagine we want to make a tree that shows pictures and names of our favourite football teams and our favourite players in these teams. How can we achieve this ? We can first create some ViewModels: PlayerViewModel, TeamViewModel, LeagueViewModel that all inherit from BaseViewModel. The BaseViewModel will implement the INotifyPropertyChanged interface and will expose Name(string) and ImgSource(Uri) properties. Then we will create...
    March 29, 2011
  • Web

    Using Silverlight's easing functions when expanding/collapsing items in TreeView and PanelBar

    With the upcoming Q1 2011 Beta release, we’ve decided to sugarcoat RadTreeView and RadPanelBar even more. With the release of Silverlight 3, Microsoft introduced easing functions which are basically “custom mathematical formulas to your animations. For example, you may want an object to realistically bounce or behave as though it were on a spring.” Incorporating easing functions within RadTreeView or RadPanelBar can be done using Telerik’s AnimationManager:
    February 14, 2011