FindMyFiles

FindMyFiles.Converters

UiConverters Class

Pure x:Bind function-binding converters — no IValueConverter plumbing, x:Bind calls these statically and stays typed end to end.

public static class UiConverters

Inheritance System.Object → UiConverters

Methods

UiConverters.BoolToVis(bool) Method

Maps true to Visible and false to Collapsed (negate on the bind side where inversion is needed).

public static Microsoft.UI.Xaml.Visibility BoolToVis(bool value);

Parameters

value System.Boolean

The bound boolean to map to a visibility.

Returns

Microsoft.UI.Xaml.Visibility
Visible when value is true, otherwise Collapsed.

UiConverters.ToInfoSeverity(NotifySeverity) Method

App severity → InfoBar severity (the InfoBar enum is the view's vocabulary; the app's is NotifySeverity).

public static Microsoft.UI.Xaml.Controls.InfoBarSeverity ToInfoSeverity(FindMyFiles.Services.NotifySeverity s);

Parameters

s NotifySeverity

The app-side severity to translate.

Returns

Microsoft.UI.Xaml.Controls.InfoBarSeverity
The matching Microsoft.UI.Xaml.Controls.InfoBarSeverity for the view.

UiConverters.VisibleIfNotEmpty(string) Method

Visible when the string is non-null and non-empty, otherwise Collapsed. Used to show an element only when a value exists (e.g. error text).

public static Microsoft.UI.Xaml.Visibility VisibleIfNotEmpty(string? value);

Parameters

value System.String

The bound string whose presence drives visibility.

Returns

Microsoft.UI.Xaml.Visibility
Visible when value is non-null and non-empty, otherwise Collapsed.