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

Auto convert Bool to Visibility? #13

Open
CodingOctocat opened this issue Jun 15, 2021 · 3 comments
Open

Auto convert Bool to Visibility? #13

CodingOctocat opened this issue Jun 15, 2021 · 3 comments

Comments

@CodingOctocat
Copy link

I think this type of conversion is very common, should we let QuickConverter do it automatically?

<Control Visibility="{qc:Binding '$P', P={Binding ABoolType}}" />

Including Hex/RGB String to Color/SolidColorBrush etc.

@ReneVogt
Copy link

But should false be Hidden or Collapsed?

@CodingOctocat
Copy link
Author

@ReneVogt
I think false should be converted to Hidden, because assuming the source is a nullable bool, then null should be converted to Collapse.

@CodingOctocat
Copy link
Author

我想可以参考 CalcBinding.

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