Skip to content

Use TemplatedTaskLoader (implemented with ControlTemplate) with Snackbar

Latest
Compare
Choose a tag to compare
@roubachof roubachof released this 23 Jun 15:22
· 11 commits to master since this release

Builder for the CompositeTaskLoader

If you want to bind on the same snackbar loaders, and commands, there is now a nice builder.
With this change you can now use a TemplatedTaskLoader and a snackbar and making them play nicely together.

CompositeNotifier = CompositeTaskLoaderNotifier.ForCommands()
                .WithLoaders(Loader)
                .WithCommands(BuyGameCommand, PlayTheGameCommand)
                .Build();

And you bind the ShowLastError
on your snackbar:

<tlv:Snackbar Grid.Row="1"
                          Margin="15"
                          VerticalOptions="End"
                          BackgroundColor="White"
                          FontFamily="FontAtariSt"
                          IsVisible="{Binding CompositeNotifier.ShowLastError, Mode=TwoWay}"
                          Text="{Binding CompositeNotifier.LastError, Converter={StaticResource ExceptionToErrorMessageConverter}}"
                          TextColor="{StaticResource TextPrimaryColor}"
                          TextHorizontalOptions="Start" />
  • Fix for the timed visibility when the snackbar (or a ITimedVisibilityText implementation) text is changing.