Skip to content

System.InvalidOperationException: Ten element Visual nie jest połączony z PresentationSource. #3140

@kamilaLurzynska

Description

@kamilaLurzynska

i have this exception, when i reloaded data on datagrid. My dataGrid have AutoGeneratedColumn = true property.

System.InvalidOperationException: Ten element Visual nie jest połączony z PresentationSource.
w System.Windows.Media.Visual.PointToScreen(Point point)
w MahApps.Metro.Controls.MetroThumbContentControl.OnMouseLeftButtonDown(MouseButtonEventArgs e) w d:\projects\git\MahApps.Metro\src\MahApps.Metro\MahApps.Metro.Shared\Controls\MetroThumbContentControl.cs:wiersz 119
w System.Windows.UIElement.OnMouseLeftButtonDownThunk(Object sender, MouseButtonEventArgs e)
w System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
w System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
w System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
w System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
w System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
w System.Windows.UIElement.OnMouseDownThunk(Object sender, MouseButtonEventArgs e)
w System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
w System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
w System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
w System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
w System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
w System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
w System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
w System.Windows.Input.InputManager.ProcessStagingArea()
w System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
w System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
w System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
w System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
w System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
w MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
w MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
w System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
w System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

This error is not reproduce every time.

What i doing wrong?

  • MahApps.Metro __v1.5.0.23
  • Windows 10
  • Visual Studio 2015
  • .NET Framework 4.5.2

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions