[Version 2.0] LayoutContent.IsActive property gets out of sync when loading layouts.

Mar 22, 2012 at 6:36 PM


I have an issue where the IsActive property on the LayoutContent is not always correct after loading a layout. This is due to the ActiveContent property changing, which tries to set the IsActive property, but in the IsActive setter the Root is null, so the IsActive property does not change. It leads me to question whether or not serializing IsActive to the layout is necessary. You are already serializing the IsSelected property, which seems to work fine and selects the correct item in each pane. Also when a user loads a layout and then goes to start work they will probably click on a control which will set the ActiveContent anyway, by which time the Root in the IsActive setter should no longer be null.

So my suggestion would be to not serialize/deserialize the IsActive property, and let the users next action after loading a layout determine the active content.



Mar 23, 2012 at 3:44 PM

Yes, you're right. I've added the XmlIgnore attribute to the IsActive property,