Пример #1
0
 private void UpdateList()
 {
     if (ErrorInfoList == null)
     {
         ErrorInfoList = new TreeViewModel();
     }
     ErrorInfoList.SingleIconSelector = i =>
     {
         var item = i as ErrorInfo;
         if (item == null)
         {
             return("DotIcon");
         }
         if (item.Siverity == ValidatorType.Error)
         {
             return("ErrorIcon_Micro");
         }
         if (item.Siverity == ValidatorType.Warning)
         {
             return("WarningIcon_Micro");
         }
         return("DotIcon");
     };
     ErrorInfoList.Data   = ErrorInfo.OfType <IItem>().ToList();
     ErrorInfoList.Submit = i =>
     {
         var bp = i as ErrorInfo;
         if (bp != null && bp.SourceNode != null)
         {
             Execute(new NavigateToNodeCommand()
             {
                 Node   = bp.SourceNode,
                 Select = true
             });
         }
     };
 }