예제 #1
0
 public static CaptionViewModel <T> WithComboBox <T>(this CaptionViewModel <T> model, IParent parent,
                                                     List <ComboBoxItem <T> > values, string caption,
                                                     InputBox <T> .TryParse tryParse = null) where T : struct
 {
     model.Input = new ComboBoxViewModel <T>(parent ?? model.Parent, values, caption, tryParse);
     return(model);
 }
예제 #2
0
 public static CaptionViewModel <T> WithTextBox <T>(this CaptionViewModel <T> model, IParent parent, string caption,
                                                    InputBox <T> .TryParse tryParse, T value)
     where T : struct
 {
     model.Input = new TextBoxViewModel <T>(parent, caption ?? model.Caption, tryParse, value);
     return(model);
 }