I just stumbled over the following:
class AFrameworkElement : FrameworkElement
{
private void SomeMethod()
{
Size s = new Size {
Width = Height = 10
};
// the size isn't used for measuring oder arranging
}
}
Suddenly I was unable to resize the Control... IntelliSense showed the problem: I put he mouse over Height
and it showed that the FrameworkElement.Height
property was meant.
So why is it impossible to use double assignements in object initializers?