It would make life so much easier!
views:
49answers:
1
+2
A:
This is completely impossible.
When you run a WPF app, the XAML is parsed in the constructor into a visual tree, which is then displayed as a form.
Edit & Continue would mean re-creating the visual tree, which would break any code in the form.
SLaks
2010-04-19 20:02:44
I wouldn't say "completely impossible". They could take a diff between the old and new XAML, then apply that diff to the current visual tree. It wouldn't be perfect, probably limited to mostly attributes, but even that would be useful.
Jonathan Allen
2010-04-19 20:08:29
@Jonathan: It would be very difficult to do and probably wouldn't work reliably. Remember that the visual tree can be changed in code, and that there is no connection between an element and the XAML that it (may have been) parsed from.
SLaks
2010-04-19 20:09:28
Starting with something limited but useful: 1. Only allow changing attributes on named elements. 2. Lookup those elements using reflection on the form's properties. 3. Assign the new values to the properties that match the attributes. I'm sure you could implement this as a function Fixup(oldXaml, newXaml, openForms) in an hour.
Jonathan Allen
2010-04-19 20:23:19
yeah, completely impossible seems like a challenge to me! ;)
miguel
2010-04-19 20:25:02