Telerik blogs
  • Productivity Testing

    Get training on Telerik WebUI Test Studio!

    Our partners from Falafel Software are starting 2-day online training sessions on Telerik Automated Testing Tools. This instructor-led course provides students with the skills to test applications built with the latest web technologies. You will learn Telerik WebUI Test Studio Developer Edition from the ground up and you will be able to automate any website or application: HTML, ASP.NET, JavaScript, AJAX, Silverlight and MVC.  See more details and register!
    May 12, 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....
  • Productivity

    Revised Code Library projects

    In order to provide a better usability with the 2010 Q1 release we introduced the new Visual Designer for Telerik Open Access ORM. We have been focusing on what we can do to improve your experience using OpenAccess. We have also introduced the new Context replacing the Object Scopes and various types of mappings used to define our model (currently only in reverse mapping scenarios). This being a major change we felt we needed to revise our Code Library assets and show you how to use OpenAccess to its full potential. Below is a list of the revised examples : ·...
    May 12, 2010
  • Desktop WinForms

    Styling Cells in RadGridView for WinForms

    In RadGridView you have to handle the CellFormatting event when you want to customize the look and feel of grid cells. This is so because RadGridView uses UI virtualization. It creates elements only for cells that are currently visible - when scrolling they are reused. Of course, it will be much easier if we could access the cell directly and set its visual properties without an event. In our next release (Q2 2010) this will be possible. By using the Style property you can set the desired background color or change the font size. Here is a sample: this.radGridView1.Rows[5].Cells["Name"].Style.BackColor = Color.Red; this.radGridView1.Rows[5].Cells["Name"].Style.Font = new Font(SystemFonts.DialogFont, FontStyle.Italic);   All...
  • Productivity Testing

    Get training on Telerik WebUI Test Studio!

    Our partners from Falafel Software are starting 2-day online training sessions on Telerik Automated Testing Tools. This instructor-led course provides students with the skills to test applications built with the latest web technologies. You will learn Telerik WebUI Test Studio Developer Edition from the ground up and you will be able to automate any website or application: HTML, ASP.NET, JavaScript, AJAX, Silverlight and MVC.  See more details and register!
    May 12, 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....
  • Productivity

    Revised Code Library projects

    In order to provide a better usability with the 2010 Q1 release we introduced the new Visual Designer for Telerik Open Access ORM. We have been focusing on what we can do to improve your experience using OpenAccess. We have also introduced the new Context replacing the Object Scopes and various types of mappings used to define our model (currently only in reverse mapping scenarios). This being a major change we felt we needed to revise our Code Library assets and show you how to use OpenAccess to its full potential. Below is a list of the revised examples : ·...
    May 12, 2010
  • Desktop WinForms

    Styling Cells in RadGridView for WinForms

    In RadGridView you have to handle the CellFormatting event when you want to customize the look and feel of grid cells. This is so because RadGridView uses UI virtualization. It creates elements only for cells that are currently visible - when scrolling they are reused. Of course, it will be much easier if we could access the cell directly and set its visual properties without an event. In our next release (Q2 2010) this will be possible. By using the Style property you can set the desired background color or change the font size. Here is a sample: this.radGridView1.Rows[5].Cells["Name"].Style.BackColor = Color.Red; this.radGridView1.Rows[5].Cells["Name"].Style.Font = new Font(SystemFonts.DialogFont, FontStyle.Italic);   All...