Click here to Skip to main content
15,905,073 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to bind the width of a specific column of a DataGrid to the width of a Textbox in WPF.
How can i do it?
Thanks in advance
Posted

1 solution

I have done it myself:

XML
<textbox name="txtID" minwidth="60" width="{Binding ElementName=hID,Path=ActualWidth}" horizontalalignment="Left" verticalalignment="Center" horizontalcontentalignment="Center" textchanged="txtID_TextChanged" />


where hID is the name of the column
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900