QuickConverter icon indicating copy to clipboard operation
QuickConverter copied to clipboard

Auto convert Bool to Visibility?

Open CodingOctocat opened this issue 4 years ago • 3 comments

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.

CodingOctocat avatar Jun 15 '21 07:06 CodingOctocat

But should false be Hidden or Collapsed?

ReneVogt avatar Jun 15 '21 15:06 ReneVogt

@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 avatar Jun 16 '21 06:06 CodingOctocat

我想可以参考 CalcBinding.

CodingOctocat avatar Sep 25 '21 01:09 CodingOctocat