summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.ControlGallery.WindowsUniversal
diff options
context:
space:
mode:
authorE.Z. Hart <hartez@users.noreply.github.com>2017-08-10 17:35:27 (GMT)
committerJason Smith <jason.smith@xamarin.com>2017-08-10 17:35:27 (GMT)
commit1aab6ff4893935fb3bb91187d2d3fa796576198a (patch)
tree99a4adc0b178cc5619496d17c7feeb2a8f55607d /Xamarin.Forms.ControlGallery.WindowsUniversal
parentec10a37ff125fd920616649ec9ffde2f51d77a37 (diff)
downloadxamarin-forms-1aab6ff4893935fb3bb91187d2d3fa796576198a.zip
xamarin-forms-1aab6ff4893935fb3bb91187d2d3fa796576198a.tar.gz
xamarin-forms-1aab6ff4893935fb3bb91187d2d3fa796576198a.tar.bz2
Repro 58406; apply effects to fast renderers on Android (#1077)
Diffstat (limited to 'Xamarin.Forms.ControlGallery.WindowsUniversal')
-rw-r--r--Xamarin.Forms.ControlGallery.WindowsUniversal/FocusEffect.cs1
-rw-r--r--Xamarin.Forms.ControlGallery.WindowsUniversal/Properties/AssemblyInfo.cs3
-rw-r--r--Xamarin.Forms.ControlGallery.WindowsUniversal/Xamarin.Forms.ControlGallery.WindowsUniversal.csproj1
-rw-r--r--Xamarin.Forms.ControlGallery.WindowsUniversal/_58406EffectRenderer.cs29
4 files changed, 32 insertions, 2 deletions
diff --git a/Xamarin.Forms.ControlGallery.WindowsUniversal/FocusEffect.cs b/Xamarin.Forms.ControlGallery.WindowsUniversal/FocusEffect.cs
index 0d4eba0..73d6d90 100644
--- a/Xamarin.Forms.ControlGallery.WindowsUniversal/FocusEffect.cs
+++ b/Xamarin.Forms.ControlGallery.WindowsUniversal/FocusEffect.cs
@@ -10,7 +10,6 @@ using Xamarin.Forms;
using Xamarin.Forms.ControlGallery.WindowsUniversal;
using Xamarin.Forms.Platform.UWP;
-[assembly: ResolutionGroupName("Xamarin")]
[assembly: ExportEffect(typeof(FocusEffect), "FocusEffect")]
namespace Xamarin.Forms.ControlGallery.WindowsUniversal
{
diff --git a/Xamarin.Forms.ControlGallery.WindowsUniversal/Properties/AssemblyInfo.cs b/Xamarin.Forms.ControlGallery.WindowsUniversal/Properties/AssemblyInfo.cs
index b83ca10..b29a1c4 100644
--- a/Xamarin.Forms.ControlGallery.WindowsUniversal/Properties/AssemblyInfo.cs
+++ b/Xamarin.Forms.ControlGallery.WindowsUniversal/Properties/AssemblyInfo.cs
@@ -33,4 +33,5 @@ using Xamarin.Forms.Platform.UWP;
[assembly: ComVisible(false)]
// Deliberately broken image source and handler so we can test handling of image loading errors
-[assembly: ExportImageSourceHandler(typeof(FailImageSource), typeof(BrokenImageSourceHandler))] \ No newline at end of file
+[assembly: ExportImageSourceHandler(typeof(FailImageSource), typeof(BrokenImageSourceHandler))]
+[assembly: Xamarin.Forms.ResolutionGroupName (Xamarin.Forms.Controls.Issues.Effects.ResolutionGroupName)] \ No newline at end of file
diff --git a/Xamarin.Forms.ControlGallery.WindowsUniversal/Xamarin.Forms.ControlGallery.WindowsUniversal.csproj b/Xamarin.Forms.ControlGallery.WindowsUniversal/Xamarin.Forms.ControlGallery.WindowsUniversal.csproj
index 666cbe7..0c34e5d 100644
--- a/Xamarin.Forms.ControlGallery.WindowsUniversal/Xamarin.Forms.ControlGallery.WindowsUniversal.csproj
+++ b/Xamarin.Forms.ControlGallery.WindowsUniversal/Xamarin.Forms.ControlGallery.WindowsUniversal.csproj
@@ -121,6 +121,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="_57114Renderer.cs" />
+ <Compile Include="_58406EffectRenderer.cs" />
<Content Include="coffee.png" />
<Content Include="default.css" />
<Content Include="invalidimage.jpg" />
diff --git a/Xamarin.Forms.ControlGallery.WindowsUniversal/_58406EffectRenderer.cs b/Xamarin.Forms.ControlGallery.WindowsUniversal/_58406EffectRenderer.cs
new file mode 100644
index 0000000..64a863b
--- /dev/null
+++ b/Xamarin.Forms.ControlGallery.WindowsUniversal/_58406EffectRenderer.cs
@@ -0,0 +1,29 @@
+using System.Linq;
+using Windows.UI.Xaml.Controls;
+using Xamarin.Forms;
+using Xamarin.Forms.Controls.Issues;
+using Xamarin.Forms.Platform.UWP;
+
+[assembly: ExportEffect(typeof(Xamarin.Forms.ControlGallery.WindowsUniversal._58406EffectRenderer), Bugzilla58406.EffectName)]
+
+namespace Xamarin.Forms.ControlGallery.WindowsUniversal
+{
+ public class _58406EffectRenderer : PlatformEffect
+ {
+ protected override void OnAttached()
+ {
+ var textBlock = Control as TextBlock;
+
+ if (textBlock == null)
+ {
+ return;
+ }
+
+ textBlock.Text = new string(textBlock.Text.ToCharArray().Reverse().ToArray());
+ }
+
+ protected override void OnDetached()
+ {
+ }
+ }
+} \ No newline at end of file