From 99b27e9658425da98c6216cc1f804c42d3f43d6f Mon Sep 17 00:00:00 2001 From: Rui Marinho Date: Tue, 29 Mar 2016 15:13:26 +0100 Subject: [Controls,Core]Allow well known type conversions on the binding system --- .../Bugzilla39378.xaml | 12 +++ .../Bugzilla39378.xaml.cs | 97 ++++++++++++++++++++++ .../Xamarin.Forms.Controls.Issues.Shared.projitems | 6 ++ 3 files changed, 115 insertions(+) create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39378.xaml create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39378.xaml.cs (limited to 'Xamarin.Forms.Controls.Issues') 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 @@ + + + + + + + + + + + + \ 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 @@ + + Bugzilla39378.xaml + @@ -483,5 +486,8 @@ Designer MSBuild:UpdateDesignTimeXaml + + MSBuild:UpdateDesignTimeXaml + \ No newline at end of file -- cgit v1.2.3