I have a GridViewDataColumn with a CellTemplate that contains an ItemsControl which is templated for TextBlocks. The CellEditTemplate has a similar setup only with TextBoxes. Essentially I have several TextBlocks/TextBoxes per cell. What I want is when the user double clicks on a TextBlock the grid goes into editing mode and selects the corresponding TextBox by index. If I double click the third TextBlock in the cell then I want the third TextBox to start editing.
The default behavior is the grid selects the first TextBox upon entering edit mode. I have tried a couple of code behind solutions based on moving through the visual tree when PreviewMouseDoubleClick happens. But when I force the grid to enter edit mode the TextBoxes are not part of the visual tree as I would expect them to be.
I would prefer a pure XAML solution but do not know how that would be done.
The default behavior is the grid selects the first TextBox upon entering edit mode. I have tried a couple of code behind solutions based on moving through the visual tree when PreviewMouseDoubleClick happens. But when I force the grid to enter edit mode the TextBoxes are not part of the visual tree as I would expect them to be.
I would prefer a pure XAML solution but do not know how that would be done.