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

125 Коммитов

Автор SHA1 Сообщение Дата
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
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
Alan Grgic 8821301e7e [Android] PlatformSpecific for WebView mixed content (#1784)
* add android platform specific for webview mixed content flags

add unit tests and gallery pages

* code style adjustment

* retry update docs

* retry update docs

* Fix bad merge on TestAttributes enum
2018-02-15 15:49:22 -08:00
Francesco Bonacci 58d56d02c8 Add ProgressColor on ProgressBar (#1861) 2018-02-15 12:10:40 +00:00
E.Z. Hart a248ee5fb3 Check IsEnabled on TextCell before executing command (#1889) 2018-02-15 11:05:06 +00:00
Stephane Delcroix b96f65bdd9 Merge branch '15-5' 2018-02-12 09:34:33 +01: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
Samantha Houts 2fba186574 [Android] Button Border can be set independent of other properties and will not change the size of the Button. fixes #1436 **behavior change** (#1570)
* Revert "Revert "Fix border on android buttons  (#941)""

This reverts commit a4c7f31d1215174aa86d7647bcbce0dd5e719a9a.

* Add repro for 1436

Fix typo

* [Core] Use 2dp for Android default Button BorderRadius

* [Android] Add shadow & padding to ButtonDrawable

* [Android] Set BackgroundDrawable on Button when BorderWidth, BorderRadius, and BorderColor are changed

Also add RippleDrawable when supported for the nice ripple effect on press, and set the PaddingTop for the ButtonDrawable. fixes #1436

* [Android] Default Color for Button is specified for AppCompat and AppAct

* [Android] Check BorderRadius value against proper default

* Fix test case number

* grumble grumble this branch is still vs2015 grumble

* [Android] Get button color from resources

* [Core] Obsolete Button.BorderRadius in favor of CornerRadius

* [Core] Added VisualElement.DefaultBackgroundColor

* Update tests to ignore obsolete prop warning

* [Android] Use Button.CornerRadius instead of BorderRadius

* [iOS] Use Button.CornerRadius instead of BorderRadius

* [macOS] Use Button.CornerRadius instead of BorderRadius

* [UWP] Use Button.CornerRadius instead of BorderRadius

* Update docs

* Fix more cases of BorderRadius obsolete warnings

* [UWP] Use BP.DefaultValue instead of abstracted const

* [Android] Use BP.DefaultValue instead of abstracted const

* [Core] Remove unnecessary abstracted consts from Button

* [Android] Fix default corner radius on ButtonDrawable

* Unit tests for Button.CornerRadius/BorderRadius

* [iOS] Restore default Button.CornerRadius

* [UWP] Add todo
2018-02-08 17:55:08 +00:00
Shane Neuville 7e387eb778 [Core] AbsoluteLayout content now fills all available space on Android devices (#1761)
* Removed rounding in AbsoluteLayout to ensure Android devices with certain sizes can still use proportional sizes to fill the device screen.

* doc updates
2018-02-07 14:24:47 -05:00
Stephane Delcroix f9b0b4ee29
[C/XamlC] BindingMode.OneTime (#1805)
* [C/XamlC] BindingMode.OneTime

Bindings with mode == OneTime:
 - are only applied when the BindingContext changes
 - do not subscribe to INPC

if the Binding is compiled and the mode explicitely set in the
`{Binding}` Markup extension, the setters and handlers aren't even
created.

 - fixes #1686

* update docs
2018-02-07 09:43:15 +01:00
Stephane Delcroix 825886eef4 [C] FlexLayout, with managed engine (#1759)
* [C] FlexLayout, with managed engine

* [C] add type converter and attributes for CSS

* [C] fix flex-order

* [C] fix typo and margin in Flex

* [Flex] relative value for Basis, padding on the layout

* fix docs

* [Flex] fix NRE on empty layout

* [flex] fix layout measuring
2018-02-06 10:54:33 +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
Stephane Delcroix 1133771bdf
[CSS] only cascade inheritable properties (#1767)
- fixes #1766
2018-02-01 12:51:46 +01:00
Stephane Delcroix ae18666599 Merge branch '15-5' 2018-01-31 10:27:51 +01:00
Samantha Houts bd5db90850 [Core] Add IsSet to BindableObject (#1741)
* [Core] Add IsDefault and IsSet to BindableObject

* Add tests for IsSet and IsDefault

* Update docs

* Remove redundant null arg check

* Remove IsDefault

* [docs] removing `IsDefault` from docs

 - fixes #1652
2018-01-31 10:20:20 +01:00
Samantha Houts 18df40b346 Revert "Add tests for IsSet and IsDefault"
This reverts commit dc69bd3186.
2018-01-29 19:28:08 -08:00
Samantha Houts dc69bd3186 Add tests for IsSet and IsDefault 2018-01-29 19:26:17 -08:00
Stephane Delcroix 5a7cdb081e
[C] Cascade StyleSheets defined at Application level (#1590)
fixes #1553
2018-01-17 09:13:13 +01:00
workgroupengineering f8566492da [Core] Fixed invocation of the IButtonController methods when IsEnabled is false (#1410)
* Fixed invocation of the IButtonController methods when IsEnabled is false

* Fixed Testes
2018-01-05 16:25:41 +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
Morten Nielsen 294e99eef8 Add implicit color conversion to .NET Standard's System.Drawing.Color (#1359)
* Add implicit color conversion to .NET Standard's System.Drawing.Color

This change simplifies working with colors in a .NET Standard way by adding implicit conversion between the two color types:
```
Xamarin.Forms.Color c1 = Xamarin.Forms.Color.FromRgba(1, 1, 1, 1);
System.Drawing.Color c2 = c1;
Xamarin.Forms.Color c3 = c2;
if (c2 == c1)
{
   // Colors are equal
}
```

* Fixed order of color components

* Added Implicit Color conversion unit tests (this includes referencing System.Drawing to access the System.Drawing.Color type)

* Added conversion between Xamarin.Forms.Color.Default System.Drawing.Color.Empty
2017-12-21 10:02:54 +01: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
Stephane Delcroix 2a177eca47
[C] bind to ValueTuples (#1317)
* [C] bind to ValueTuples

* [C] allow indexing on ValueTuples
2017-12-11 22:32:46 +01: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
E.Z. Hart 3a44508960
Update to use full test from PR 1292 2017-11-27 19:44:34 -07:00
E.Z. Hart 05741eb2b2
[Tests] make sure the test pass even if the locale is wrongly implemented on the platform (#1292) 2017-11-27 17:48:42 -07: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
Stephane Delcroix 4c8f901e23
Lazy creation of ResourceDictionaries (#1295)
* [C,Xaml] allow implicit ResourceDictionaries

* [XamlC] implicit ResourceDictionaries

* [C] lazy Resources creation

* fix stupid docs

* [C] no need to trigger events on initial get
2017-11-22 12:59:55 +01:00
Stephane Delcroix 0714a189e5
[C] do not reapply a Binding with a Source when the Context changes (#983)
* [C] do not reapply a Binding with a Source when the Context changes

* apply the same to typedBindings

* [C] Use a flag to Apply()

* [C] Remove 2 other unnecessary Binding refreshs
2017-11-21 13:59:41 +01:00
Stephane Delcroix 58de692dc6
[Tests] make sure the test pass even if the locale is wrongly implemented on the platform (#1292) 2017-11-20 09:46:50 +01: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
Stephane Delcroix c0e89187bb [Test] Make sure we always test with different Cultures (#1219)
also get rid of the 'Turkey' build configuration
2017-10-24 10:41:33 +02:00
Rui Marinho 9f24a41c2d [Core,MacOS]Desktop support (#1126)
* [Controls] Improve sample for MacOS control gallery, add a storyboard for the menu

* [Core] Add QuitApp to platform services

* [Core] Add ClickedGestureREcognizer

* [MacOS] Implement ClickGestureRecognizer

* [Core] Add MainMenu

* [MacOS] Implement Main top menu

* [Controls] Add desktop support test page

* [MacOS] Update menu items if they change

* [MacOS] Refactor to make it build for iOS

* [Core] Add Menu attached property to Element

* [MacOS] Implement MacOS context menu

* [Core] Fix type of ADP

* [Core] Add Accelerators to MenuItem

* [ControlGallery] Add example for Accelerator MenuItems

* [Core,iOS] Update ClickedEventArgs to ButtonMask enum  

* [Docs] Update docs

* [Core]Fix build error

* [WP8] Implement QuitApp

* [WP8] Log warning instead of throw

* [Tests]  Add unit tests for menu and menuitem

* [Docs]Update docs

* Update build submodule

* [Core,MacOS,Docs] Use Attached Property for MainMenu

* [Core] Update ButtonsMask, reduce calls to GetValue getting parameter

* [All] Use Accelerator class

* [Core] Add tests for accelerator

* [All] Move QuitApp to QuitApplication

* [Core, Tests] Add more tests for Accelerator

* [Core]Parse win modifier also

* [UnitTests] Fix TestCaseSource

* [MacOS,Core] Fix typo on Modifiers

* [MacOS] Fix typo

* [WinRT] Fix build

* [Docs] Update docs
2017-10-02 18:19:26 +01:00
Frank A. Krueger e8660383b0 [All] Use IReflectableType when accessing the Registrar (#1006)
* [Core] Add GetHandlerForObject and GetHandlerTypeForObject to Registrar

These new methods first try to use IReflectableType in order to support
dynamic objects. If that fails, GetType is used.

* [Platforms] Switch to query the Registrar using GetHandlerForObject

This enables dynamic objects to be used as renderers and other
points of extensibility.

* Take into account dynamic type info when comparing cell renderers

* Fix null renderer object type

* Update Registrar`1.xml

* Update Registrar`1.xml
2017-09-28 16:35:28 +02:00
Stephane Delcroix 7d90f145b7 [C] MergedRD: new tests and minor fixes 2017-09-22 13:27:47 +02:00
Adam Pedley 2b7913adda Merged Dictionaries 2017-09-22 13:27:47 +02:00
Stephane Delcroix ce4e0239fa [C] Use ReferenceEquals to compare BindingContext (#1150) 2017-09-21 10:45:49 -07:00
kingces95 d4480b2e48 Add iOS prototypical cell cache for LV RowHeight calcs (#1143) 2017-09-16 15:10:04 +01:00
Kangho 171fa0faec Remove InternalsVisibleTo from Maps (#1019) 2017-07-24 16:23:14 -04:00
Rui Marinho 50b051cf89 [Tests] Add nunit test adapter (#1038)
* [Tests] Add nunit test adapter

* [Tests] Add nunit vs adapter to Xaml and Pages unit tests project

* [Tests] See if this works for TestSource

* [vsts] Add ignore for now on generic tests
2017-07-06 23:29:03 +01:00