public override void Execute(object parameter) { var context = parameter as LayoutDesignerContext; if (context == null) { return; } var tabsLayoutDesigner = context.LayoutDesigner.LayoutDesignerView as LayoutListView; if (tabsLayoutDesigner == null) { return; } var writer = new StringWriter(); var output = new XmlTextWriter(writer); SourceTab.CommitChanges(); SourceTab.SaveLayout(output, TargetTab.DeviceId); var root = writer.ToString().ToXElement(); if (root == null) { return; } TargetTab.LoadDevice(root); tabsLayoutDesigner.Activate(TargetTab.DeviceName); }
public bool IsSourcePathValid(ColumnPath path) { if (path.Input != SourceTab && !SourceTab.IsInput(path.Input)) { return(false); } return(true); }