2026-06-05 13:44:39 +09:00

52 lines
1.6 KiB
C#

using AuroraUIComponent.UserControls.KeyValueBase;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace AuroraUIComponent.UserControls
{
/// <summary>
/// UCBoolianValue.xaml에 대한 상호 작용 논리
/// </summary>
public partial class UCBoolianValue : UCKeyValueBase
{
public static readonly DependencyProperty LightOnProperty
= DependencyProperty.Register(
nameof(LightOn),
typeof(bool),
typeof(UCBoolianValue),
new FrameworkPropertyMetadata(
false,
FrameworkPropertyMetadataOptions.BindsTwoWayByDefault
));
public bool LightOn {
get { return (bool)GetValue(LightOnProperty); }
set { SetValue(LightOnProperty, value); }
}
public UCBoolianValue()
{
InitializeComponent();
}
protected override void KeyTextChanged(string newValue)
{
if (string.IsNullOrEmpty(newValue)) {
// KeyText 가 없으므로, 해당 grid 의 width 를 0 으로 만든다
GridParent.ColumnDefinitions[0].Width = new GridLength(0);
}
}
}
}