Click here to Skip to main content
15,917,176 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: Windows1 Elements Pin
Pete O'Hanlon4-Feb-09 5:20
mvePete O'Hanlon4-Feb-09 5:20 
QuestionDlls Issue Pin
Tauseef A29-Jan-09 23:12
Tauseef A29-Jan-09 23:12 
AnswerRe: Dlls Issue Pin
Michael Sync31-Jan-09 4:56
Michael Sync31-Jan-09 4:56 
QuestionXaml on the Web Pin
Jammer29-Jan-09 23:07
Jammer29-Jan-09 23:07 
AnswerRe: Xaml on the Web Pin
Pete O'Hanlon30-Jan-09 0:40
mvePete O'Hanlon30-Jan-09 0:40 
GeneralRe: Xaml on the Web Pin
Jammer30-Jan-09 0:54
Jammer30-Jan-09 0:54 
GeneralRe: Xaml on the Web Pin
Pete O'Hanlon30-Jan-09 1:31
mvePete O'Hanlon30-Jan-09 1:31 
GeneralRe: Xaml on the Web Pin
Jammer31-Jan-09 22:39
Jammer31-Jan-09 22:39 
GeneralRe: Xaml on the Web Pin
Pete O'Hanlon1-Feb-09 8:28
mvePete O'Hanlon1-Feb-09 8:28 
GeneralRe: Xaml on the Web Pin
Jammer1-Feb-09 10:38
Jammer1-Feb-09 10:38 
AnswerRe: Xaml on the Web Pin
Mark Salsbery2-Feb-09 6:09
Mark Salsbery2-Feb-09 6:09 
GeneralRe: Xaml on the Web Pin
Jammer2-Feb-09 6:36
Jammer2-Feb-09 6:36 
GeneralRe: Xaml on the Web Pin
Mark Salsbery2-Feb-09 6:45
Mark Salsbery2-Feb-09 6:45 
GeneralRe: Xaml on the Web Pin
Jammer2-Feb-09 7:11
Jammer2-Feb-09 7:11 
GeneralRe: Xaml on the Web Pin
Mark Salsbery2-Feb-09 7:16
Mark Salsbery2-Feb-09 7:16 
GeneralRe: Xaml on the Web Pin
Jammer2-Feb-09 7:22
Jammer2-Feb-09 7:22 
GeneralRe: Xaml on the Web Pin
Pete O'Hanlon2-Feb-09 8:32
mvePete O'Hanlon2-Feb-09 8:32 
QuestionWPF ListView/ItemsControl Drag Drop Adorner Pin
snblackout29-Jan-09 18:40
snblackout29-Jan-09 18:40 
AnswerRe: WPF ListView/ItemsControl Drag Drop Adorner Pin
Pete O'Hanlon30-Jan-09 2:27
mvePete O'Hanlon30-Jan-09 2:27 
GeneralRe: WPF ListView/ItemsControl Drag Drop Adorner Pin
snblackout30-Jan-09 4:42
snblackout30-Jan-09 4:42 
GeneralRe: WPF ListView/ItemsControl Drag Drop Adorner Pin
snblackout30-Jan-09 5:33
snblackout30-Jan-09 5:33 
QuestionWPF RichTextBox is slow Pin
uncleashcan29-Jan-09 3:39
uncleashcan29-Jan-09 3:39 
GeneralRe: WPF RichTextBox is slow Pin
ejhuntington30-Jan-09 7:18
ejhuntington30-Jan-09 7:18 
I'm also attempting to high light text from regular expression matches using a wpf richtextbox. There seems to be 2 characters added to the start of the text in the richtextbox that is throwing off the match.index. However adding 2 to the index doesn't help in all cases. I'll post if I come up with a solution. Here is what I currently have.

private void applyRegex_Click(object sender, RoutedEventArgs e)
{
TextRange tr = new TextRange(this.testBox.Document.ContentStart, this.testBox.Document.ContentEnd);
this.testResults.Text += (tr.Text + "\n");
MatchCollection matches = CheckForRegexPatternMatches(findElementTagsRegex, tr);

if (matches.Count > 0)
{
foreach (Match match in matches)
{
if (match.Success)
{
this.testResults.Text += "SUCCESS\n";
this.testResults.Text += "Value:" + match.Value + "\n";
this.testResults.Text += "Offset: " + match.Index.ToString() + "\n";
this.testResults.Text += "Length:" + match.Length.ToString() + "\n";
this.testResults.Text += "Offset + Length: " + (match.Index + match.Length).ToString() + "\n";

TextRange matchRange = null;

//if (match.Index == 0)
//{
// matchRange = new TextRange(tr.Start.GetPositionAtOffset(match.Index), tr.Start.GetPositionAtOffset(match.Index + match.Length));
//}
//else
//{
// matchRange = new TextRange(tr.Start.GetPositionAtOffset(match.Index + 2), tr.Start.GetPositionAtOffset(match.Index + 2 + match.Length));
//}

matchRange =
new TextRange(this.testBox.Document.ContentStart.GetPositionAtOffset(match.Index),
this.testBox.Document.ContentStart.GetPositionAtOffset(match.Index + match.Length));

matchRange.ApplyPropertyValue(TextElement.ForegroundProperty, new SolidColorBrush(Colors.Red));
}
}
}

this.testBox.CaretPosition = tr.End;
}
QuestionDeep Zoom - Generate on Demand/Dynamically Pin
Dominic Pettifer28-Jan-09 14:46
Dominic Pettifer28-Jan-09 14:46 
AnswerRe: Deep Zoom - Generate on Demand/Dynamically Pin
ColinM12328-Jan-09 16:59
ColinM12328-Jan-09 16:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.