I have a derived Combobox control. In Autogeneratingcolumns event, I have assigned FrameworkElemnt of derived combobox as shown below:
var templateColumn = new DataGridTemplateColumn
{
CellTemplate = new DataTemplate
{
VisualTree = derivedComboFrameWorkElement
}
};
grid.Column = CreateTemplateColumn(templateColumn);
But, the SelectionChanged event does not fires for the combobox. The funny thing is that, once I inspect the visual tree (GridCell and my ComoboBox) using WPF-Inspector, the SelectionChanged event fires. So doubting that some issue with VisualTree updates. Please help me to get this working properly.
Regards, ani