using System.Globalization; using System.Windows; using System.Windows.Data; namespace ytLive.Helpers; /// /// Maps bool → Visibility, collapsing nothing: true becomes Hidden (keeps /// its layout slot) rather than Collapsed (releases it). Used where a row /// must keep its column grid aligned — e.g. the Backdrop source's missing /// trashcan must not shift the edit/eye icons one slot to the right. /// public class HiddenBoolToVisibilityConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, CultureInfo culture) => value is true ? Visibility.Hidden : Visibility.Visible; public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) => value is Visibility.Visible; }