This is a migrated thread and some comments may be shown as answers.

TextChanged event firing due to UI Virtualization?

1 Answer 14 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
Greg
Top achievements
Rank 1
Greg asked on 26 Jan 2012, 11:20 PM
I have a Usercontrol that I use as my cell's DataTemplate (actually I stick it directly into my controltemplate, but shouldn't make a difference)

I have a DependencyProperty that is bound to the Value of the cell, and the changed-listener looks like this

public static void TextChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
        {
            double dub;
            if (e.OldValue != null && e.NewValue != null && (e.NewValue is double || (e.NewValue is string && double.TryParse(e.NewValue.ToString(), out dub))))
            {  
                var control = o as ValueCellPresenter;
 
                if (control.IsLoaded)
                {
                    ((Storyboard)control.Resources["CellFlash"]).Begin();
                }
 
            }
             
        }

however, this animation fires when I am scrolling, because of UI virtualization.

I use this animation to flash the cell when the value changes.  Is there a better way to do this to avoid getting the animation fired when UI virtualization is in effect?  When I turn the virtualization off the problem goes away.

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 01 Feb 2012, 08:57 AM
Hello,

 Unfortunately we are not aware of any other approach for this.

Regards,
Vlad
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
TreeListView
Asked by
Greg
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or