Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This Visual is not connected to a PresentationSource. #461

Open
boltomli opened this issue Jan 17, 2016 · 2 comments
Open

This Visual is not connected to a PresentationSource. #461

boltomli opened this issue Jan 17, 2016 · 2 comments

Comments

@boltomli
Copy link

I was going to close MarkPad on Surface Pro 4 and hit this. Latest release build from ClickOnce install.

Date and Time: 2016/1/17 23:14:32
OS Version: Microsoft Windows NT 6.2.9200.0

Application Domain: DefaultDomain
Assembly Codebase: file:///C:/Users/d/AppData/Local/Apps/2.0/X5HGOY35.XNC/COZ8XMDY.28R/mark...app_0000000000000000_0000.000a_4fe90f97b0816791/MarkPad.exe
Assembly Full Name: MarkPad, Version=0.10.0.12, Culture=neutral, PublicKeyToken=null
Assembly Version: 0.10.0.12
Assembly Build Date: 2016/1/17 15:05:36

Exception Source: PresentationCore
Exception Type: System.InvalidOperationException
Exception Message: This Visual is not connected to a PresentationSource.
Exception Target Site: PointFromScreen

---- Stack Trace ----
System.Windows.Media.Visual.PointFromScreen(Point point)
MarkPad.exe: N 7570221
MahApps.Metro.Behaviours.BorderlessWindowBehavior.HwndHook(IntPtr hWnd, Int32 message, IntPtr wParam, IntPtr lParam, Boolean& handled)
MarkPad.exe: N 00934
System.Windows.Interop.HwndSource.PublicHooksFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
MarkPad.exe: N 00111
MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
MarkPad.exe: N 00154
MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
MarkPad.exe: N 00106
System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
MarkPad.exe: N 00081
System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
MarkPad.exe: N 00051

@boltomli
Copy link
Author

Guess it's related to a extremely big screenshot I paste and save in the md...
shot

@shiftkey
Copy link
Member

This might be fixed in MahApps.Metro but when I last looked at this the interface has changed and ResizeWithGrip has been obsoleted - might be a minor thing, but needs investigating...

e.g.

<Behaviours:BorderlessWindowBehavior ResizeWithGrip="False" />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants