I'm trying to find out the pixel size of the text (with the maximum length) in a DataGridTextColumn in WPF using the MVVM pattern so that I can set the minimum width of the DataGridTextColumn.
Can anyone help me with this?
I'm trying to find out the pixel size of the text (with the maximum length) in a DataGridTextColumn in WPF using the MVVM pattern so that I can set the minimum width of the DataGridTextColumn.
Can anyone help me with this?
You can get the text size from font using this method:
Example: