SetLabelVisible() 공개 정적인 메소드

public static SetLabelVisible ( DependencyObject obj, bool value ) : void
obj System.Windows.DependencyObject
value bool
리턴 void
예제 #1
0
        public static bool ShowUntyped(Type type, ref object value, string title = null, string text = null,
                                       string labelText = null, string format = null, string unitText = null,
                                       Window owner     = null)
        {
            ValueLineBox vlb = new ValueLineBox();

            vlb.Title = title ?? SelectorMessage.ChooseAValue.NiceToString();

            vlb.tb.Text = text ?? SelectorMessage.PleaseChooseAValueToContinue.NiceToString();

            vlb.valueLine.Type = type;

            if (labelText == null)
            {
                Common.SetLabelVisible(vlb.valueLine, false);
            }
            else
            {
                vlb.valueLine.LabelText = labelText;
            }

            vlb.valueLine.Format   = format;
            vlb.valueLine.UnitText = unitText;
            vlb.valueLine.Value    = value;

            vlb.Owner = owner;

            if (vlb.ShowDialog() == true)
            {
                value = vlb.valueLine.Value;
                return(true);
            }
            return(false);
        }