summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues
diff options
context:
space:
mode:
authorRui Marinho <me@ruimarinho.net>2016-03-29 15:13:26 +0100
committerRui Marinho <me@ruimarinho.net>2016-03-29 18:53:12 +0100
commit99b27e9658425da98c6216cc1f804c42d3f43d6f (patch)
treee0e6f7c2290a03864fead4436914e1dcddbdf175 /Xamarin.Forms.Controls.Issues
parent57b0f3ab3080928d2ddd2da58fc84ef7023c3651 (diff)
downloadxamarin-forms-99b27e9658425da98c6216cc1f804c42d3f43d6f.tar.gz
xamarin-forms-99b27e9658425da98c6216cc1f804c42d3f43d6f.tar.bz2
xamarin-forms-99b27e9658425da98c6216cc1f804c42d3f43d6f.zip
[Controls,Core]Allow well known type conversions on the binding system
Diffstat (limited to 'Xamarin.Forms.Controls.Issues')
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39378.xaml12
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39378.xaml.cs97
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems6
3 files changed, 115 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39378.xaml b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39378.xaml
new file mode 100644
index 00000000..e4d0d904
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39378.xaml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<local:TestContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="Xamarin.Forms.Controls.Issues.Bugzilla39378" xmlns:local="clr-namespace:Xamarin.Forms.Controls">
+ <local:TestContentPage.Content>
+ <Grid BackgroundColor="{Binding BackgroundColor}" Margin="20" Padding="20">
+ <Image AutomationId="image1">
+ <Image.Source>
+ <UriImageSource Uri="{Binding HomeImage}" />
+ </Image.Source>
+ </Image>
+ </Grid>
+ </local:TestContentPage.Content>
+</local:TestContentPage> \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39378.xaml.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39378.xaml.cs
new file mode 100644
index 00000000..29b31616
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39378.xaml.cs
@@ -0,0 +1,97 @@
+using System;
+using System.Collections.Generic;
+using Xamarin.Forms;
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+
+namespace Xamarin.Forms.Controls.Issues
+{
+ [Preserve(AllMembers = true)]
+ [Issue(IssueTracker.Bugzilla, 39378, "Image binding with caching not operating as expected", PlatformAffected.All)]
+ public partial class Bugzilla39378 : TestContentPage
+ {
+#if APP
+ public Bugzilla39378()
+ {
+ InitializeComponent();
+ }
+#endif
+
+ protected override void Init()
+ {
+ BindingContext = new ImageController();
+ }
+
+ class ImageController : ViewModelBase
+ {
+
+ public ImageController()
+ {
+ HomeImage = "http://xamarin.com/content/images/pages/forms/example-app.png";
+ LocalBackgroundImage = "Default-568h@2x.png";
+ BackgroundColor = "#00FF00";
+ }
+
+ public string BackgroundColor
+ {
+ get
+ {
+ return _backgroundColor;
+ }
+
+ set
+ {
+ _backgroundColor = value;
+ OnPropertyChanged();
+ }
+ }
+
+ public string HomeImage
+ {
+ get
+ {
+ return _homeImage;
+ }
+
+ set
+ {
+ _homeImage = value;
+ OnPropertyChanged();
+ }
+ }
+
+ public string LocalBackgroundImage
+ {
+ get
+ {
+ return _localBackgroundImage;
+ }
+
+ set
+ {
+ _localBackgroundImage = value;
+ OnPropertyChanged();
+ }
+ }
+
+
+ string _backgroundColor;
+ string _homeImage;
+ string _localBackgroundImage;
+ }
+
+#if UITEST
+ [Test]
+ public void ImageIsPresent()
+ {
+ RunningApp.WaitForElement(q => q.Marked("image1"));
+ Assert.Inconclusive("Please verify image is present");
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems
index 75ace128..fe10ae47 100644
--- a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems
@@ -374,6 +374,9 @@
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla27350.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla28709.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla33578.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla39378.xaml.cs">
+ <DependentUpon>Bugzilla39378.xaml</DependentUpon>
+ </Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Bugzilla22229.xaml">
@@ -483,5 +486,8 @@
<SubType>Designer</SubType>
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
+ <EmbeddedResource Include="$(MSBuildThisFileDirectory)Bugzilla39378.xaml">
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
</ItemGroup>
</Project> \ No newline at end of file