SAML and WCF July 27, 2010
WPF Margins and Padding August 9, 2009
Margins and padding WPF work much like margins and padding other paradigms such as windows forms or CSS. Margins give you space outside of the control, and padding gives you space inside the control. The amount of spacing is set by the number of pixels you want to represent.
In WPF, when you represent the spacing for these, you can set the values in line. For instance, if you want to place a 2 pixel margin around a control you could write it as Margin=”2″, Margin=”2, 2, 2, 2″, or Margin=”2 2 2 2″. This is very similar to CSS, but there is a big difference. In CSS, the values represent “Top, Right, Bottom, Left”, but in WPF, the values represent”Left, Top, Right, Bottom”. Why did WPF break the mold on this one? Even if the order made more sense (which it doesn’t), I still can’t agree with this change. CSS is a standard and has set a precedence. Designers and developers who are using WPF have probably worked with CSS in some context. This is going to throw a lot of people off. Especially if the are going back and forth between CSS and WPF. What about developers who are writing silverlight controls as well as the web pages that contains them?
WPF Windows Events August 8, 2009
Windows.Window events (WPF)
Loading/opening new window (application startup), events fired are:
Closing a WPF Window, the events that fire are:
DependencyObject originalSource = (DependencyObject)e.OriginalSource;
while ((originalSource != null) && !(originalSource is ListBoxItem))
originalSource = VisualTreeHelper.GetParent(originalSource);
if (originalSource != null)