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

MeasureOverride return Size(0,0) when using as child of container without setting Width and Height #52

Closed
cuiliang opened this issue Jun 6, 2021 · 0 comments

Comments

@cuiliang
Copy link

cuiliang commented Jun 6, 2021

Hi, when using control as child of other control and without set Width and Height (wich means sizetype of ContentToSizeNoStretch), the image will not show.

Here is a debug session:

measureoverride.mp4

Size(0,0) is not Empty.

public bool IsEmpty => this._width < 0.0;  

https://docs.microsoft.com/en-us/dotnet/api/system.windows.size.isempty?view=net-5.0

Thank you~

@cuiliang cuiliang changed the title Problem of MeasureOverride MeasureOverride return Size(0,0) when using as child of container without setting Width and Height Jun 6, 2021
@cuiliang cuiliang closed this as completed Jul 6, 2021
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

1 participant