WPF/Silverlight Design Data without XAML

Here's a class for our sample data. That's where the data should go into.

In App.xml define your namespace:

and then:

The last step - instantiate sample data as DesignContext. You can do it in your Window, Page or whatever. I did it in MainPage.xaml in my Windows Phone 7 application:

Our sample data is bound to whole page. Use it like every other binding.

Interface with basic implementation in C#

Today we have simple question:

How to avoid abstract classes by giving base implementation?

The story

Once in a time I was building animation system which was planned to be used in IGWOCTISI project. It happened that I wanted to created some predefined tweens (animated translations) like ScaleTo, MoveTo, RotateBy and so on.

In the horizon appeared a requirement which was pretty straightforward:

The fact was that my type T not always was able to be some Transformable object.

→ Continue reading

Visual Studio 2010 also may be messy

My C: partition on Windows is too small so sometimes I have problems with space. I have made a recent discovery that not only Windows itself but also Visual Studio 2010 is an out-of-space-situation helper.

C:\ProgramData\Microsoft Visual Studio\10.0\TraceDebugging

This is where you may find lots of files which will not be probably needed anymore. I've just deleted 2.5GB from there. I've got shocked it would be that much.

I recommend WinDirStat. It's a cool and simple application that helped me to find the path given above.