summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues
diff options
context:
space:
mode:
authorPaul DiPietro <paul.dipietro@microsoft.com>2017-02-01 10:52:40 -0600
committerRui Marinho <me@ruimarinho.net>2017-03-10 14:33:57 +0000
commitf1505ab5cad20f45358415afe868906a5d59e584 (patch)
treec71c6eaa7e43db929e239ff71613def6f7e66e52 /Xamarin.Forms.Controls.Issues
parentf304d2bd9b5e92ffb6f0ac74bb6ce79395c5c9b5 (diff)
downloadxamarin-forms-f1505ab5cad20f45358415afe868906a5d59e584.tar.gz
xamarin-forms-f1505ab5cad20f45358415afe868906a5d59e584.tar.bz2
xamarin-forms-f1505ab5cad20f45358415afe868906a5d59e584.zip
[C] Update SelectedItem prior to event invoke
Diffstat (limited to 'Xamarin.Forms.Controls.Issues')
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla51642.xaml23
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla51642.xaml.cs4
2 files changed, 15 insertions, 12 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
index e7318b6e..85261444 100644
--- a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla51642.xaml
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla51642.xaml
@@ -2,16 +2,15 @@
<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>
+ <StackLayout>
+ <Picker>
+ <Picker.Items>
+ <x:String>1</x:String>
+ <x:String>2</x:String>
+ <x:String>3</x:String>
+ </Picker.Items>
+ </Picker>
+ <Picker x:Name="BoundPicker" ItemsSource="{Binding Items}"/>
+ <Label x:Name="SelectedItemLabel"/>
+ </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
index ab164287..9bf210d1 100644
--- 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
@@ -18,6 +18,10 @@ namespace Xamarin.Forms.Controls.Issues
{
InitializeComponent ();
LoadDelayedVM();
+ BoundPicker.SelectedIndexChanged += (s, e) =>
+ {
+ SelectedItemLabel.Text = BoundPicker.SelectedItem.ToString();
+ };
}
public async void LoadDelayedVM()