December 2019
Intermediate to advanced
528 pages
11h 19m
English
It turns out that we have a slight glitch in the logic here: Morris, our caretaker, needs to be able to update the stock, but not view the current level. However, our program hides the stock figure for him and so he can't update it. In order to get around this, we'll need to add some additional commands and buttons. Essentially, what we want Morris to be able to do is use an item of stock, so a decrease stock button would be ideal; let's add the button to MainPage.xaml now (we'll put it just underneath the Update Quantity button):
<Button Command="{Binding UpdateQuantity}" Grid.Row="2" Grid.Column="0"> <TextBlock Text="Update Quantity" /> </Button> <Button Command="{Binding DecreaseQuantity}" ...