public void GetInfo(out RegionInfo logicalInfo, out RegionVisualInfo visualInfo) { logicalInfo = new RegionInfo() { RegionName = RegionName }; if (LogicalSerializationMode == LogicalSerializationMode.Enabled) { logicalInfo.SelectedViewModelKey = SelectedKey; } foreach (var item in items) { if (GetLogicalSerializationMode(item.Key) == LogicalSerializationMode.Disabled) { continue; } var itemInfo = item.GetLogicalInfo(); if (itemInfo != null) { logicalInfo.Items.Add(itemInfo); } } UpdateVisualState(); visualInfo = VisualState; }
public void GetInfo(out RegionInfo logicalInfo, out RegionVisualInfo visualInfo) { SaveLogicalState(); UpdateVisualState(); visualInfo = VisualState; logicalInfo = LogicalState; }
public void SetInfo(RegionInfo logicalInfo, RegionVisualInfo visualInfo) { VisualState = visualInfo; if (logicalInfo == null) { return; } foreach (var itemInfo in logicalInfo.Items) { if (GetLogicalSerializationMode(itemInfo.Key) == LogicalSerializationMode.Disabled) { continue; } items.Add(new RegionItem(viewModelLocator, viewLocator, stateSerializer, itemInfo)); } restoreSelectedKey = logicalInfo.SelectedViewModelKey; }
public void SetInfo(RegionInfo logicalInfo, RegionVisualInfo visualInfo) { VisualState = visualInfo; LogicalState = logicalInfo; foreach (var itemInfo in LogicalState.Items) { if (GetLogicalSerializationMode(itemInfo.Key) == LogicalSerializationMode.Disabled) { continue; } if (!itemInfo.IsInjected) { continue; } items.Add(new RegionItem(owner, itemInfo)); } if (LogicalSerializationMode == LogicalSerializationMode.Enabled) { restoreSelectedKey = logicalInfo.SelectedViewModelKey; } }