예제 #1
0
 /// <summary>
 /// Returns a content view model for the specified contentID which needs to be displayed as a document
 /// The contentID is the ID used in AvalonDock
 /// </summary>
 /// <param name="contentId">The contentID which needs to be displayed as a document in Wider</param>
 /// <returns>The content view model for the given info</returns>
 public ContentViewModel GetViewModelFromContentId(String contentId)
 {
     for (Int32 i = ContentHandlers.Count - 1; i >= 0; i--)
     {
         IContentHandler opener = ContentHandlers[i];
         if (opener.ValidateContentFromId(contentId))
         {
             ContentViewModel vm = opener.OpenContentFromId(contentId);
             vm.Handler = opener;
             return(vm);
         }
     }
     return(null);
 }