painting the selected row will fix this.
change color of row in richtextbox by changing tabindex in c# with wpf
Samed ÇETİN
1
Reputation point
I'm converting the project I've done with winform before to wpf. But I have some problems.
I paint the lines I want of the text in the richtextbox.
winform code in below,
private void TextBoxGcode_TabIndexChanged(object sender, EventArgs e)
{
if (0 < GcodeSayi)
{
TextBoxGcode.Find(lines[GcodeSayi - 1], RichTextBoxFinds.MatchCase);
TextBoxGcode.SelectionBackColor = Color.White;
TextBoxGcode.Find(lines[GcodeSayi], RichTextBoxFinds.MatchCase);
TextBoxGcode.SelectionBackColor = Color.DodgerBlue;
}
else
{
TextBoxGcode.SelectAll();
TextBoxGcode.SelectionBackColor = Color.White;
}
}
TextBoxGcode.TabIndex = TempGcodeSayi;
it could be like this. Changing the color of the relevant line in the richtextbox with the line number I entered from a textbox. I need only line
How can I do it with WPF? Please help.
Thanks,
Developer technologies Windows Presentation Foundation
2,854 questions