44 lines
1.4 KiB
C#
44 lines
1.4 KiB
C#
/*
|
|
* Copyright (c) 2022 LG Electronics Inc.
|
|
* SPDX-License-Identifier: LicenseRef-LGE-Proprietary
|
|
*/
|
|
using AuroraUIComponent.UserControls.KeyValueBase;
|
|
using System.Windows;
|
|
|
|
namespace AuroraUIComponent.UserControls
|
|
{
|
|
/// <summary>
|
|
/// Interaction logic for UCKeyValueVerticalCheckBox.xaml
|
|
/// </summary>
|
|
public partial class UCKeyValueVerticalCheckBox : UCKeyValueBase
|
|
{
|
|
public static readonly DependencyProperty ValueBoolProperty
|
|
= DependencyProperty.Register(
|
|
nameof(ValueBool),
|
|
typeof(object),
|
|
typeof(UCKeyValueVerticalCheckBox),
|
|
new FrameworkPropertyMetadata(
|
|
"",
|
|
FrameworkPropertyMetadataOptions.BindsTwoWayByDefault
|
|
));
|
|
|
|
public bool ValueBool {
|
|
get { return (bool)GetValue(ValueBoolProperty); }
|
|
set { SetValue(ValueBoolProperty, value); }
|
|
}
|
|
|
|
public UCKeyValueVerticalCheckBox()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
protected override void KeyTextChanged(string newValue)
|
|
{
|
|
if (string.IsNullOrEmpty(newValue)) {
|
|
// KeyText 가 없으므로, 해당 grid 의 width 를 0 으로 만든다
|
|
GridParent.ColumnDefinitions[0].Width = new GridLength(0);
|
|
}
|
|
}
|
|
}
|
|
}
|