using System.Windows; using System.Windows.Controls; using System.Windows.Media; namespace AirPlanner { public partial class ControlView : UserControl { static readonly Brush Off = (Brush)new BrushConverter().ConvertFromString("#A6ABB6")!; static readonly Brush On = (Brush)new BrushConverter().ConvertFromString("#161616")!; public ControlView() { InitializeComponent(); ShowZone("전체", zAll); } void Zone_Click(object sender, RoutedEventArgs e) { if (sender is Button b && b.Tag is string zone) ShowZone(zone, b); } void ShowZone(string zone, Button active) { ZoneContent.Content = zone == "전체" ? new VentAllView() : new RoomDetailView(zone); foreach (var b in new[] { zAll, zLiving, zR1, zR2, zR3 }) { bool on = b == active; b.Foreground = on ? On : Off; b.FontWeight = on ? FontWeights.Bold : FontWeights.Normal; } } } }