[BUG] (WPF) When a TransitioningContentControl's initial actual width or height is 0, it throws an exception in v12.1.1 · Issue #2565 · reactiveui/ReactiveUI · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a WPF issue; I don't know whether it also applies to other platforms.
When the content presenter of a TransitioningContentControl has a zero actual width/height, an exception is thrown in the TransitioningContentControl.GetRenderTargetBitmapFromUiElement method during the initial transition. This applies to v12.1.1 only - everything works fine in v11.x.
The repository contains a simple window which contains a ViewModelViewHost. By default its content is stretched, so the exception will not be thrown. But if you go to MainWindow.xaml and remove the TestHost's HorizontalContentAlignment or VerticalContentAlignment then the content's actual width or height will become 0, and an exception will be thrown when binding to a view model.
Expected behavior
No exceptions thrown when the initial actual width/height of the content is 0.
Environment
OS: Windows 10
Version: 2004
The issue is reproducible on .NET Core 3.1 and .NET 5 RC2.
Additional context
As a workaround, you can make sure that your TransitioningContentControl either has an explicit size or is stretched, and stretches its content, and then control the sizing in its child controls - this worked for me, but I guess it's not always applicable.
The text was updated successfully, but these errors were encountered:
Describe the bug
This is a WPF issue; I don't know whether it also applies to other platforms.
When the content presenter of a
TransitioningContentControl
has a zero actual width/height, an exception is thrown in theTransitioningContentControl.GetRenderTargetBitmapFromUiElement
method during the initial transition. This applies to v12.1.1 only - everything works fine in v11.x.Steps To Reproduce
I've created a repository which reproduces the issue: https://github.com/TolikPylypchuk/ReactiveUIBugTransitioningControl.
The repository contains a simple window which contains a
ViewModelViewHost
. By default its content is stretched, so the exception will not be thrown. But if you go toMainWindow.xaml
and remove theTestHost
'sHorizontalContentAlignment
orVerticalContentAlignment
then the content's actual width or height will become 0, and an exception will be thrown when binding to a view model.Expected behavior
No exceptions thrown when the initial actual width/height of the content is 0.
Environment
The issue is reproducible on .NET Core 3.1 and .NET 5 RC2.
Additional context
As a workaround, you can make sure that your
TransitioningContentControl
either has an explicit size or is stretched, and stretches its content, and then control the sizing in its child controls - this worked for me, but I guess it's not always applicable.The text was updated successfully, but these errors were encountered: