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
[ValueConversion(typeof(bool?),typeof(Visibility))]publicsealedclassBoolToVisibilityConverter:IValueConverter{publicstaticreadonlyBoolToVisibilityConverterVisibleWhenTrueElseCollapsed=newBoolToVisibilityConverter(Visibility.Visible,Visibility.Collapsed);publicstaticreadonlyBoolToVisibilityConverterVisibleWhenTrueElseHidden=newBoolToVisibilityConverter(Visibility.Visible,Visibility.Hidden);privatereadonlyobjectwhenTrue;privatereadonlyobjectwhenFalse;publicBoolToVisibilityConverter(VisibilitywhenTrue,VisibilitywhenFalse){this.whenTrue=whenTrue;this.whenFalse=whenFalse;}publicobjectConvert(objectvalue,System.TypetargetType,objectparameter,System.Globalization.CultureInfoculture){returnvalueswitch{true=>this.whenTrue,false=>this.whenFalse,null=>this.whenFalse,
_=>thrownewArgumentException("expected bool",nameof(value)),};}objectIValueConverter.ConvertBack(objectvalue,System.TypetargetType,objectparameter,System.Globalization.CultureInfoculture){thrownewSystem.NotSupportedException($"{nameof(BoolToVisibilityConverter)} can only be used in OneWay bindings");}}
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: