Telerik blogs
  • Desktop WPF

    How - to: Automatically re-order, re-sort and re-group RadGridView (Silverlight and WPF) on change of the underlying DataSource.

    RadGridView for Silverlight and WPF supports sorting, grouping, filtering and editing. However, if a column is sorted for example and edited afterwards, we expect the newly-edited item to find its way in the sorted GridView. But it does not, unless “coded” to do that. So, what we want to achieve is to make the Grid aware of the changes thus enabling it to organize its elements correctly, corresponding to the requirements of the user.  Therefore, the expected behavior of the application will be the following: In order to achieve the desired result, we need to take the following steps: 1. Create Business Object There...
  • Desktop WPF

    Styling RadChart for WPF and Silverlight gets easier

    It’s been awhile since the Q1 SP1 2010 release, but let me introduce you to a couple of new approaches to styling, which we added and failed to openly manifest. First, there is the ability to build your own palette of brushes, that will be applied to the RadChart: <telerik:RadChart x:Name="radChart1"> <telerik:RadChart.PaletteBrushes> <SolidColorBrush Color="Magenta" /> <LinearGradientBrush StartPoint="0,0" EndPoint="0.75,1"> <GradientStop Color="Red" Offset="0" /> <GradientStop Color="BlueViolet" Offset="0.5" /> <GradientStop Color="#af000000" Offset="1" /> </LinearGradientBrush> </telerik:RadChart.PaletteBrushes> </telerik:RadChart> .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; }   Here is the result:   Using images is as...
    May 17, 2010
  • Web

    Events in Task-It - Part 3

    Task-It Series This post is part of a series of blog posts and videos about the Task-It (task management) application that I have been building with Silverlight 4 and Telerik's RadControls for Silverlight 4. For a full index of these resources, please go here. One of the posts listed in the index provides a full source download for the application, and I will be referring to that source code in this post. Prior topics In my last 2 event-related posts I talked about passing information between components via events and using events in providing feedback to a user when time consuming operations are in progress. I also blogged recently...
    May 13, 2010
  • Desktop WPF

    TreeView in ComboBox with RadControls for Silverlight or WPF, final take

    It seems that there are many developers that want to use this combo, as my previous blog posts are quite popular. The problem with the suggested solution is that you need to customize the control template of RadComboBox. There is a much easier way to put a RadTreeView in a Popup – by using a RadDropDownButton: <telerik:RadDropDownButton HorizontalContentAlignment="Left" DropDownWidth="200" IsOpen="{Binding SelectedItem, Converter={StaticResource ObjectToFalseConverter}, ElementName=TreeView, Mode=TwoWay}" Content="{Binding SelectedItem.Text, FallbackValue='Please, select an item.', ElementName=TreeView}"> <telerik:RadDropDownButton.DropDownContent> <telerik:RadTreeView x:Name="TreeView" ItemsSource="{StaticResource Items}" ItemTemplate="{StaticResource ItemTemplate}" /> </telerik:RadDropDownButton.DropDownContent> </telerik:RadDropDownButton> .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; }   This way you could easily access the RadTreeView instance in the code-behind, however I would recommend using a ViewModel and bindings instead.   The DropDownButton Content property is bound to the SelectedItem property of...
  • Web

    Using Transitions with RadTransitionControl and TransitionPresenter in RadTabControl

    A few developers asked how to use the RadTransitionControl to enable transition effects in their applications especially in RadTabControl. The RadTransitionControl and TransitionPresenter can be used instead of ContentControl and ContentPresenter to enable some animations when their content changes. Source Code RadTabControl usually have some RadTabItems and displays the Headers of the RadTabItems with ItemsPresenter and the Content of the Selected RadTabItem in a ContentPresenter. So if we edit the template of the RadTabControl and replace the ContentPresenter with TransitionPresenter the content should switch with animation when you go from one tab to another. It’s easier to use RadTransitionControl than TransitionPresenter but the Presenter is more lightweight than the Control. We will demonstrate how to use the RadTransitionControl first....