Why doesn't LogicalTreeHelper return columns as children of DataGrid?

<DataGrid Style="{DynamicResource DataGridStyle1}"
          x:Name="grdMyGrid">
    <DataGrid.Columns>
        <DataGridTextColumn Header="Header 1" />
        <DataGridTextColumn Header="Header 2" />
        <DataGridTextColumn Header="Header 3" />
    </DataGrid.Columns>
</DataGrid>

' I use this for the translation stuff
LogicalTreeHelper.GetChildren(grdMyGrid)

      

Why doesn't LogicalTreeHelper return columns as children of DataGrid?

I am doing a generic function for an entire WPF control. mesh is a small part. All elements are translated, but not the columns of the grid, because the recursive translation function that uses the code LogicalTreeHelper.GetChildren(myFrameworkElement)

does not go inside the grid.

What to do?

+3


source to share





All Articles