Click here to Skip to main content
15,910,603 members
Home / Discussions / WPF
   

WPF

 
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 
AnswerRe: Deep Zoom - Generate on Demand/Dynamically Pin
Mark Salsbery29-Jan-09 5:39
Mark Salsbery29-Jan-09 5:39 
QuestionAdding dynamically new lines and columns to a grid ? Pin
WolveFred228-Jan-09 4:20
WolveFred228-Jan-09 4:20 
AnswerRe: Adding dynamically new lines and columns to a grid ? Pin
ColinM12328-Jan-09 13:45
ColinM12328-Jan-09 13:45 
GeneralRe: Adding dynamically new lines and columns to a grid ? Pin
WolveFred229-Jan-09 2:41
WolveFred229-Jan-09 2:41 
GeneralRe: Adding dynamically new lines and columns to a grid ? [modified] Pin
Mark Salsbery29-Jan-09 5:46
Mark Salsbery29-Jan-09 5:46 

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.