ProgressBar does not update correctly until hot reload.
Posted: 25 Jun 2021, 18:57
Code: Select all
<TextBlock Text="{Binding Relay.DaysUntilCompletion, StringFormat=Days Left: {0}}" />
<TextBlock Text="{Binding Relay.DaysPerDelivery, StringFormat=Days per delivery: {0:N1}}" />
<TextBlock>
<Run Text="{Binding Relay.TotalDelivered, StringFormat=Amount Delivered: {0} /}" /> <Run Text="{Binding Relay.CurrentOrder.Amount}" />
</TextBlock>
<ProgressBar
Height="20"
Margin="0,5"
Maximum="{Binding Relay.Distance}"
Minimum="0"
Value="{Binding Relay.Timer}" />
Code: Select all
public class RelayVM : VM
{
public TransportRelay Relay { get; }
public RelayVM(TransportRelay relay)
{
Relay = relay;
}
}
Note that other controls are binding to properties in Relay and are updating correctly without needing a hot reload. Also, once a hot reload is complete the Timer & Distance properties update when they should (not just once) so they do implement property changed correctly.
Video: https://files.catbox.moe/tieful.mp4