public void OnEventAcquired(object sender, ParserEventArgs args) { try { //Update property window anyway PropertyGridViewModel.Clear(); DataViewModel?.Clear(); if (args == null) { throw new NullReferenceException("Invalid arguments passed"); } PropertyGridViewModel.AddData(args.TreeNode?.Properties); var argsType = args.ArgsType; if ((argsType & MessageType.ProcessAll) != 0) { DataViewModel = MarkupManager.Resolve(args.TreeNode?.Markup) ?? new DataGridViewModel(); DataViewModel.ProcessNodeData(args.TreeNode); } DataViewModel?.Refresh(); PropertyGridViewModel.Refresh(); } catch (Exception ex) { MessageBoxInstance.Raise(ex.Message); } }