I have 2 tab items. In tab No.1 I have a control which corresponds to window resize event and need to call PointToScreen().
The problem is Tab no 2 is active and I resize the window, the control in tab no.1 reacts and fail because its' visual is not being rendered and I get "This Visual is not connected to a PresentationSource" exception.
Do you know how to check this case before I call PointoScreen ?
Thanks Ariel
You can check "IsVisible" -- This corresponds, not as a shortcut for comparing the visibility property, but also tells you if the thing is being rendered on the screen. I'm not entirely sure how how this plays into virtualization of UIElements, but I think it is correctly aware of those scenarios.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With