microsoft / AppConsult-WinAppsModernizationWorkshop

Windows Apps modernization workshop
MIT License
67 stars 35 forks source link

Save button in AddNewExpense doesn't become to enable #25

Closed runceel closed 5 years ago

runceel commented 5 years ago

After end of Exercise 3, Save button can't click just after filled all form items.

Repro step:

image

If setting focus any textbox control, then the Save button become to enable.

image

qmatteoq commented 5 years ago

Thanks Kazuki. It seems that the problem is that the XAML Islands control doesn't trigger the focus changed event. With the starting WPF DatePicker control, when you press TAB and you move from the City field to the Date one the "CanExecute" in the ViewModel is revaluated. But it doesn't happen when you move from the City field ot the UWP Calendar control. I'll investigate if there's an easy way to fix this. Feel free to take a look as well if you bandwidth!

runceel commented 5 years ago

I think that the workaround of this issue is adding UpdateSourceTrigger argument with PropertyChanged value to Binding of all TextBox controls in AddNewExpense.xaml.

How do you think about this workaround?

qmatteoq commented 5 years ago

Fixed in b7a7721