Code reuse

Is it possible to create a reusable user control based on GoXam Silverlight / WPF ?



for example I will created a control for SilverLight based on GoSilverlight and then will reuse it WPF ?



something like here :

http://www.telerik.com/products/salesdashboard.aspx



I just need to display a complex diagram for my project .

Do you have a sample demonstrating desired functionality ?



thanks .

Yes, it is possible to do this.

In fact, if you compare the C# files used in GoSilverlightDemo with those in GoWpfDemo, you will find that they are identical.

There are differences between the platforms, so some code differences are necessary. These are handled using #if in C# code, but there is no such mechanism in XAML.

However, most of the XAML differences can go away when you target Silverlight 4, because Microsoft re-implemented the XAML parser in Silverlight 4. But because we offer kits for both Silverlight 3 and Silverlight 4, the XAML is written to the least common denominator – Silverlight 3, which increases the differences with WPF.

I also talk about this in this topic.