Граф коммитов

107 Коммитов

Автор SHA1 Сообщение Дата
Niklas Therning 621418b85b Added the ListView.SelectionMode property
Allows the customization of a ListView's selection mode. Either
ListViewSelectionMode.Single (the default) or ListViewSelectionMode.None can
be set.

Fixes #1801.
2018-03-27 10:18:26 +02:00
Shane Neuville a1315cf72a [Core] Create Sync version of SendSleep so lifecycle methods don't have to be async void (#2122)
* 2104 remove async calls that swallow exceptions for life cycle events

* fixed UI test for ios
2018-03-22 10:49:01 -07:00
Alan Grgic 578c0eb23a [Enhancement] Add EvaluateJavaScript method to WebView (#2140)
* Add EvaluateJavaScript method to return string result of js calls

* add docs

* account for some quirks between platforms

* cleanup

* edge cases, standardization, and error handling

* early escape

* add null check

* fix code styles

* clarify sort

* code styles adjustment and null check
2018-03-22 10:20:47 -07:00
Niklas Therning 99f6d30be7 Added the Entry.IsTextPredictionEnabled property (#2038) fixes #1677
Makes it easier for users to disable text prediction/autocomplete/autosuggest.
Fixes #1677.
2018-03-15 17:18:07 +00:00
Rui Marinho 4d9a5bf370
Merge branch '3.0.0' 2018-03-15 17:07:49 +00:00
Rui Marinho 2f1f3e92e3
[Enhancement] Entry ReturnType (#2029)
* [Core] Add ReturnType to Entry

* [Controls] Add Entry ReturnType gallery

* [Android] Entry ReturnType implementation

* [iOS] Entry ReturnType implementation

* [Docs] Docs for ReturnType

* [UWP] Entry ReturnType implementation

* [Core] Make sure we respect command CanExecute fixes #1697

* [Docs] Fix docs

* [Tizen] Entry ReturnType implementation

* [Core] Add missing defaults to BP on entry

* [Tests]Add unit test to entry Returntype command

* [iOS,Android,Tizen,UWP] Better Exception for ReturnType

* [Android] Handle completed event with new return type

* [ControlGallery]Fix ReturnType example

* [UnitTests] Remove extra Test attribute
2018-03-15 10:29:08 +00:00
Rui Marinho 659870c3fc
[UWP] MDP should respect HasNavigationBar for current page (#2101) fixes #1437
* [UWP] MDP renderer should respect HasNavigationPage

* Update MasterDetailControl.cs
2018-03-15 10:18:45 +00:00
Shane Neuville dfeb9f7f91 Editor Auto Resize with Text Changes (#2091)
* Editor Auto Resize with Text Changes 1733

* comment changes
2018-03-14 12:25:33 -07:00
E.Z. Hart 599541e3de [UWP] Thumb color and image for Slider (#2065) fixes #1684
* Add demo/test pages for new properties

* Test attributes for new Slider properties

* Implement slider thumb color and thumb image on UWP

* Use nameof for ThumbImage property
2018-03-14 11:02:26 +00:00
Adam e42bd62fb5 [All] Bindable span (#1850)
* Bindable Text Property on Span

* Style applied to Span

* Added style property

* Unit tests added

* Minor fix and cleanup

* Cleanup of code after review

* Updated docs

* Set Parent and reduce calls to Text property

* OneTime Binding

* Allow OneTime Binding as a default

* Updated docs
2018-03-08 15:50:28 -08:00
Johan Lorensson 0209ce77cd [UWP] Icon on TabbedPage (#1952)
* [Enhancement] Icon on TabbedPage UWP.

Fixes issue #1705.

* Update documentation for issue 1705.

* Smaller adjustments to make sure we still have same fixed header size
when icons are collapsed as before.

* Updated with review feedback.

TabbedPageRenderer.cs has also been updated to use tabs instead of spaces.

* Fix problem to restore back previous alignments on tabbed paged header text block.

When showing images in tabbed paged headers we store old alignment of text block
to be able to restore when hiding images (getting back original alignment of text block).
If sizes where changed for images while showed, the old values where lost.

Fix makes sure only the old values are stored, if current alignment is not the
default (center) when displaying images in tabbed paged header.
2018-03-07 10:37:27 -08:00
Ravinder Jangra 65f4e078ce [Core,iOS,Android] Color on Slider (Implementation) (#1781) fixes #1684
* Implementation for #1690

* Updated  default(Color) -> Color.Default

* Added UWP + default

* Revert "Merge branch 'Slider' into master"

This reverts commit 0aa3d01b68, reversing
changes made to 8961c28315.

* Update SliderRenderer.cs

* Updated Doc

* Updated Slider

Removed Comment.
Formated Code
now building fine for android.

* Slider Renderer for iOS

Reuploding

* Reuploading SliderRenderer for UWP

* Checking and enabling  For API >19
2018-03-07 10:57:59 +00:00
Jason Smith 19e19e24d9
Merge branch '3.0.0' 2018-03-05 13:47:35 -08:00
Stephane Delcroix afb387b22f
[Xaml] add DesignMode flag (#1976)
- fixes #1731
2018-03-05 12:44:37 +01:00
Brian Macomber c96640d00c [Core, iOS, Android, UWP, WPF] Hide scroll view scroll bars (#1910)
* Initial Commit

* Initial Commit

Added setting the initial state of H and V Scroll bar visibility on Android

Added WPF support

Fixed a copy/paste of Upw that should be Wpf

Added GTK and MacOS.

Plus a minor addition to iOS

Added Tizen support

I am unable to test as I can not get Tizen working in my envrionment at the moment

* Added setting the initial state of H and V Scroll bar visibility on Android

* Added WPF support

* Fixed a copy/paste of Upw that should be Wpf

* Added GTK and MacOS.

Plus a minor addition to iOS

* Added Tizen support

I am unable to test as I can not get Tizen working in my envrionment at the moment

* Changes from review

* Update ScrollViewRenderer.cs

* add small WPF performance improvement

* add docs

* fix bad merge

* light refactor (macOS)

* spaces -> tabs

* more spaces -> tabs

* account for Android styles when setting default behavior
2018-02-26 13:20:39 -08:00
Shane Neuville b5fab7192c Capitalization keyboard flag additions for Entry/Editor (#1683) (#1833) 2018-02-26 11:06:24 +00:00
Gerald Versluis 1f770f6588 Implemented MaxLength property on Entry and Editor (#1880)
* Implemented UAP and WPF

* Revert "Implemented UAP and WPF"

This reverts commit e17a66236756021e2b66503281ee3c1cf463e5da.

* Started implementation of #1663

Added MaxLength property on InputView and implemented iOS and Android
Entry and Android Editor

* Implemented iOS Editor

* Improved Android MaxLength

First check to see if there is a LengthFilter in there already and
remove that first

* Implemented GTK naming enhancement for iOS

* Implemented UAP and WPF

* Implemented Tizen

* Removed Linq and implemented forgotten method 😅

* Fixed whitespaces -> tabs

Except GTK, seems everything is spaces there, so kept it for consistency

* Added null guard for iOS

* Implemented Mac OS

* Added samples to gallery

* Polished Tizen implementation

* Tizen EditorRenderer updated and converted more whitespaces to tabs

* Fixed spaces to tabs and usage of nameof

* Added trimming of current text when MaxLength is less than current value length

* Reference right Entry for Tizen

* Trimming on MaxLength change for Tizen

* Trimming on MaxLength change for GTK

* Removed redundant GetValue calls and whitespace fiesta

* And the ones I missed

* Updated the docs

* Revert "Updated the docs"

This reverts commit 416e28706ab921d72e72ebc6488d4b3c4651a384.

* Updated docs just for InputView
2018-02-19 14:27:27 -08:00
Johan Lorensson 40e88596c9 [Enhancement]Add SearchBar platform specific for IsSpellCheckEnabled. (#1824)
Issue #1691.
2018-02-16 11:04:40 -08:00
Niklas Therning 0b2bbb03d4 [Enhancement] IsSpellCheckEnabled on Entry/Editor (#1836)
Adds the InputView.IsSpellCheckEnabled property which makes it easier to
disable the native spell checking features. Fixes #1660.
2018-02-16 10:39:19 +00:00
E.Z. Hart 3b0a6d2432 Allow SearchBar cancel button colors to be set individually (fixes #1878) (#1885) 2018-02-15 15:48:53 +00:00
Francesco Bonacci 58d56d02c8 Add ProgressColor on ProgressBar (#1861) 2018-02-15 12:10:40 +00:00
Stephane Delcroix b96f65bdd9 Merge branch '15-5' 2018-02-12 09:34:33 +01:00
Henric Müller 96e01cc3fb Allow DetectReadingOrderFromContent on UWP (#1717) (#1826)
* Fixes #1717 by adding property DetectReadingOrderFromContentProperty
to InputView and Label and updating EntryRenderer, EditorRenderer and LabelRenderer
for Windows.
2018-02-09 10:33:44 +00:00
Rui Marinho ff40c5b4e1
Add netstandard1.0 support (#1649)
* [Core] Add pcl Xamarin.Forms.Core

* [Core] Add Platform PCL

* [Core] Add Xamarin.Forms.Core PCL

* [Core] Use multi target

*  [Nuget,Core] Add pcl back, multi target netstandard1.0 and netstandard2.0

* [Core] Fix ImageSource for non PCL

* Fix uap

* [UWP] Fix references

* Cleaned up the solution file to remove unused platforms (#1770)

* Try don't build Appx

* [Core]Use netstandard1_0 compile directive

* Don't build UWP and WPF on macOS (#1774)

* [Xaml] Fix compile constant

* [Core] Fix Tuple usage

* [Build] Update provisioning 15.5 sr5

* [Core] Use default compile directive for netstandard1.0

* [Nuget] Add uwp dependency to nuspec

* [Nuspec] Fix speling

* [Core] Add support to FlexLayout on netstandard 1.0

* Try fix test

* cleanup

* [Core] Fix netstandard1.0 usage

* [Core] Remove tuple usage FlexLayout, cleanup
2018-02-08 18:18:56 +00:00
Alan Grgic 9beca0d8cb [Enhancement] UWP PlatformSpecific to display JavaScript alerts in WebView (#1785) fixes (#1682)
* add platformSpecific for enabling UWP javascript alerts in webview

* update docs
2018-02-06 10:49:13 +00:00
E.Z. Hart 49a937fc5c Rename InputTransparentInherited to CascadeInputTransparent (#1771)
* Rename InputTransparentInherited to CascadeInputTransparent

* Update docs

* Update property checks
2018-02-02 12:00:00 +00:00
Ravinder Jangra 3fe8f8ae2c Fixes #1493 (#1765) 2018-02-02 10:39:37 +00:00
E.Z. Hart 85334fd4a0 Allow Layouts to specify whether child controls inherit InputTransparent (#1621)
* Test created

* Round out test page;
Add InputTransparentInherited to VisualElement;
Handle InputTransparentInherited for Android;

* Handle InputTransparentInherited for iOS

* Move InputTransparentInherited to Layout

* Handle InputTransparentInherited for UWP

* Handle changes to InputTransparentInherited

* Automate tests

* Make property style consistent

* Fix some formatting issues

* Fix build

* Fix automation NRE during hit testing; fix transparency test
2018-02-01 10:47:24 +00:00
BradChase2011 933d6809ec [UWP] Fixed inconsistency on UWP's DatePicker and the other OS's. (#1183)
* [UWP] Fixed inconsistency on UWP's DatePicker and the other OS's.

* [UWP] bz60001 Test case.

* * [UWP] Fixed inconsistency on UWP's DatePicker and the other OS's. (Build fix)
2018-01-31 18:18:40 +00:00
E.Z. Hart 8017ef5ba3 Don't hook up Unloaded handler in UWP PageRenderer until Loaded fires (#1634) 2018-01-24 10:15:52 +00:00
Edward Brey f9b27a2edf Fix UWP button image rendering crash (#1576)
On UWP, if you click around an app quickly, you can get it crash with this error:
> Xamarin.Forms.Platform.UAP.dll!Xamarin.Forms.Platform.UWP.ButtonRenderer.UpdateContent.AnonymousMethod__0(object sender, Windows.UI.Xaml.RoutedEventArgs args)

Since image loading is deferred, if you navigate quickly (or if you load the image from a slow source), the Xamarin.Forms element may no longer be present when `ImageOpened` is raised. The null check in this PR should fix that.
2018-01-16 11:20:18 +00:00
Paul DiPietro dcb2d2bb2a [UWP] Use transparent as default TabbedPage bar background color (#922 reopen) (#1327)
* [UWP] Use transparent as default TabbedPage bar background color

* Remove a now unnecessary check for 8.1
2018-01-11 12:36:22 +00:00
Paul DiPietro 7ea9f20bd2 [UWP] Check LockApplicationHost/assigned access on IsInvokeRequired (#1534) 2018-01-11 12:11:46 +00:00
Rui Marinho 14937b6252 Merge branch '15-5' 2018-01-05 10:13:23 +00:00
E.Z. Hart 28948d7ef7 VisualStateManager phase 1 (#1405)
* Port from old VSM branch

* Add PS and notes

* Checkpoint: entry text UWP mostly working, need to check on background colors

* Remove irrelevant samples from the EntryDisabledStatesGallery
Make Background color work on UWP Entry with VSM

* Add platform specific for disabling legacy colors on Android

* Add OnPlatform example to visual state manager gallery

* Add example OnIdiom in Visual State Manager

* Add platform specific for disabling legacy color mode on iOS Entry

* Add gallery for Button disabled states
Handling legacy colors for Buttons on Android

* Split out disabled states galleries; disabled legacy handling for Picker

* TimePicker disabled states

* DatePicker color management on Android

* Color management for pre-AppCompat button

* Button legacy color handling on iOS

* Consolidate Platform Specifics;
legacy colors working for iOS Picker and DatePicker

* Fix broken search bar color management
SearchBar color management working with VSM
Add test page for SearchBar disabled color management
Consolidate legacy color management check code into extension method on Android

* Legacy color management for Editor on Android

* Fix legacy color stuff for SearchBar Cancel button on iOS

* C# 7 cleanup

* Add colors for Cancel Button

* Make sure VisualStateGroup collections set by styles are distinct objects

* Validation example

* Make common state names consts

* Make the Windows VSM and Forms VSM work together

* Update galleries for Windows

* Make new methods internal

* Split gallery classes and add more explanation to validation example

* Remove debugging statements

* Add a quick code-only example

* Make legacy color management work for fast button renderer

* Remove old TODO

* Update docs

* Move RunTimeNamePropertyAttribute to Xamarin.Forms.Xaml namespace

* Verify XF namespace when looking for VisualState

* Use nameof

* Make common states constants public

* Cast VisualElement directly so it crashes if the property is set on the wrong type

* Collection -> IList for VisualStateManager

* Setting fromStyle to true

* Remove extraneous `private set`

* Seal VSM classes

* Use constraints instead of ==

* Add teardown method; use constraints rather than ==

* Remove null checking with GetVisualStateGroups

* Don't explicitly initialize collections on elements

* Actually, turns out that fromStyle:false *was* correct

* Direct casts

* Use GetIsDefault check in GoToState

* Validate parents in FindTypeForVisualState

* Validate group and state names on Add

* Fixed check for setter collection

* Fix issues with "duplicate" names when VisualStateGroups declared directly on VisualElements

* Add gallery example for VSGs directly on VisualElements

* Update docs

* Fix bug where initial TextColor isn't set for FastRenderer Button

* Move to explicit VisualStateGroupList in Setter

* Fix return types for unit tests

* Using string.CompareOrdinal in GetState

* Update docs

* Add check for null/empty VisualState Name properties
2018-01-05 09:11:51 +00:00
Paul DiPietro 6ff3f70257 [UWP] Use RawPixelsPerViewPixel for ScalingFactor (#1142)
* [UWP] Use RawPixelsPerViewPixel for ScalingFactor

* Adjustment
2017-12-21 23:29:31 +00:00
Gustavo 32b1e3e320 [UWP] Bug 57674 - XF.UWP ListView not honoring INotifyCollectionChanged (#1235)
* Fix Issue 57674

Suscribing to OnCollectionChanged

* Fixing style issues

Style issues

* Style issue 2

Retoring to initial state curly braces
2017-12-21 23:16:29 +00:00
Paul DiPietro 640e35526b [UWP] Set ListView SelectedItem when constructing page (#1357) 2017-12-21 19:32:48 +00:00
Stephane Delcroix 5ea86a266b
Stylesheets (#1207)
* [*] Support for CSS StyleSheets

 Parsing, loading, and applying of StyleSheets

 see https://github.com/xamarin/Xamarin.Forms/pull/1207#issue-266464280
 for complete description.

* use initial, not none

* fix tests
2017-12-20 10:47:50 +01:00
BradChase2011 1ac7ad284f [UWP] Optimized ZIndexing for a thirty-nine percent speed boot on loa… (#1196)
* [UWP] Optimized ZIndexing for a thirty-nine percent speed boot on loading views.

* [UWP] Optimized ZIndexing for a thirty-nine percent speed boot on loading views.
2017-12-19 12:39:53 +00:00
Paul DiPietro abe2f3d1f5 [All] Implement IFontElement on Picker, DatePicker, and TimePicker (#662)
* [C] Implement IFontElement on Picker/TimePicker/DatePicker

* Add InvalidateMeasure calls

* Add behavior to macOS renderers
2017-12-12 14:02:21 +00:00
Paul DiPietro 114fd7e50a [UWP] Entry alignment re-adjustment (#1308) 2017-12-05 19:09:32 +00:00
E.Z. Hart 474ae84907 [UWP] Fix various memory leaks in UWP applications (#1285)
* Starting repro

* Stop CellControl from creating extra unnecessary Cells

* Update repro

* Add missing calls to SuppressFinalize

* Update test

* Possible fix

* Repro for Xaml case with group header

* Consolidate event handler removal

* Clean up outdated todo in PlatformQueries

* Remove Loaded/Unloaded handlers to avoid leaking renderer

* Unparent previous page when popping so resource changed handlers are cleaned up

* When clearing nav stack on MainPage set, also clear modal stack

* Tests for grouped and ungrouped lists

* Prevent list item duplication and leaking

* PR cleanup

* Fix possible exception when ViewCell View measure returns negative height
2017-12-05 18:49:58 +00:00
Poppyto 309751523a [UWP-WinRT] Bug 25662, SwitchCell.IsEnabled not rendered (#1279)
* Bugfix for #25662, Property SwitchCell.IsEnabled wasn't implemented in the rendering

* Revert unused files
2017-12-05 17:07:34 +00:00
Jimmy Garrido 658f321599 [UWP] Update Alert and ActionSheet implementations (#881)
* [UWP] Update Alert and ActionSheet implementations

* Add new xbf file to nuspec

* Fix code after rebase
2017-12-05 16:33:28 +00:00
Rui Marinho 64f390fd8c [UWP] Prevent NRE (rebase of #1185) 2017-12-05 15:25:08 +00:00
Paul DiPietro e85e0fe804 [UWP] Entry alignment re-adjustment (#1286) 2017-11-29 19:23:06 +00:00
Rui Marinho b74d545fc1
[All] Move to netstandard2.0 **Breaking change** (#1306)
* Move to netstandard 2.0

* Fix docs

* Small fixes
2017-11-29 17:37:06 +00:00
Rui Marinho 5a60f17e47
[Win] Remove Windows 8.1 platforms **Breaking change** (#1267)
* [Platforms]Remove WP8.0 and WinRT

* Update submodule

* [UWP] Fix maps UWP

* [UWP] Remove more stuff from old windows platforms

* [Docs] Update docs
2017-11-27 15:14:01 +00:00
Samantha Houts d3d59ee4f0 [All] Basic Right-To-Left Support (#1222)
* Restart RTL work

* Remove IsInherited flag as it never got used

* [Core] Unit tests

* [Core] FlowDirection

* Add FlowDirectionGallery

* Android gallery supports RTL

Need to set minSdkVersion to 17 to test

* iOS gallery supports RTL

* UWP gallery supports RTL

* [Android] Implement FlowDirection

* [iOS] Implement FlowDirection

* [macOS] Implement FlowDirection

* [UWP] Implement FlowDirection

* Update docs

* [Core] Simplify EffectiveFlowDirection enum & expose helper extensions

Also, TEST TEST TEST

* Update docs
2017-11-09 14:31:15 +00:00