8000 [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
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[BUG] (WPF) When a TransitioningContentControl's initial actual width or height is 0, it throws an exception in v12.1.1 #2565

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

Closed
TolikPylypchuk opened this issue Oct 24, 2020 · 3 comments · Fixed by #2569
Labels

Comments

@TolikPylypchuk
Copy link

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 the TransitioningContentControl.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 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.

@glennawatson
Copy link
Contributor

We are currently working on a fix for this one and should be out in the next couple days

@RLittlesII
Copy link
Member

@TolikPylypchuk thanks for the detailed information and the reproduction.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
0