我有两个网格,如下所示
<DataGrid ScrollViewer.CanContentScroll="False" GridLinesVisibility="All" VerticalGridLinesBrush="#bdced4" HorizontalGridLinesBrush="#bdced4"
RowHeaderWidth="41" HeadersVisibility="All" x:Name="MonitorListHeader" Loaded="MonitorList_Loaded" LoadingRow="dg_LoadingRow"
CanUserAddRows="False" CanUserResizeRows="False"
CanUserReorderColumns="False" SelectionUnit="Cell" HorizontalAlignment="Stretch" AutoGenerateColumns="false"
HorizontalScrollBarVisibility="Hidden" >
<DataGrid.Columns>
<DataGridTemplateColumn Width="75" Header="ID">
</DataGridTemplateColumn>
<DataGridTemplateColumn
Width="{Binding ElementName=CableColumn, Path=ActualWidth}"
Header="Cable">
</DataGridTemplateColumn>
<DataGridTemplateColumn Width="*" Header="Port/IP">
</DataGridTemplateColumn>
<DataGridTemplateColumn Width="*" Header="Status">
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
<DataGrid ScrollViewer.CanContentScroll="False" GridLinesVisibility="All" VerticalGridLinesBrush="#bdced4" HorizontalGridLinesBrush="#bdced4"
RowHeaderWidth="41" HeadersVisibility="All" x:Name="MonitorList" Loaded="MonitorList_Loaded" LoadingRow="dg_LoadingRow"
CanUserAddRows="False" CanUserResizeRows="False"
CanUserReorderColumns="False" SelectionUnit="Cell" HorizontalAlignment="Stretch" AutoGenerateColumns="false"
HorizontalScrollBarVisibility="Hidden" >
<DataGrid.Columns>
<DataGridTemplateColumn Width="75" Header="ID">
</DataGridTemplateColumn>
<DataGridTemplateColumn x:Name="CableColumn"
Width="*" Header="Cable">
</DataGridTemplateColumn>
<DataGridTemplateColumn Width="*" Header="Port/IP">
</DataGridTemplateColumn>
<DataGridTemplateColumn Width="*" Header="Status">
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
现在我想将第 2 个网格的第 3 列的标题宽度与第 1 个网格的第 3 列的标题宽度绑定。
谁能告诉我这个绑定代码?
谢谢 !!!!!!