void UpdateNodeCellsForResult(TreeModelViewNode viewNode, FileAssociation fileAssociation) { viewNode.SetValue(myPatternTypeColumn, fileAssociation.PatternType); string docType = String.Format("{0}{1}", fileAssociation.DocType, fileAssociation.Enabled ? null : " (disabled)"); viewNode.SetValue(myAssociationColumn, docType); }
protected override void UpdateNodeCells(TreeModelViewNode viewNode, TreeModelNode modelNode, PresentationState state) { base.UpdateNodeCells(viewNode, modelNode, state); viewNode.SetValue(myPatternTypeColumn, RichText.Empty); viewNode.SetValue(myAssociationColumn, RichText.Empty); var association = modelNode.DataValue as FileAssociation; if (association != null) { UpdateNodeCellsForResult(viewNode, association); } }
protected override void InitializeCells(TreeModelViewNode viewNode, TreeModelNode modelNode) { viewNode.SetValue(this.ModelColumn, new PresentableItem()); }