Telerik blogs

Latest

For the latest product updates, please visit Release.

  • 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...
    May 12, 2010 3 min read
  • Desktop WPF

    Using RadRibbonWindow with RadRibbonBar for WPF

    As you can expect, we have received a lot of great feedback from the community regarding RadRibbonBar.  One thing that people always asked about, however, was how to better integrate the RadRibbonBar into the actual window itself.  This way, rather than having the Window title and RadRibbonBar title both displaying, it would provide for a more seamless user experience.  Well, we listened. :) With our latest release, we have included the RadRibbonWindow to the RadControls for WPF library, allowing you to take the old window + RadRibbon combination and create something a little more visually compelling. First we want to add the...
    May 03, 2010 2 min read
  • Desktop WPF

    Blazing fast performance with RadGridView for WPF 4.0 and Entity Framework 4.0

    Just before our upcoming release of Q1 2010 SP1 (early next week), I’ve decided to check how RadGridView for WPF will handle complex Entity Framework 4.0 query with almost 2 million records: public class MyDataContext{    IQueryable _Data;    public IQueryable Data    {        get        {            if (_Data == null)            {                var northwindEntities = new NorthwindEntities();                var queryable = from o in northwindEntities.Orders                               from od...
    April 15, 2010 1 min read
  • Desktop WPF

    Implementing logical paging with RadDataPager for WPF and Silverlight

    Following the great series about RadDataPager started by Rossen and Pavel today I’m going to show you how to implement logical paging. We are going to implement alphabetical paging similar to this ASP.NET AJAX Grid Demo. As you may already know the key to the heart of the RadDataPager is the IPagedCollectionView interface. You can create your own implementations of this interface and implement any custom logic for paging you want. This is exactly what we are going to do in this article. Introducing PagedCollectionViewBase and LogicallyPagedCollectionView<T> If you have looked at IPagedCollectionView interface you may have found out that it is not a trivial interface to...
    April 11, 2010 4 min read
  • Desktop WPF

    Conditional styles and templates with RadGridView for Silverlight and WPF

    I’m happy to announce that with our upcoming Q1 2010 Service Pack 1 (middle of April) you will be able to apply conditionally styles and templates for RadGridView easily using DataTemplateSelectors and StyleSelectors for both Silverlight and WPF: You can test the new functionally with our upcoming latest internal build this Friday and in the meantime here is an example: XAML <Grid x:Name="LayoutRoot"> <Grid.Resources> <local:MyStyleSelector x:Key="styleSelector" /> <local:MyDataTemplateSelector x:Key="templateSelector" /> </Grid.Resources> <telerik:RadGridView AutoGenerateColumns="False" ItemsSource="{Binding}" RowStyleSelector="{StaticResource styleSelector}"> <telerik:RadGridView.Columns> ...
    April 01, 2010 1 min read