tags:

views:

295

answers:

2

While using WPF i noticed that when i add a control to a xaml file, the default constructor is called. Is there a way to call a parametrized constructor.

+5  A: 

No. Not from XAML.

Alun Harford
+3  A: 

.NET 4,0 brings a new feature that challenges the answer.

x:Arguments Directive http://msdn.microsoft.com/en-us/library/ee795382.aspx

<object ...>
<x:Arguments>
oneOrMoreObjectElements
  </x:Arguments>
</object>
Raskal
Nice, I'm glad you brought this up.
Jeff M