开发者

wpf datagrid textbox + combobox

开发者 https://www.devze.com 2023-01-02 22:45 出处:网络
I have wpf datagrid with number of template columns. some of them have textbox in them in edit mode and some 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:

  1. You need to set FocusManager.IsFocusScope on your main menu ribbon so that it will track focus separately from your main application.

  2. Yes there is a TextBox.SelectionChanged event that will be fired whenever your selection changes in a TextBox.

0

精彩评论

暂无评论...
验证码 换一张
取 消