c# - WPF TextBoxBase (System.Windows.Controls.Primitives) get text -
how can .text wpf (system.windows.controls.primitives) textboxbase. here code:
private textboxbase mtextbox; this.mtextbox.text; the wpf controls not contain definitions .text tried using textrange did not work. here code:
string other = new textrange(((richtextbox)sender).document.contentstart, ((richtextbox)sender).document.contentend).text; how can .text wpf (system.windows.controls.primitives) textboxbase?
there not text property in wpf richtextbox control. below way texts:
string getstring(richtextbox rtb) { var textrange = new textrange(rtb.document.contentstart, rtb.document.contentend); return textrange.text; }
Comments
Post a Comment