Ejemplo n.º 1
0
        private static Control GetControl(object targetType, object value, Action <object> update, bool isReadOnly = false)
        {
            switch (targetType)
            {
            case bool _: return(BoolVM.Create(value, update, isReadOnly: isReadOnly));

            case int _: return(IntVM.Create(value, update, isReadOnly: isReadOnly));

            case double _: return(DoubleVM.Create(value, update, isReadOnly: isReadOnly));
            }

            return(StringVM.Create(value, update, isReadOnly: isReadOnly));
        }
Ejemplo n.º 2
0
 public DoubleView(DoubleVM vm)
 {
     InitializeComponent();
     DataContext = vm;
 }