Seems that AddHandler for a FrameworkElementFactory won't work, event are never called ...
here follows the test code
here follows the test code
foreach (var c in radGridViewTest.Columns)
{
var factory = new FrameworkElementFactory(typeof(Button), "myButton");
factory.SetValue(CursorProperty, Cursors.Hand); // OK
factory.SetBinding(ContentProperty, new Binding(string.Format("[{0}]", 4))); //OK
c.CellTemplate= new DataTemplate();
var mh = new RoutedEventHandler(onClick);
factory.AddHandler(Button.ClickEvent, mh,true); // won't work ...
c.CellTemplate.VisualTree = factory;
c.CellTemplate.Seal();
}