public MainWindow()
        {
            InitializeComponent();

            CustomerViewModel obj = new CustomerViewModel();
            obj.TxtCustomerName = "Nelson";
            obj.TxtAmount = "2000";

            //Level one -> glue on view (MVC approach);
            //Problems: too much code behind !!!!

            lblName.Content = obj.TxtCustomerName;
            lblAmount.Content = obj.TxtAmount;
            BrushConverter bc = new BrushConverter();
            labelHabits.Background = bc.ConvertFromString(obj.LblAmountColor) as SolidColorBrush;
            chkMarried.IsChecked = obj.IsMarried;
        }
Exemplo n.º 2
0
 //Heavely Couple
 public ButtonCommand(CustomerViewModel _obj)
 {
     obj = _obj;
 }
Exemplo n.º 3
0
 public ButtonCommand(CustomerViewModel _obj) //Heavely Couple
 {
     obj = _obj;
 }