Files
LlamaCasty/Helpers/HiddenBoolToVisibilityConverter.cs
gramps 4b9a8e515f Control Surface UX: pill toggle, background rename, per-scene properties
- Sliding pill toggle (green ON / red OFF) replaces checkbox
- Geometry mismatch error for custom backgrounds
- Backdrop -> Background: C# rename, SQL column rename with migration
- Source.IsBackground: new -> override (fixes WPF binding)
- Legacy 'Backdrop' display name migrated to 'Background'
- Per-scene UseDefaultBackground + CustomBackgroundPath
- Asset files renamed backdrop -> background
- StagedScene/LiveScene split, thumbnail strip, edit gating
- TransitionService (Cut/Fade/Move)
- Context menu: Capture Desktop, Refresh Desktop
- Resolution badge removed, ON-AIR status light added
2026-08-22 18:10:59 -07:00

21 lines
820 B
C#

using System.Globalization;
using System.Windows;
using System.Windows.Data;
namespace ytLive.Helpers;
/// <summary>
/// Maps bool → Visibility, collapsing nothing: true becomes <c>Hidden</c> (keeps
/// its layout slot) rather than <c>Collapsed</c> (releases it). Used where a row
/// must keep its column grid aligned — e.g. the Background source's missing
/// trashcan must not shift the edit/eye icons one slot to the right.
/// </summary>
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;
}