diff options
author | Stephane Delcroix <stephane@delcroix.org> | 2017-01-27 10:16:51 +0100 |
---|---|---|
committer | Rui Marinho <me@ruimarinho.net> | 2017-03-10 14:33:26 +0000 |
commit | f304d2bd9b5e92ffb6f0ac74bb6ce79395c5c9b5 (patch) | |
tree | 1d30188359b833f70c7ffceb6d430946aa14e277 /Xamarin.Forms.Controls.Issues | |
parent | 6ef2f23417ef4fc857da0d964ce8021d5da60314 (diff) | |
download | xamarin-forms-f304d2bd9b5e92ffb6f0ac74bb6ce79395c5c9b5.tar.gz xamarin-forms-f304d2bd9b5e92ffb6f0ac74bb6ce79395c5c9b5.tar.bz2 xamarin-forms-f304d2bd9b5e92ffb6f0ac74bb6ce79395c5c9b5.zip |
[UWP] connect the actual ObservableCollection to the ComboBox.ItemsSource
Diffstat (limited to 'Xamarin.Forms.Controls.Issues')
3 files changed, 65 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla51642.xaml b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla51642.xaml new file mode 100644 index 00000000..e7318b6e --- /dev/null +++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla51642.xaml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8" ?> +<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" + xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" + x:Class="Xamarin.Forms.Controls.Issues.Bugzilla51642"> + <StackLayout> + + <Picker> + <Picker.Items> + <x:String>1</x:String> + <x:String>2</x:String> + <x:String>3</x:String> + </Picker.Items> + </Picker> + <Picker ItemsSource="{Binding Items}"/> + + </StackLayout> +</ContentPage>
\ No newline at end of file diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla51642.xaml.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla51642.xaml.cs new file mode 100644 index 00000000..ab164287 --- /dev/null +++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla51642.xaml.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +using Xamarin.Forms; +using Xamarin.Forms.CustomAttributes; +using Xamarin.Forms.Internals; + +namespace Xamarin.Forms.Controls.Issues +{ + [Preserve(AllMembers = true)] + [Issue(IssueTracker.Bugzilla, 51642, "Delayed BindablePicker UWP", PlatformAffected.All)] + public partial class Bugzilla51642 : ContentPage + { + public Bugzilla51642 () + { + InitializeComponent (); + LoadDelayedVM(); + } + + public async void LoadDelayedVM() + { + await Task.Delay(1000); + Device.BeginInvokeOnMainThread(() => BindingContext = new Bz51642VM()); + } + } + + class Bz51642VM + { + public IList<string> Items { + get { + return new List<String> { "Foo", "Bar", "Baz" }; + } + } + } +} 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 75a376bd..8d906566 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 @@ -156,6 +156,10 @@ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla48236.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Bugzilla47971.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Bugzilla51238.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)Bugzilla51642.xaml.cs"> + <DependentUpon>Bugzilla51642.xaml</DependentUpon> + <SubType>Code</SubType> + </Compile> <Compile Include="$(MSBuildThisFileDirectory)CarouselAsync.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Bugzilla34561.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Bugzilla34727.cs" /> @@ -625,4 +629,10 @@ <Generator>MSBuild:UpdateDesignTimeXaml</Generator> </EmbeddedResource> </ItemGroup> + <ItemGroup> + <EmbeddedResource Include="$(MSBuildThisFileDirectory)Bugzilla51642.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:UpdateDesignTimeXaml</Generator> + </EmbeddedResource> + </ItemGroup> </Project>
\ No newline at end of file |