diff options
author | Samantha Houts <samantha@teamredwall.com> | 2016-08-30 10:46:14 -0700 |
---|---|---|
committer | Jason Smith <jason.smith@xamarin.com> | 2016-08-30 10:46:14 -0700 |
commit | 5e553f6195e66e48688b8ab324f1bab1e9251f0a (patch) | |
tree | f8843e5e9e8afe89a05a1cc91c3b7fa05588bac7 /Xamarin.Forms.Core/Picker.cs | |
parent | f551654b1cfe654c579ca50978445e7cb93f287d (diff) | |
download | xamarin-forms-5e553f6195e66e48688b8ab324f1bab1e9251f0a.tar.gz xamarin-forms-5e553f6195e66e48688b8ab324f1bab1e9251f0a.tar.bz2 xamarin-forms-5e553f6195e66e48688b8ab324f1bab1e9251f0a.zip |
Platform Specifics (#301)
* Playing around with how the platform specifics interfaces etc. might work
* Sample implementation of iOS navigation translucency
* Very slightly reduced code
* Better vendor stuff
* Drop single-implemenation interfaces
* Generics on NavigationPage
* On-demand vendor stuff
* Remove functionally duplicate classes and make ControlGallery work again
* Namespace all the things. XAML test.
* Can use Effect to attach platform specific
* Attach Effect on PropertyChanging for XAML support!
* Rename IConfigPlatform interfaces for readability
* Some renaming to match the documents
* Split class files
* Clear out test-only code
* Re-namespace
* Added On method to rendered Elements
* Allow for removal of platform suffix, convenience methods on specific platforms
* Creating a gallery page for specifics
* Add rudimentary Platform Specifics gallery; make CollapseStyle work on UWP;
Add CollapsedPaneWidth specific property
* Toolbar now working with both collapse styles
* MDP now displaying Content title; toolbar routing around title
* Add a gallery for the iOS NavigationPage stuff
* Add Navigation Page as detail page to verify it works with new Toolbar options
* Make titlebar/toolbar background colors consistent
* ToolbarPlacement now working on NavigationPage
* Toolbar Placement working for tabbed and nav pages
* Fix bug where phone doesn't get default toolbar placement on start
* [Core] Add PS WindowSoftInputModeAdjust
[Core] Make Application extendable
* Toolbar placement now working on Nav, Tabbed, and Master pages on desktop/phone
Remove unnecessary style indirection
Fix build errors
* [A] Add PlatformConfigurationExtensions
* SetSoftInputMode test page
* [A] SetSoftInputMode
Known issue: Status bar color does not work in AdjustResize mode
* [Core] Add PS Blur
* [iOS] Configure renderer for blur
* Add test page
* Move to blur VisualElement for broader support
* Move test pages to gallery
* Update docs
* Use lazy initializer for PlatformConfigurationRegistry
Diffstat (limited to 'Xamarin.Forms.Core/Picker.cs')
-rw-r--r-- | Xamarin.Forms.Core/Picker.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Xamarin.Forms.Core/Picker.cs b/Xamarin.Forms.Core/Picker.cs index 5c2fb72b..d5f60e9d 100644 --- a/Xamarin.Forms.Core/Picker.cs +++ b/Xamarin.Forms.Core/Picker.cs @@ -6,7 +6,7 @@ using Xamarin.Forms.Platform; namespace Xamarin.Forms { [RenderWith(typeof(_PickerRenderer))] - public class Picker : View + public class Picker : View, IElementConfiguration<Picker> { public static readonly BindableProperty TextColorProperty = BindableProperty.Create(nameof(TextColor), typeof(Color), typeof(Picker), Color.Default); @@ -20,10 +20,13 @@ namespace Xamarin.Forms eh(bindable, EventArgs.Empty); }, coerceValue: CoerceSelectedIndex); + readonly Lazy<PlatformConfigurationRegistry<Picker>> _platformConfigurationRegistry; + public Picker() { Items = new ObservableList<string>(); ((ObservableList<string>)Items).CollectionChanged += OnItemsCollectionChanged; + _platformConfigurationRegistry = new Lazy<PlatformConfigurationRegistry<Picker>>(() => new PlatformConfigurationRegistry<Picker>(this)); } public IList<string> Items { get; } @@ -58,5 +61,10 @@ namespace Xamarin.Forms { SelectedIndex = SelectedIndex.Clamp(-1, Items.Count - 1); } + + public IPlatformElementConfiguration<T, Picker> On<T>() where T : IConfigPlatform + { + return _platformConfigurationRegistry.Value.On<T>(); + } } }
\ No newline at end of file |