How to see design-time data-binding in XAML editor (it works in runtime)?

Make sure that you have these definitions at the root tag of your xaml file (in your case the Window tag): xmlns:mc=”http://schemas.openxmlformats.org/markup-compatibility/2006″ xmlns:d=”http://schemas.microsoft.com/expression/blend/2008″ mc:Ignorable=”d” Then, anywhere in the xaml (including the root tag) you can add this: d:DataContext=”{d:DesignInstance myNamespace:MyViewModel, IsDesignTimeCreatable=True}” Now you just need to make sure that you initialize the values in a constructor … Read more

Baseline snaplines in custom Winforms controls

As an update to the Miral’s answer.. here are a few of the “missing steps”, for someone new that’s looking how to do this. 🙂 The C# code above is almost ‘drop-in’ ready, with the exception of changing a few of the values to reference the UserControl that will be modified. Possible References Needed: System.Design … Read more

Published interface properties bug and workarounds

To summarize, the problem happens only with published interface properties that have a getter method, and the property points to component on another form/module (and that form/module is not recreated yet). In such case restoring form DFM causes an AV. I’m pretty sure the bug is in the ASM code in GetOrdProp, but it’s beyond … Read more

What approaches are available to dummy design-time data in WPF?

Using VS2010 you can use Design-Time attributes (works for both SL and WPF). I usually have a mock data-source anyway so it’s just a matter of: Adding the namespace declaration xmlns:d=”http://schemas.microsoft.com/expression/blend/2008″ Adding the mock data context to window/control resources <UserControl.Resources> <ViewModels:MockXViewModel x:Key=”DesignViewModel”/> </UserControl.Resources> Setting design-time data context <Grid d:DataContext=”{Binding Source={StaticResource DesignViewModel}}” … Works well enough.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)