// Token: 0x060046ED RID: 18157 RVA: 0x00141CEC File Offset: 0x0013FEEC
 internal void BuildVisualTree()
 {
     if (this.NeedsVisualTree)
     {
         DataGridColumn column = this.Column;
         if (column != null)
         {
             DataGridRow rowOwner = this.RowOwner;
             if (rowOwner != null)
             {
                 BindingGroup bindingGroup = rowOwner.BindingGroup;
                 if (bindingGroup != null)
                 {
                     this.RemoveBindingExpressions(bindingGroup, base.Content as DependencyObject);
                 }
             }
             FrameworkElement frameworkElement  = column.BuildVisualTree(this.IsEditing, this.RowDataItem, this);
             FrameworkElement frameworkElement2 = base.Content as FrameworkElement;
             if (frameworkElement2 != null && frameworkElement2 != frameworkElement)
             {
                 ContentPresenter contentPresenter = frameworkElement2 as ContentPresenter;
                 if (contentPresenter == null)
                 {
                     frameworkElement2.SetValue(FrameworkElement.DataContextProperty, BindingExpressionBase.DisconnectedItem);
                 }
                 else
                 {
                     contentPresenter.Content = BindingExpressionBase.DisconnectedItem;
                 }
             }
             base.Content = frameworkElement;
         }
     }
 }