diff --git a/AsyncImageLoader.Avalonia.Demo/AsyncImageLoader.Avalonia.Demo.csproj b/AsyncImageLoader.Avalonia.Demo/AsyncImageLoader.Avalonia.Demo.csproj index b94ce80..571309a 100644 --- a/AsyncImageLoader.Avalonia.Demo/AsyncImageLoader.Avalonia.Demo.csproj +++ b/AsyncImageLoader.Avalonia.Demo/AsyncImageLoader.Avalonia.Demo.csproj @@ -9,11 +9,13 @@ - - + + + + - - + + diff --git a/AsyncImageLoader.Avalonia.Demo/Controls/HamburgerMenu.axaml.cs b/AsyncImageLoader.Avalonia.Demo/Controls/HamburgerMenu.axaml.cs index 00050c4..378d5ef 100644 --- a/AsyncImageLoader.Avalonia.Demo/Controls/HamburgerMenu.axaml.cs +++ b/AsyncImageLoader.Avalonia.Demo/Controls/HamburgerMenu.axaml.cs @@ -43,12 +43,13 @@ protected override void OnApplyTemplate(TemplateAppliedEventArgs e) _splitView = e.NameScope.Find("PART_NavigationPane"); } - protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change) { + protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change) + { base.OnPropertyChanged(change); if (change.Property == BoundsProperty && _splitView is not null) { - EnsureSplitViewMode(change.OldValue.GetValueOrDefault(), change.NewValue.GetValueOrDefault()); + EnsureSplitViewMode((Rect)change.OldValue, (Rect)change.NewValue); } } diff --git a/AsyncImageLoader.Avalonia.Demo/Pages/AdvancedImagePage.axaml b/AsyncImageLoader.Avalonia.Demo/Pages/AdvancedImagePage.axaml index 1bef1d3..0f026a7 100644 --- a/AsyncImageLoader.Avalonia.Demo/Pages/AdvancedImagePage.axaml +++ b/AsyncImageLoader.Avalonia.Demo/Pages/AdvancedImagePage.axaml @@ -8,15 +8,17 @@ x:Class="AsyncImageLoader.Avalonia.Demo.Pages.AdvancedImagePage"> - AdvancedImage - Image + + -This control allows to specify a custom IAsyncImageLoader for particular control. -Also this control has loading indicator support. + + This control allows to specify a custom IAsyncImageLoader for particular control. + Also this control has loading indicator support. -I created and used loader, which will be delay image loading by one second. + I created and used loader, which will be delay image loading by one second. + @@ -28,17 +30,21 @@ I created and used loader, which will be delay image loading by one second. Loader="{x:Static services:LongLoader.Instance}"/> -This control provides access to BaseUri. -So you can not only upload pictures from a file or from the Internet, but also specify their relative path as in the usual Image. -This control fully implements the functionality of Image, and adds all the functions of the loaders. -Current images loaded from AvaloniaResource Source="../Assets/cat4.jpg". + + This control provides access to BaseUri. + So you can not only upload pictures from a file or from the Internet, but also specify their relative path as in the usual Image. + This control fully implements the functionality of Image, and adds all the functions of the loaders. + Current images loaded from AvaloniaResource Source="../Assets/cat4.jpg". + -Also, you can use specify absolute path to AvaloniaResource. -Current images loaded from AvaloniaResource Source="/Assets/cat5.jpg". + + Also, you can use specify absolute path to AvaloniaResource. + Current images loaded from AvaloniaResource Source="/Assets/cat5.jpg". + diff --git a/AsyncImageLoader.Avalonia.Demo/Pages/AttachedPropertiesPage.axaml b/AsyncImageLoader.Avalonia.Demo/Pages/AttachedPropertiesPage.axaml index 21ac4c5..8eb9693 100644 --- a/AsyncImageLoader.Avalonia.Demo/Pages/AttachedPropertiesPage.axaml +++ b/AsyncImageLoader.Avalonia.Demo/Pages/AttachedPropertiesPage.axaml @@ -6,7 +6,7 @@ mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" x:Class="AsyncImageLoader.Avalonia.Demo.Pages.AttachedPropertiesPage"> - Images from Internet + @@ -15,12 +15,12 @@ - Images from Assets (AvaloniaResource) + - Images from manifest resources (EmbeddedResource) + diff --git a/AsyncImageLoader.Avalonia/AdvancedImage.axaml.cs b/AsyncImageLoader.Avalonia/AdvancedImage.axaml.cs index d3cc219..2707d6a 100644 --- a/AsyncImageLoader.Avalonia/AdvancedImage.axaml.cs +++ b/AsyncImageLoader.Avalonia/AdvancedImage.axaml.cs @@ -69,7 +69,7 @@ static AdvancedImage() { var loaderChangedObservable = LoaderProperty.Changed .Where(args => args.IsEffectiveValueChange) - .Where((args, i) => i == 0 || args.Sender.GetValue(ShouldLoaderChangeTriggerUpdateProperty)) + .Where((args, i) => i == 0 || (bool)args.Sender.GetValue(ShouldLoaderChangeTriggerUpdateProperty)!) .Select(args => args.NewValue.Value) .StartWith((IAsyncImageLoader?)null); diff --git a/AsyncImageLoader.Avalonia/AsyncImageLoader.Avalonia.csproj b/AsyncImageLoader.Avalonia/AsyncImageLoader.Avalonia.csproj index 5bce84f..ac80733 100644 --- a/AsyncImageLoader.Avalonia/AsyncImageLoader.Avalonia.csproj +++ b/AsyncImageLoader.Avalonia/AsyncImageLoader.Avalonia.csproj @@ -26,7 +26,7 @@ - +