我想要獲取文本框或RichtextBox中的鍵盤光標位置。在WinFrom我通過使用此代碼如何獲取鍵盤光標位置作爲文本框中的點
Point p = rtb.GetPositionFromCharIndex(rtb.SelectionStart);
p.Y += (int)rtb.Font.GetHeight()*2;
lstboxIntelli.Location = p;
lstboxbIntelli.Show();
ActiveControl = lstboxIntelli;
但在WPF我不能讓GetPositionFromCharIndex
財產是否有任何其他的方式來實現這一
我想展示在鍵盤光標下的一個列表框(像智能感知這樣做)
任何幫助將欣賞
這可以幫助你 http://stackoverflow.com/questions/17909651/c-sharp-get-cursor-line-in-richtextbox –