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

163 Коммитов

Автор SHA1 Сообщение Дата
Rui Marinho a2ae417c21 Merge branch '3.2.0' into 3.3.0 2018-09-20 16:08:21 +01:00
Shane Neuville fefdb9295c [Core] Propagate BindingContext changes to TitleView (#3823)
* [Core] Propagate BindingContext changes to TitleView

* [Tests] Move UI test to Core Unit Test
2018-09-19 21:07:05 -07:00
Samantha Houts 7422cb8b17 Merge branch '3.2.0' 2018-08-31 14:19:27 -07:00
Samantha Houts a8260b0075 [Android,iOS,UWP] Allow Entry CursorPosition/SelectionLength to be set in ctor (#3402) fixes #3343 fixes #3633
* Add repro for #3343 + unit tests

* [Core] Disallow negative values for CursorPosition/SelectionLength

* [All] CursorPosition/SelectionLength can bindin ctor & clear value

fixes #3343

* typo

* cleanup

* [iOS] Cursor snaps to end

* try/catch
2018-08-31 18:20:30 +01:00
Rui Marinho fa1df7bdcd Merge branch '3.2.0' 2018-08-06 17:05:11 +01:00
Stephane Delcroix a9a68c6e60 [C] fix TargetNullValue Bindings (#3468)
Due to a flux in the matrix, Bindings with a TargetNullValue assigned
were always returning that value. It had the advantage of being right
sometimes, but the inconvenient for being wrong, most of the times.

By properly aligning the bits of the register with the sun at beer time,
we can avoid that side effect, and actually returns a value when the
binding is succesful, and the TargetNullValue whem the Binding returns
null.

- fixes #3467
2018-08-02 16:56:19 -07:00
Pavel Yakovlev 15fe14d88f [Core] Fixed setting CornerRadius of button to 5 (#3441)
* [Core] Fixed setting CornerRadius of button to 5

* correction of typos

- fixes #3390
2018-08-01 09:08:07 +02:00
Stephane Delcroix a2b836110b
[CSS] allow mapping css prop to multiple BPs (#3437)
To allow mapping a single CSS property to multiple controls, we so far
relied on extracting the BindableProperties to static helper classes,
and implementing an interface for accessors, and eventually change
handlers.

That extraction works well, and is actually a good pattern, as long as:
 - the extracted BPs share the same PropertyName,
 - default value, and
 - return type, obiously

As the CSS `color` property has to map to both `TextColor` and `Color`
BPs, the property extraction wasn't possible.

This change adds the capability to map a single CSS property to
multiples BPS, when extraction isn't possible. Whenever the extraction
to an interface is possible, that behavior is strongly encouraged.
2018-07-31 09:18:54 +02:00
Alan Grgic 97d2f30f6b [Enhancement] Allow underline and strikethrough text decorations on labels and spans (#2221)
* Fixes #1632

* Allow underline and strikethrought text decorations on labels and spans

* revert some files

* pr feedback adjustments

* remove docs

* rename interface

* reorder enum

* clean up whitespace

* adjust tizen renderer

* add gallery demo for setting both underline and strike

* allow multiple values of enum to be set in xaml/css

* use normal null check

* use nameof

* include paragraph style

* tab alignment

* rebase from upstream

* pass control to update method on UWP

* correct text decorations type converter

* reset run text instead of label text on UWP when spans are used

* add tests for text decoration converter
2018-07-20 17:57:11 -06:00
Rui Marinho 57994e7d8d Merge branch '3.1.0' 2018-06-28 17:07:59 +01:00
E.Z. Hart d2d1303394 [Android] Force animations to finish immediately when power save mode is on (#3148) fixes #1556
* Repro

* [Android] Force animations to finish immediately when power save mode is on; fixes #1556

* Add intial check for pre-Lollipop

* Return early if using a pre-Lollipop API version
2018-06-28 12:02:36 +01:00
Samantha Houts 4d5a1f5482 TitleView (#2586)
* Stop crashing when I accidentally click on the Perf gallery

* [Core] Add TitleView to NavigationPage

- also add unit tests
- fixes #1716

* [Android] Add ClearRenderer static method to Platform

* [Android] Use Platform.ClearRenderer

it's a straight extract from this class

* [Android] Implement TitleView and TitleIcon on AppCompat backend

using lessons (and some duplicated code) from ListView header/footer views.

* [iOS] Implement TitleView

* [UWP] Implement TitleIcon and TitleView

* [Core] Add NavigationPage.BarHeight

* [Android] Use BarHeight

* NavigationBarGallery updates

* [Core] Add iOS HideNavigationBarSeparator Platform Specific

* [iOS] Implement HideNavigationBarSeparator Platform Specific

* sample search page

* Convert BarHeight to Android platform specific

* Reset BarHeight when leaving the gallery

* Add a sample TitleView xaml page

* VisualElement >> View

* Fix comment

* Improved SearchTitle sample page

* [Core] Set TitleView Parent on Changing instead of Changed

Changing is too late for the iOS layout

* [iOS] Fix layouts in iOS10

* [iOS] Stop content clipping

* Expanded test page

* [iOS] Fix HideNavigationBarSeparator for iOS<11

* [iOS] Layout TitleView with margins

* More tweaks to test page

* [UWP] Fix OnDetailPropertyChanged if/else

* [UWP] Comment empty setters

* Convert commented code to more useful comment.

* Adjust performance test async call
2018-06-25 13:00:03 +01:00
Rui Marinho a8ec456ac0
Merge branch '3.1.0' 2018-06-16 01:00:51 +01:00
Stephane Delcroix d7780e7f3a [C] Allow change constraint before parenting (#3036) fixes #2169
Allow a constraint to be changed when the view is not parented yet.

- fixes #2169
2018-06-15 19:05:09 +01:00
E.Z. Hart aedf714f02 Fine-tune the performance of VisualStateGroupList.Validate (#3043) fixes #3033
* Fine-tune the performance of VisualStateGroupList.Validate; fixes #3033

* Update VisualStateManager.cs
2018-06-15 12:33:05 +01:00
Rui Marinho a6bbcfdd2c Merge branch '3.1.0' 2018-06-08 09:43:31 -07:00
Stephane Delcroix 11b1496db5 [Binding] FallbackValue and TargetNullValue (#2742) fixes #1803
- fixes #1803
2018-06-07 13:17:04 -07:00
Stephane Delcroix 454f4d37c2
[Flex] Make sure layout is invalidated on time (#2938)
When a BP changes, the BP value changes, the propertyChanged event is
fired, then the propertyChanged delegate is executed.

As the invalidation was done in the event, and setting the flexitem
property was done in the delegate, the invalidation, and relayout, was
executed with an out-of-date flexitem.

With this change, we invalidate the child size, and that'll bubble up to
invalidate the layout, as part of the property changed delegate

- fixes #2821
2018-06-05 12:59:11 -07:00
Philippe Leybaert 6d74745170 Support default value for value types in BindableProperty (#2827)
* Support default value for value types in BindableProperty when no explicit default is provided

* Add unit test for enum/struct BindableProperty default values
2018-05-29 15:59:31 +02:00
Sean Davies 67f87df3d4 SwipeGestureRecognizer (#2727)
* SwipeGesture

* Fix Build Error

* Remove unused var

* Update Xamarin.Forms.Controls.csproj

* Update Xamarin.Forms.ControlGallery.Android.csproj

* Update Xamarin.Forms.Maps.Android.csproj

* Update Xamarin.Forms.Core.UnitTests.csproj

* Update Xamarin.Forms.Platform.Android.AppLinks.csproj

* Update Xamarin.Forms.ControlGallery.Android.csproj

* Update Xamarin.Forms.Controls.csproj

* Update Xamarin.Forms.ControlGallery.Android.csproj

* Update GestureManager.cs
2018-05-28 11:49:05 +01:00
Rui Marinho c22b8b9e0f
Merge branch '3.1.0' 2018-05-15 16:16:52 +01:00
Rui Marinho 6beff058da
Merge branch '3.0.0' into 3.1.0 2018-05-15 16:11:30 +01:00
E.Z. Hart 7c30a6758b Call ChangeVisualState when new states are added (#2649) fixes #2625
* Call ChangeVisualState when new states are added so element is in correct
state when loaded from XAML; fixes #2625

* Fix build for UI test projects

* fix uitest build
2018-05-15 10:39:10 +01:00
Pavel Yakovlev bf8d70617c [Mac] Fixes getting the accelerator keys, if the key is equal to the separator (#2673)
- fixes #1639
2018-05-14 10:43:23 +02:00
Adam 500a8cda76 [All] Span GestureRecognizers (#2173)
* Bindable Text Property on Span

* Minor fix and cleanup

* Cleanup of code after review

* Android TapGestureRecognizer for Span

* iOS Span TapGestureRecognizer enabled

* Corrected Android issue with LineHeights

* UWP code cleanup for new Span properties

* WPF Span GestureRecognizers added

* Set Parent and reduce calls to Text property

* Add gesture recognizer to label if not present.

* Label Changed to handle Span and GestureRecognizer changes.
iOS updated to accomodate new CompositeGestureRecognizer

* Move Android to new Label structure

* Overridden Collection Clear events

* Refactoring code

* Refactor to extensions for span position calculations

* Further refactor and cleanup after rebase

* Fixed rebase issues

* Bug fixes, refactoring and performance improvements

* Moved to region and supported triggering overlapping regions, including inflation

* Inflation added

* Region inflate, and GestureElement

* Refactoring

* Refactoring of naming and loops

* Cleanup

* Removed command

* UWP tap span fix

* Detect child gesture recognizers in Android

* BackgroundColor support on span for WPF

* Remove trailing tabs

* Region UnitTests

* Refactor based on review

* Further code cleanup
2018-05-07 19:02:28 +01:00
Pavel Yakovlev 082e5ad671 [Core] Fixes replace action in `NotifyCollectionChangedEventArgsExtensions` class (#2603) fixes #2598 , fixes #2585 2018-05-07 17:53:08 +01:00
Stephane Delcroix 56ffbc49b1 Merge branch '3.1.0' 2018-05-07 10:03:31 +02:00
Stephane Delcroix 713ed70cf1 Merge branch '3.0.0' into 3.1.0 2018-05-07 10:02:58 +02:00
Stephane Delcroix 3f8c129297
[Flex] do not layout invisible children (#2594)
- fixes #2593
2018-05-04 20:46:52 +02:00
Rui Marinho fda8a08528 Merge branch '3.1.0' 2018-05-04 12:35:41 +01:00
Rui Marinho 4bb79f0cb0 Merge branch '3.0.0' into 3.1.0 2018-05-04 12:34:48 +01:00
Kent Boogaart b794caf7be Fix implicit conversion from null Uri to ImageSource (#1253)
- closes #1253
2018-05-03 20:52:46 +02:00
Stephane Delcroix 3c91a8cf7e
[C][flex] proper handling of grow in reverse (#2569)
- fixes #2551
2018-05-03 20:36:21 +02:00
Rui Marinho 9618f158bb Merge branch '3.0.0' 2018-04-16 11:40:10 +01:00
ShaneN 598d75063d added unit test 2018-04-09 15:45:19 -06:00
Stephane Delcroix e0d85bda5e Merge branch '3.0.0' 2018-03-19 09:22:58 +01:00
Stephane Delcroix 61ebcbf906 Merge branch '15-5' into 3.0.0 2018-03-19 09:20:40 +01: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
kicsiede a2fee1d21e
Update NavigationUnitTest.cs 2018-03-13 19:48:30 +00:00
Stephane Delcroix 1df63c27b9 Merge branch '3.0.0' 2018-03-12 09:14:30 +01:00
Stephane Delcroix d512229767 Merge branch '15-5' into 3.0.0 2018-03-12 09:13:54 +01:00
Stephane Delcroix 87e04c9f36 [C] Update Bindings with "BindingContext" in path (#2053)
* [C] Update Bindings with "BindingContext" in path

If the BindingContext is set using SetInheritedBindingContext, INPC
isn't fired, and bindings containing the "BindingContext" string in
the path ends up not being notified of the Change.

In addition to listening to PropertyChanged, this also hooks into
BindingContextChanged, and update the bindings accordingly.

 - fixes #2019

* back to last year
2018-03-09 10:36:15 -08:00
Stephane Delcroix 1741d7782c [C] do not return IsSet for BP with defaultVC (#2055)
BindableProperties with a defaultValueCreator are never in the default
(as defined by the defaultValue parameter) state. IsSet now reflects
that.

To allow styling properties with defaultVC, this adds a new flag in
BindableContextAttributes.
2018-03-08 15:53:29 -08: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
Jason Smith 90ca928180
Merge branch '3.0.0' 2018-03-06 11:54:19 -08:00
Daniel Cazzulino c3eec10c86 Add Application.PageAppearing/Dissapearing events (#1970)
In scenarios where you want to keep track of pages as they are
appearing on screen, it's useful to be able to subscribe to a
global event from the `Application` to track those pages for
later processing (i.e. showing a timeline for the app, reloading
XAML for some of those pages, maybe replaying the timeline, etc.)

The new events are automatically raised from the Page base class
right after sending the page-level Appearing/Disappearing events.
2018-03-05 14:06:41 -08:00
Stephane Delcroix 84d75a721c Merge branch '3.0.0' 2018-03-05 12:16:15 +01:00
Stephane Delcroix 89ffc1f32f
[flex] better margin support with Wrap (#1997) 2018-03-02 09:13:51 +01:00
E.Z. Hart 1030013834 Allow users to specify resolution method for handlers, effects, and services (#1870) fixes #1739
* Let user set delegate to resolve handlers, effects, and services; closes #1739

* Remove old comments

* Move dependency-resolution-specific code to a separate class;
Remove Reset method; simplify internal API;

* Update docs to reflect new changes

* Add type checks closer to resolution; rename ForceResolve; remove public delegate type;

* Update docs
2018-02-26 11:48:15 +00:00
Stephane Delcroix bfd3ad6491 [C] BO.IsSet() returns false after ClearValue() (#1828)
- fixes #1813
2018-02-16 10:22:10 +00:00