* Updated Frame renderer on UWP to handle CornerRadius properly
* Test page for issue 2838
* Fixed typo and removed UITEST directive
* Label was cut off, fixed
* fixes#3000 remove math on scroll view container for RTL
- setup RTL scrollviews to all start scrolled all the way to the right
* * formatting and renaming fixes
* - don't move scroll if not set to RTL
* Fix mac os standard button events
Pressed, Released, Clicked, and Command all fire appropriately
* Rename / improve mac os button event pressed / released actions
* Fixes#1632
* Allow underline and strikethrought text decorations on labels and spans
* revert some files
* pr feedback adjustments
* remove docs
* rename interface
* reorder enum
* clean up whitespace
* adjust tizen renderer
* add gallery demo for setting both underline and strike
* allow multiple values of enum to be set in xaml/css
* use normal null check
* use nameof
* include paragraph style
* tab alignment
* rebase from upstream
* pass control to update method on UWP
* correct text decorations type converter
* reset run text instead of label text on UWP when spans are used
* add tests for text decoration converter
* [android] new IImageViewHandler API
Context:
https://github.com/bumptech/glidehttps://github.com/jonathanpeppers/glidex
Currently the way my "proof-of-concept" GlideX library works by
completely bypassing `IImageSourceHandler`. GlideX provides its own
custom `ImageRenderer` and `ImageCellRenderer`. This was required due
to how *opinionated* the Glide library is. Glide's approach is to
never allow a developer access to a `Android.Graphics.Bitmap` or
`Android.Graphics.Drawable` because we would likely do it wrong... and
developers do all the time!
To evolve Xamarin.Forms to where images could be better handled down
the road, I've introduced a new interface:
public interface IImageViewHandler : IRegisterable
{
Task LoadImageAsync(ImageSource imageSource, ImageView imageView, CancellationToken cancellationToken = default(CancellationToken));
}
The idea is that we can query for `IImageViewHandler` and fall back to
`IImageSourceHandler`. This would allow GlideX to just be an
`IImageViewHandler` and not mess with creating custom renderers.
We can also implement `IImageViewHandler` for `FileImageSource`, to
get some general performance improvements around loading files from
disk:
string file = ((FileImageSource)imagesource).File;
if (File.Exists(file))
{
//Load with imageView.SetImageURI(Android.Net.Uri)
}
else
{
//Load with imageView.SetImageResource(int)
}
I tested this change with new performance tests in `ImageScenarios`:
- Load 100 images using `AndroidResource`
- Load 100 images from disk
- I conveniently prefixed these with `.`, so they appeared first in
the scenario list
Here are the results from three runs, using `IImageSourceHandler`
versus `IImageViewHandler`, in a HAXM emulator:
`IImageSourceHandler` - 100x `AndroidResource`
- 6059.899
- 3297.885
- 3015.179
`IImageSourceHandler` - 100x from disk
- 12398.71
- 14146.41
- 16060.88
`IImageViewHandler` - 100x `AndroidResource`
- 6748.766
- 2817.975
- 2456.197
`IImageViewHandler` - 100x from disk
- 7326.745
- 4799.001
- 5411.515
There is not going to be as much as an improvement for
`AndroidResource` (maybe not any), since Xamarin.Forms looks for
`Drawable` since: https://github.com/xamarin/Xamarin.Forms/pull/1973
NOTE: that these scenarios are probably too slow to keep, as it seems
these performance tests are geared to fail if they take longer than
250ms. I can remove these before we merge this PR.
Other changes to make this happen:
- `Registrar` was failing with `InvalidCastException` instead of
returning `null` when querying for `IImageViewHandler`. I switched
to using `as` instead of a hard cast. I am not sure why it was not
already setup this way, since
`Registrar.Registered.GetHandlerForObject<T>` appears to be called
and checked for `null` everywhere.
* Changes to get this puppy "mergeable"
- Removed code from #1973 that is obsolete, we should not be able to hit that codepath anymore
- Restored: e8660383b0/Xamarin.Forms.Platform.Android/Extensions/ImageViewExtensions.cs (L55)
- Used `SetImageDrawable` and `Drawable` so that `Bugzilla51173_InvalidImage` should pass now
- Made adjustments to the perf scenarios
* fixes#2338 Queue swaps involving fragments and ignore swaps when parent is going away
* change life cycle namesapce, add reference to issue, change extension name
* First attempt at #1726
Implemented enum and hooked into modal presentation to set the right flag whenever a screen is presented modally on the iPad
* Added back to gallery button on sample app
* Moved setting UIModalPresentationStyle to ModalWrapper ctor
* Removed unused usings
* [WPF] Add WpfLightToolkit in the Xamarin Forms Wpf projet
* Delete WpfLightToolkit dependency
* [WPF] Add WpfLightToolkit in the Xamarin Forms Wpf projet
* Delete WpfLightToolkit dependency
* [Android] Don't mess with the Button.Padding if the Padding property isn't set
* Update 1720 test case to clear padding value
* [Android] Can clear Padding value on Button