title: Linking WPF object to C# styling
body: <p>I'm using the <code>TreeList</code> control from DevExpress. I'm trying to color in the some cells based on their value. I got the code structure from <a href="https://documentation.devexpress.com/#WindowsForms/CustomDocument5650" rel="nofollow">here</a>. However, my c# function does not seem to be linked to my WPF object. How can I link it together so it handles the <code>TreeList.NodeCellStyle</code> event?</p>
  
  <p><strong>Sample Code</strong></p>
  
  <pre><code>private void treeList1_NodeCellStyle(object sender, GetCustomNodeCellStyleEventArgs e) {
     // Modify the appearance settings used to paint the "Budget" column's cells
     // whose values are greater than 500,000.
     if (e.Column.FieldName != "Budget") return;
     if (Convert.ToInt32(e.Node.GetValue(e.Column.AbsoluteIndex)) &gt; 500000) {
        e.Appearance.BackColor = Color.FromArgb(80, 255, 0, 255);
        e.Appearance.ForeColor = Color.White;
        e.Appearance.Font = new Font(e.Appearance.Font, FontStyle.Bold);
     }
  }
  </code></pre>
  
  <p><strong>Sample WPF</strong></p>
  
  <pre><code>&lt;dxt:TreeListControl Name="treeList"&gt;
      &lt;dxt:TreeListControl.Columns&gt;
          &lt;dxt:TreeListColumn FieldName="ClientID" Header="Heirarchy"/&gt;
          &lt;dxt:TreeListColumn FieldName="InstrumentID" /&gt;
          &lt;dxt:TreeListColumn FieldName="OrderID" /&gt;
          &lt;dxt:TreeListColumn FieldName="Status" /&gt;
          &lt;dxt:TreeListColumn FieldName="OpenPosition" /&gt;
          &lt;dxt:TreeListColumn FieldName="ExecPosition" /&gt;
          &lt;dxt:TreeListColumn FieldName="CumOpenPosition" /&gt;
          &lt;dxt:TreeListColumn FieldName="CumExecPosition" /&gt;
          &lt;dxt:TreeListColumn FieldName="TransactionTime" /&gt;
          &lt;dxt:TreeListColumn FieldName="LogTime" /&gt;
      &lt;/dxt:TreeListControl.Columns&gt;
      &lt;dxt:TreeListControl.View&gt;
          &lt;dxt:TreeListView Name="treeListView1" AutoWidth="True"
                            KeyFieldName="ID" ParentFieldName="ParentID" /&gt;
      &lt;/dxt:TreeListControl.View&gt;
  &lt;/dxt:TreeListControl&gt;
  </code></pre>