public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            if (value != null)
            {
                TextValueDialogInputType item = (TextValueDialogInputType)value;

                if (parameter is String)
                {
                    if (Enum.IsDefined(typeof(TextValueDialogInputType), parameter))
                    {
                        TextValueDialogInputType type = (TextValueDialogInputType)Enum.Parse(typeof(TextValueDialogInputType), parameter as String, false);

                        if (item == type)
                        {
                            return(Visibility.Visible);
                        }
                    }
                }
            }

            return(Visibility.Hidden);
        }
示例#2
0
 /// <summary>
 /// Default constructor
 /// </summary>
 /// <param name="inputType">Type of input control that the user uses to enter the text value</param>
 public GetTextValueDialog(TextValueDialogInputType inputType)
     : this()
 {
     InputType = inputType;
 }