Working in WPF I have a simple DataGrid with 3 Text columns
My initial version was made using DataGridTextColumn
<DataGrid ...>
<DataGrid.Columns>
<DataGRidTextColum ... />
<DataGRidTextColum ... />
<DataGRidTextColum ... />
</DataGrid.Columns>
</DataGrid>
Default behavior is that when the user clicks to edit, the Cell Content becomes an editable Textbox. This TextBox is however not as wide as the cell.
Currently, I can solve thus, using a DataGridTemplateColumn, and then use a TextBox to show the content for both Viewing and Editing.
However, I am hoping to find a good solution, to simply style the default TextBox used when Editing.
I am unable to find the Syntax for how to target the TextBox when the Cell is in EditMode with my Properties. I want to set the Width to 100% of the Cell.
Does anyone have suggestions to how this is done in WPF?
Edit #1
Icebat informs me, standard behavior is to fill the entire width.
This is my Code that shows this problem
<DataGridTextColumn Binding="{Binding Path=Status}"
CanUserReorder="False"
CanUserResize="False"
CanUserSort="True"
Width="Auto"
IsReadOnly="True"
MinWidth="100"
Header="Status"
CellStyle="{StaticResource VerticalCenterAlignDataGridCellStyle}"
/>
Im guessing it could also be Style related but i do not have any styles that Target the TextBox without a Key.