priamo s mazaním textu som zatiaľ nerobil (budem čoskoro) Pre vkladanie hyperlinku som použil toto, možno to niečo napovie: private void VlozitPole(string Udaj, string KlTlSobh, string Hodnota) { TextPointer caretPosition = RichTextBox1.CaretPosition; TextPointer insertPosition = caretPosition.IsAtInsertionPosition ? caretPosition : caretPosition.GetInsertionPosition(LogicalDirection.Forward); string linkTitle = Hodnota; Run run = new Run(linkTitle); Hyperlink link = new Hyperlink(run, insertPosition); link.NavigateUri = new Uri(@"file://" + VseobecnaCast_functionTools.RemoveDiacritism(Udaj.Trim().Replace(" ", "_") + "#" + KlTlSobh.Trim())); link.Background = Brushes.Yellow; link.Foreground = Brushes.Black; link.ToolTip = Udaj.Trim() + " (" + KlTlSobh.Trim() + ")";// RichTextBox1.CaretPosition = run.ContentEnd; RichTextBox1.CaretPosition = RichTextBox1.CaretPosition.GetPositionAtOffset(0, LogicalDirection.Forward); }
|