Hi,
I'm using XamDocManager to open usercontrol with floating type.
That usercontrol contains C1FlexGrid and user can edit cells, but if usercontrol is added to SplitPane with FloatingOnly option, user can't edit cells, because keyboard forcus event not work.
But, if that usercontrol is added to tabcontrol, it works well.
How can I solve this problem?
Thanks.
It looks to me like the C1FlexGrid has a bug where they will not enter edit mode if they are within a FocusScope that is not the Window (i.e. not the main focusscope) - likely they are checking if they are the focused element of the window instead of checking if they are the focusedelement of the containing focusscope. In xamDockManager each ContentPane is a separate focus scope because each maintains its own logically focused element. You'll notice that if you turn that off on the ContentPane that the C1FlexGrid will enter edit mode (e.g. "FocusManager.SetIsFocusScope(contentPane, false)"). I would recommend that you report this issue to them. You can get the same behavior if you were to put their grid within another focusscope (e.g. toolbar, menu, ribbon) or even define your own.
e.g.
Type T = atett.GetType("WpfControlLibrary1.UserControl1"); var obj = Activator.CreateInstance(T) as Control; var cc = new ContentControl { Content = obj }; FocusManager.SetIsFocusScope(cc, true); Window window = new Window(); window.Content = cc; window.Show();
Hello,
Thank you for your reply.
I have attacted a sample project. There are two buttons in MainWindow.xaml.
If you click the window button, you can edit the "first" field data in the grid.
But, if you click the Floating button, you can't edit the "first" field data in the grid.
Thank you.
Thank you for your post. I have been looking into it but since you use a third party controls I am not able to reproduce your behavior, so could you please send me an isolated sample project along with the DLLs needed for the C1FlexGrid, where the issue is reproduced, so I could be able to investigate this further for you.
Looking forward for your reply.