Click here to Skip to main content
15,868,120 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Render WPF Control to Image in Console App Pin
Pete O'Hanlon25-Jun-12 3:28
subeditorPete O'Hanlon25-Jun-12 3:28 
GeneralRe: Render WPF Control to Image in Console App Pin
#realJSOP25-Jun-12 6:23
mve#realJSOP25-Jun-12 6:23 
GeneralRe: Render WPF Control to Image in Console App Pin
#realJSOP25-Jun-12 3:49
mve#realJSOP25-Jun-12 3:49 
AnswerRe: Render WPF Control to Image in Console App Pin
JOAT-MON25-Jun-12 9:17
JOAT-MON25-Jun-12 9:17 
GeneralRe: Render WPF Control to Image in Console App Pin
#realJSOP26-Jun-12 4:04
mve#realJSOP26-Jun-12 4:04 
GeneralRe: Render WPF Control to Image in Console App Pin
JOAT-MON26-Jun-12 9:16
JOAT-MON26-Jun-12 9:16 
QuestionVirtualizationMode="Recycling" Issue And Hackish Fix?? Pin
FocusedWolf22-Jun-12 18:24
FocusedWolf22-Jun-12 18:24 
AnswerRe: VirtualizationMode="Recycling" Issue And Hackish Fix?? Pin
FocusedWolf23-Jun-12 8:43
FocusedWolf23-Jun-12 8:43 
Ok i figured it out. It has to do with the Text property. It gets changed when the items get recycled, when scrolling the list, and for some reason the "HighlightPhrase" property doesn't also get set when doing this and apparently this isn't an issue because the value of "HighlightPhrase" doesn't change when scrolling anyway. It just works, now Poke tongue | ;-P

This is what makes it work (note: "new" keyword usage because this class inherits TextBlock):

C#
public new string Text
{
    get { return (string)GetValue(TextProperty); }
    set { SetValue(TextProperty, value); }
}

public new static readonly DependencyProperty TextProperty =
    DependencyProperty.Register("Text", typeof(string),
    typeof(HighlightTextBlock), new FrameworkPropertyMetadata(string.Empty, FrameworkPropertyMetadataOptions.AffectsRender,
        new PropertyChangedCallback(UpdateHighlighting)));

private static void UpdateHighlighting(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
    ApplyHighlight(d as HighlightTextBlock);
}


See article for latest code: Highlight Searched Text in WPF ListView[^]

modified 25-Jun-12 17:35pm.

Questiondefault content for custom control Pin
Silent Winter20-Jun-12 1:58
Silent Winter20-Jun-12 1:58 
AnswerRe: default content for custom control Pin
Wayne Gaylard20-Jun-12 2:28
professionalWayne Gaylard20-Jun-12 2:28 
GeneralRe: default content for custom control Pin
Silent Winter20-Jun-12 3:40
Silent Winter20-Jun-12 3:40 
GeneralRe: default content for custom control Pin
Wayne Gaylard20-Jun-12 4:14
professionalWayne Gaylard20-Jun-12 4:14 
Questionclient side serial communication Pin
javadadabi16-Jun-12 22:31
javadadabi16-Jun-12 22:31 
AnswerRe: client side serial communication Pin
Abhinav S17-Jun-12 20:21
Abhinav S17-Jun-12 20:21 
GeneralRe: client side serial communication Pin
javadadabi18-Jun-12 0:51
javadadabi18-Jun-12 0:51 
AnswerRe: client side serial communication Pin
Abhinav S18-Jun-12 17:29
Abhinav S18-Jun-12 17:29 
GeneralRe: client side serial communication Pin
javadadabi18-Jun-12 19:35
javadadabi18-Jun-12 19:35 
AnswerRe: client side serial communication Pin
Gerry Schmitz19-Jun-12 0:27
mveGerry Schmitz19-Jun-12 0:27 
GeneralRe: client side serial communication Pin
javadadabi19-Jun-12 1:22
javadadabi19-Jun-12 1:22 
GeneralRe: client side serial communication Pin
Gerry Schmitz19-Jun-12 7:45
mveGerry Schmitz19-Jun-12 7:45 
GeneralRe: client side serial communication Pin
javadadabi20-Jun-12 8:29
javadadabi20-Jun-12 8:29 
GeneralRe: client side serial communication Pin
Pete O'Hanlon20-Jun-12 8:45
subeditorPete O'Hanlon20-Jun-12 8:45 
GeneralRe: client side serial communication Pin
Gerry Schmitz20-Jun-12 9:34
mveGerry Schmitz20-Jun-12 9:34 
GeneralRe: client side serial communication Pin
javadadabi20-Jun-12 17:21
javadadabi20-Jun-12 17:21 
GeneralRe: client side serial communication Pin
javadadabi29-Jun-12 0:20
javadadabi29-Jun-12 0:20 

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.