public bool GetShelfState(string desktopWindowName, string shelfName, out XmlDocument restoreDocument) { restoreDocument = null; if (String.IsNullOrEmpty(shelfName)) { return(false); } Initialize(); DesktopWindow window = _currentDesktop.GetDesktopWindow(desktopWindowName); if (window == null) { return(false); } Shelf shelf = window.GetShelf(shelfName); if (shelf == null) { return(false); } restoreDocument = shelf.RestoreDocument; return(true); }