Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

Closed Issue: TokenizedTextBox delete selection [17432]

$
0
0
Tt's not released yet, however the delete selection of the TokenizedTextBox is not working properly.
The code take only one container, but could be more selected, so I changed it and resolved to share:
if (!richTextBox.Selection.IsEmpty)
{
Paragraph paragraph = richTextBox.Document.Blocks.First() as Paragraph;
foreach (Inline inline in paragraph.Inlines)
{
InlineUIContainer iuic = inline as InlineUIContainer;
if (iuic != null)
{
if (richTextBox.Selection.Contains(iuic.ContentStart))
{
containers.Add(iuic);
}
}
}
}
else
{
containers.Add(richTextBox.CaretPosition.GetAdjacentElement(LogicalDirection.Backward) as InlineUIContainer);
}
 
Now we have all the containers to be deleted.
Comments: Control no longer exist

Viewing all articles
Browse latest Browse all 4964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>