WPF 的datagrid 列名中没有显示下划线是怎么回事?

引用:http://www.cnblogs.com/sqzhuyi/archive/2011/07/26/sqlserverclient.html#2831497

功能介绍:输入查询语句,显示列表

出现的问题:datatable中的列名是包含下划线的,但是绑定到datagrid后就看不到了,求解!

绑定代码:

        private DataGrid BindGrid(DataTable dt)
        {
            DataGrid dg = new DataGrid();
           
            dg.IsReadOnly = true;
            dg.ItemsSource = dt.DefaultView;
            return dg;
        }

原文地址:https://www.cnblogs.com/tiasys/p/3477033.html