+1  A: 
 if (DesignerProperties.GetIsInDesignMode(this))
 {
     //In design-mode
 }

see here

ArsenMkrt
is this not possible, disable the dualscreen?
Mario Priebe
you can set in VS configs to show only xaml, vs properties->text editors->Miscellaneous->Always open document in xaml full view
ArsenMkrt
that was what I need, big thx!
Mario Priebe
A: 

In vs2010 goto:

Options > Text Editor > XAML > Miscellaneous

Under "Default View" Section

check Always open documents in full XAML view

Yıldıray Meriç