• .NET

    Comparing Generic Types

    January 10, 2009 Share
        Today I was dealing with the problem of comparing generic types in Silverlight. After researching the problem I found many similar issues for which I couldn't find any straightforward solution on the web. So here we go - a post on the issue how to compare generic types. First, let’s say we have a simple generic class which is composed of two generic properties A and B, and a method that we will later use to compare these two properties. Moreover, I will constraint the class to invoke the constructor of the generic type argument by using where T : new()      public class GenericClass<T> where T : new()       {...
  • .NET

    Passing parameters to a UserControl inside RadWindow for Silverlight

    January 07, 2009 Share
    I just wrote a simple application that demonstrates how to databind a treeview to a dummy data source and edit its items in a UserControl, placed in a RadWindow. You could see my other blog posts for examples with web service binding and upgrade the application to suit your needs. To accomplish the requirements, we need to add a property that will contain the edited data item on the UserControl. When the selection in the TreeView changes, we will update that property with the new selection and then open the RadWindow. The UserControl will create a copy of the data item...
  • .NET

    Auto-complete ComboBox with WCF Service and RadControls for Silverlight

    December 04, 2008 Share
    Sometimes we need to load very large amount of items in a ComboBox and let the user select one of them. Usually in those cases the ComboBox allows typing in order to auto-select the items, that contain the text in the control. Such scenarios are possible with RadComboBox for Silverlight and now I will show you a simple application, that demonstrates what I think is a better practice for the implementation. We want to put all words from the English dictionary of RadSpell for ASP.NET in a RadComboBox for Silverlight and allow the user to select one of them, that will...
  • .NET

    RadControls for Silverlight 2 - Drag and Drop Basics

    October 15, 2008 Share
    Who would not like to implement a sleek drag and drop in minutes? I definitely would. This is why I find the new RadDragAndDrop a welcome addition to the controls. Straight to the point then: How to implement a simple drag/drop? To answer this question I will walk you through the DragDrop example that is available here: http://demos.telerik.com/silverlight/#Examples/DragAndDrop/FirstLook This example shows that the DragDrop can be used with any controls/objects, not just the Telerik RadControls. DragDrop 101 Few simple things to remember: Every object that will be dragged must have AllowDrag property to true, it is an attached property and in xaml it can be set the following way:   <Rectangle...
  • .NET

    RadControls for Silverlight Demo with ADO.NET Data Services

    October 09, 2008 Share
    Yesterday I wrote about how to databind RadTreeView for Silverlight to ADO.NET Data Service and use Load on Demand. The simple application from yesterday was upgraded to a small back-end application for the Northwind database, that allows editing and deleting products. This time I decided to give it to one of our designers and our new Silverlight front end developer and they implemented this slick design: The application is available online: http://demos.telerik.com/silverlight/northwindbackend/Default.aspx The source code can be downloaded from here: NorthwindBackend.zip In addition to yesterday's application, NorthwindBackend has extended data source, that provides simple undo mechanism and ability to update and delete products...