I Find a BUG !

Apr 2, 2014 at 8:30 AM
I use the FlowItemsControl2D in wpf.
when i touch the Element(FlowItemsControl2D) very very fast , the element is disapper and the Application is like to die! but i find that the app still work ,i can into breakpoint.
More, I find that FlowItemsControlBase use the event "CompositionTarget.Rendering",and the
"_currentManipulationData.Velocity" is NaN,"Math.Abs(_currentManipulationData.Velocity) < MinVelocity" is false.

Now, We can use this:

double.IsNaN(_currentManipulationData.Velocity) || Math.Abs(_currentManipulationData.Velocity) < MinVelocity

好吧,如果你是中国人,请无视上面蹩脚的英语。
当你使用继承于“FlowItemsControlBase”的控件时,请找到
“OnRendering(object sender, EventArgs e)”
{
Math.Abs(_currentManipulationData.Velocity) < MinVelocity)
            {
                OnManipulationCompleted();
                return;
            }
//改成这样
if (double.IsNaN(_currentManipulationData.Velocity) ||
Math.Abs(_currentManipulationData.Velocity) < MinVelocity)
            {
                OnManipulationCompleted();
                return;
            }
//其他代码
}