wpf datagrid textbox + combobox
I have wpf datagrid with number of template columns. some of them have textbox in them in edit mode and some combobox.
i need to give cut/copy/paste facility to user from main menu (ribbon) buttons o开发者_C百科f my application.
when i select some text from textbox and press copy button from main menu. copy button becomes active control so i loose textbox as active control by which i could get selected text.
(any solution for this)
and second thing i wanted to ask... is there any event get fired when we select textbox's contents?
or solution would be appreciated. Thanks in advance...
Answers:
You need to set
FocusManager.IsFocusScope
on your main menu ribbon so that it will track focus separately from your main application.Yes there is a
TextBox.SelectionChanged
event that will be fired whenever your selection changes in a TextBox.
精彩评论