Telerik blogs
  • Web

    Integrating RadMap for Silverlight in ASP.NET

    Nowadays, with the increasing adoption of Silverlight, it is not uncommon to integrate one or more Silverlight controls in an existing asp.net website. More or less, it utilizes the integration logic demonstrated in this Telerik TV entry - http://tv.telerik.com/watch/silverlight/webinar/radcontrols-silverlight-aspnet and Manol’s blogpost - http://blogs.telerik.com/manoldonev/posts/09-03-17/silverlight_radchart_interoperability_with_asp_net.aspx . If you want to know how RadMap for Silverlight can be bound to RadGrid in ASP.NET go ahead and keep reading. The most important steps are as follows: 1. Prepare the Silverlight application, adding references to the dlls of the controls it contains. In our case, this is a simple XAML page, containing a RadMap control: Code...
    January 24, 2011
  • Desktop WPF

    Create Special Slots in Telerik ScheduleView for WPF

    With the new SP1 release of Q3 2010 we added a new feature to RadScheduleView that helps you customize every slot in a different way. To do that you should create an instance of the Slot class, set its Start and  End  properties, the Resources property - with this property you can define in which resource column the slot will be displayed, and the RecurrencePattern property - with this property you can define whether the slot will be displayed for repeating days or events like Christmas, WeekendDays  and Birthdays. For example let's say that we have a schedule control and want to customize the days that...
  • Desktop WPF

    Controlling TreeView’s ExpanderStyle Dynamically

    Sometimes the TreeView is used in scenarios where the expander style must be styled in custom fashion. Prior 2010 Q3 SP1 there was no easy way to dynamically change the expander style of the TreeView or particular item. TreeView’s ExpanderStyle So we decided to extend the functionality provided by the TreeView. Prior this enhancement changes to the ExpanderStyle property during runtime would not affect already visible items. The property now supports dynamic values and data binding. This way you can easily change the style of the expander of all items in the hierarchy during runtime. Item’s ExpanderStyle Working only with the TreeView’s ExpanderStyle...
    January 17, 2011
  • Web

    TreeView BringIntoView

    Quite often TreeView is used in scenarios where a particular item should be displayed on the screen. You may want to display some item when the tree is initially shown on the screen or when a new item is added. These scenarios look simple but are a bit tricky because you have to wait until the TreeView loads and then make your desired actions. Waiting for Loaded Event TreeView provides the BringIntoView functionality in several forms: you can call BringIntoView from the tree itself and bring a child item; get some TreeViewItem by calling GetItemByPath and call BringIntoView upon this item container;...
    January 12, 2011
  • Web

    How to Create Ad Rotator with Telerik TransitionControl and CoverFlow control for Silverlight

    function onSilverlightError(sender, args) { var appSource = ""; if (sender != null && sender != 0) { appSource = sender.getHost().Source; } var errorType = args.ErrorType; var iErrorCode = args.ErrorCode; if (errorType == "ImageError" || errorType == "MediaError") { return; } var errMsg = "Unhandled Error in Silverlight Application " + appSource + "\n" ; errMsg += "Code: "+ iErrorCode + " \n"; errMsg += "Category: " + errorType + " \n"; errMsg += "Message: " + args.ErrorMessage + " \n"; if (errorType == "ParserError") { errMsg += "File: " + args.xamlFile + " \n"; errMsg += "Line: " + args.lineNumber + " \n"; errMsg += "Position: " + args.charPosition + " \n"; } else if (errorType == "RuntimeError") { if (args.lineNumber != 0) { errMsg += "Line: " + args.lineNumber + " \n"; errMsg += "Position: " + args.charPosition + " \n"; } errMsg += "MethodName: " + args.methodName + " \n"; } throw new Error(errMsg); } Today I'm going to show you a very simple way to turn any ContentControl or a ListBox control into an AdRotator control. "What is AdRotator control?", you would ask. A common definition for an AdRotator is a control that lets you to show some data (most commonly ads) and change it periodically. An AdRotator control should be a control that lets you do that out-of-the-box without writing any code. Furthermore, switching the ads with a nice animation will give our AdRotator more polished and glamorous look. To accomplish this, we are going to use RadTransitionControl (a ContentControl) and RadCoverFlow (a ListBox)...