Click here to Skip to main content
15,936,709 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
Hello guys.
I have two DataGrids, their names are "DG0001" and "DG0002".
How can I bind RowHeight of all rows of DG0001 to DG0002 in WPF VB.NET ?

What I have tried:

DG0001.RowHeight="{Binding ElementName=DG0002 Path=RowHeight, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Updated 20-May-24 1:33am
Maciej Los 20-May-24 15:23pm    
I'd suggest to read this: How to: Bind the Properties of Two Controls - WPF .NET Framework | Microsoft Learn[^]. The correct way to achieve that is to use XAML.

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