Quite often when coming back to Visual Studio from Expression Blend 3, I see that Blend has helpfully added a "d:LayoutOverrides" property to my XAML. Growing up with ASP.NET designers, I naturally distrust anything I wouldn't type myself, so remove them as soon as I see them.
I know that "d:" properties are designer-only and don't impact runtime, but can anyone offer any insight into what this property does and why Blend would be so insistent that I have them all over my markup?
<Border d:LayoutOverrides="Height" />
That's just there so that Blend knows how to display your XAML in design mode. Specifically, if you've got a fluid layout that stretches to fill its container, there's no clear way for Blend to know how tall your design should be; LayoutOverrides defines that.
Those LayoutOverride settings entries are added when you (or another person running Blend) manually resizes the elements in the design surface. If you're seeing them all over your code (such as in a Border element):
Note that Blend's ignorable attributes are stripped out at compile time and have no affect on your application's performance. So while you may want to remove them to improve code readability, they don't affect how your application runs.
d:LayoutOverrides
If a property is set to a fixed value at runtime, but you want to override it at designtime, you can use the d:LayoutOverrides attribute. All properties that should be ignored at designtime can be listed, separated by a semicolon.
(source: http://wpftutorial.net/DesigntimeVsRuntime.html)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With