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

156 Коммитов

Автор SHA1 Сообщение Дата
Rui Marinho 38711f35d0
Merge branch '3.6.0' into 4.0.0 2019-05-22 16:23:05 +01:00
Rui Marinho 9bc0fc6b0a
[Build] Update builds, remove submodule, update AssemblyInfo with GitInfo (#6068)
* [Build] Remove submodule

* [Build] Use GitInfo to set Assembly metadata

* [Build] Remove extra prop

* [Build] Update version

* [Build] Update versions to be consistent with existing Build.Tasks

* [Build] Update build number

* [Build] make sure build tasks gets info

* [Build] Add assembly info unit test

* [Test] Refactor test for gitinfo on vsts
2019-05-22 01:06:59 +01:00
Tim Barham 53979c8297
XamlLoader should not ignore x:TypeArguments on root node (#5804) 2019-04-05 15:31:28 +10:00
E.Z. Hart f1297f93d5 Re-enable "Treat warnings as errors" (#5602)
* Enable "treat warnings as errors"

* Remove unnecessary for loop

* Remove properties which already exist in base class

* Make property hiding explicit and obsolete hiding property

* Move Treat Warnings as Errors setting to props file

* Fix weird quotation changes in Xamarin.Forms.Build.Tasks.csproj

* Scrub empty WarningsAsErrors tags

* Remove unused variable

* Fix TearDown method hiding in UI tests

* Fix Id member hiding in test for Bugzilla32871

* Fix RootPage member hiding in Bugzilla51503

* Fix RooPage member hiding in Issue1483

* Disable warnings for deprecated OpenGL calls

* Fix member hiding in test view models

* Fix RootPage member hiding in Issue1931

* Fix Id member hiding in Bugzilla42620

* Fix AutomationId member hiding in Bugzilla57114

* Fix Layout member hiding in Bugzilla40911

* Remove unused variables from Bugzilla31114

* Remove unused variable

* Fix various unused variable warnings

* Disable warning to leave example code for reference

* Fix unused variable from macOS test

* Remove unused members

* Fix unused variable warnings

* Fixed unused property warnings

* Fix warnings for unused code

* Disable 'await' warning

* Remove unused variable

* Adding pragma directives for await warnings

* Remove member hiding

* Turn off global "Treat warnings as errors" in other platforms

* Use MarkerId instead of obsolete Id member

* Fix await warnings in WPF GeocoderBackend

* Add missing await

* Disable warning for unused event
2019-03-27 18:38:38 +00:00
Stephane Delcroix 3461ded959 [X] resilient to random text content (#5557)
- fixes https://devdiv.visualstudio.com/DefaultCollection/DevDiv/_workitems/edit/817588
2019-03-18 15:45:15 -07:00
Stephane Delcroix 5d45f74d29 [X] Allow empty property xaml-elements (#5550)
- fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/817710?src=WorkItemMention&src-action=artifact_link
- reverts #4582
2019-03-18 14:58:36 -07:00
Stephane Delcroix d106e21d5b [X] recover from memberaccessEx
- fixes #5589
2019-03-18 11:25:47 +01:00
Stephane Delcroix 5c07fa9b43 [X] resilient to unyped x:Name (#5552)
Allow the previewer to recover from an x:Name attribute on a element
with unresolved type.

- fixes #5546
- closes #5547
2019-03-14 17:42:54 -07:00
Stephane Delcroix 263c9a9d6a
[X] resilience on markup (#5532)
let the previewer intercepts and recover from misformatted markups

- fixes #5508
- closes #5527
2019-03-14 09:21:19 +01:00
Stephane Delcroix 9af95f0399
[X] recover from missing markup type (#5485)
- fixes #5484
2019-03-11 14:38:34 +01:00
Samantha Houts d8f0c308a7
Reverts "[Xaml] require escaping curly braces (#4723)" and "[X] only require escaping if starts with '{' (#5169)" (#5424)
* Revert "[X] only require escaping if starts with '{' (#5169)"

This reverts commit cd73391c3a.

* Revert "[Xaml] require escaping curly braces (#4723)"

This reverts commit 6753ace40e.

* Make sure parsing doesn't fail when there *are* curly braces now
2019-03-01 09:59:21 -08:00
Stephane Delcroix 4b17e2534a [X] bubble markup exception to previewer (#5411)
- fixes #5407
2019-02-28 16:17:13 -08:00
Stephane Delcroix 26cfbed81f [X] allow previewer fallback on rootnode (#5413)
* [X] allow previewer fallback on rootnode

- fixes #5410

* additional test case
2019-02-28 11:43:15 -08:00
Stephane Delcroix c3ac500a16 [X] more conv exception, bubble to previewer (#5400)
Catch more exception cases, make sure the previewer can recover from them

- fixes #5397
2019-02-27 17:58:58 -08:00
Stephane Delcroix af99e177d7
[previewer] resilience on createvalue (#5369)
- fixes #5171
2019-02-26 20:09:16 +01:00
Stephane Delcroix 15c6f561e6 Merge branch '3.5.0' into 3.6.0 2019-02-11 09:15:42 +01:00
Stephane Delcroix cd73391c3a
[X] only require escaping if starts with '{' (#5169)
- fixes #5152
2019-02-08 20:32:35 +01:00
Stephane Delcroix d018c154a7
[previewer] more info to the callback (#5155) 2019-02-07 21:39:38 +01:00
Stephane Delcroix b3aabc7422
[Previewer] Fallback for factorymethod not found (#5139)
- fixes #5138
2019-02-07 17:30:41 +01:00
Stephane Delcroix d126219219
[Xaml] don't use context before checking it's not null (#5124) 2019-02-05 09:12:25 +01:00
Stephane Delcroix bcd8a12672
[Xaml] Better handling of exception on properties (#5099)
Allow the previewer to recover and continue on throwing property setters
or BindableProperties.
2019-02-04 15:45:49 +01:00
Stephane Delcroix bc3c9ef4ea
Allow the previewer to use design flag on RDs (#5096) 2019-02-04 09:42:30 +01:00
Stephane Delcroix c71149c89b
[X] add callback for previewer on failing ctor (#5101)
Add a callback when object instantiation or creation fails, so the
previewer can replace it by an educated guess
2019-02-04 09:41:17 +01:00
Stephane Delcroix 7cc9a282bd Merge branch '3.5.0' 2019-01-14 09:32:43 +01:00
Stephane Delcroix 6d20db1a3c
hide obsolete API from editor (#4938)
- fixes #4772
2019-01-10 12:53:48 +01:00
Stephane Delcroix 57d507ef0b Merge branch '3.5.0' 2019-01-07 11:32:11 +01:00
Stephane Delcroix a206fa0f1f
[X] Design time properties (#4743)
An alternate xaml resource file provider can request the XamlLoader to
_not_ ignore normally ignored properties in prebuilt XF design xmlns, as
in the following snippet:

```xaml
<ContentPage
    xmlns="http://xamarin.com/schemas/2014/forms""
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml""
    xmlns:d="http://xamarin.com/schemas/2014/forms/design""
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006""
    mc:Ignorable="d"">
  <Label d:Text="Bar" Text="Foo" x:Name="label" />
</ContentPage>
```

The `d:` should be the prefix used by default for this, but any other
prefix will do too.

The `d:Text` property maps to the exact same property as `Text`, as the
XmllnsDefinitionAttributes are identical (that's convenient from a Intelisense
point of view), but, when (and only when) instructed by a provided Xaml resource
loader, the `d:Text` will override the `Text` property.

This works with virtually all properties defined on built-in Xamarin.Forms
controls, but it doesn't mean it's a sane idea to try to assign design value
to all existing properties.

The APi ofr setting the ResourceLoader had to change, and instead of taking
pre-defined arguments, it accepts and returns query and response types. This
is slightly less convenient to invoke through reflection, but way more easy
to extend in the future.
2018-12-20 13:16:40 +01:00
Stephane Delcroix 6753ace40e
[Xaml] require escaping curly braces (#4723)
This is a breaking change as we weren't throwing errors on that before.

- fixes #2756
2018-12-19 16:14:21 +01:00
Stephane Delcroix 28a016d547 [X] throw XPE on missing element .ctor (#4786)
* [X] throw XPE on missing element .ctor

In case of runtime parse, wrap the MissingMethodException in a
XamlParseException, to get lineInfo. In case of XamlC, detect missing
constructor and fail early.

- fixes #4751

* fix for ns1.0
2018-12-18 16:54:45 -07:00
Stephane Delcroix 5193cb88b1
[Xaml] throw on unexpected empty elements (#4582)
new exception being thrown:
>Xamarin.Forms.Xaml.XamlParseException : Position 7:4. Unexpected empty element '<Grid.ColumnDefinitions/>'

also reduce the number of places we resolve lineInfo for exceptions
purposes

- fixes #4553
2018-12-12 16:50:30 +01:00
Stephane Delcroix 1580e25d48
[XamlC] Compile the {DataTemplate} markup (#4641)
* [XamlC] Compile the {DataTemplate} markup

- fixes #4592

* [C] throw XPE on missing mandatory member

TypeName for {Type} and {DataTemplate} markup extensions is mandatory.
Throw a XamlParseException, with context, when that happens.

* fix style

* (ab)use of nameof
2018-12-08 09:53:07 +01:00
Stephane Delcroix 78385f9fc1 [Shell] The glorious Shell (#4522)
* [Shell] The glorious Shell

* set the flag for the test

* remove the FastRenderer flag

* [Android] If we were disposed earlier Element can be null and Control was disposed

* [Controls] Seems part of #2520 was solved so we don't need this

* [iOS] Fix NRE on the ScrollviewTracker

* add missing constructor for RenderWith

* [Core] propagate visual/flow through shell

* use interlock increment

* hide IDataTemplateController

* [Android] Fix TableViewModelRenderer dispose

* [Core] propagate visual/flow direction through shell hierarchy

* [Android-Gallery] removed some left in settings changes that effect UI Tests

* [iOS,Droid,Core] Code formatting

* [iOS,Core] Last minute style refactoring
2018-11-29 20:22:51 -08:00
Stephane Delcroix ec89923caa removing a helper introduced in #2782 2018-11-29 16:21:29 +01:00
Peter Moore 1cef4471ce GH2691: Make XmlnsDefinitionAttribute public (#2782)
* Make XmlnsDefinitionAttribute public. Change XamlC, XamlG, and XamlParser to search for all referenced/available assemblies for attribute and referenced types. Add XAML unit tests and control gallery entry.

* change ns for xmlnsdefattribute

- fixes #2691
2018-11-29 14:58:34 +01:00
Akihiko Odaki e7bf945978 [Xaml] Add provided value to collection (#4456) 2018-11-23 10:00:46 +01:00
Stephane Delcroix d0456e2d6e
[Xaml] OnIdiomMarkupExt uses converters on BPs (#4500)
Up to now, OnPlatform and OnIdiom markup extensions were checking for
type converters on
- target type
- the property being set

in case of a bindable property, the converter on the BP getter or
GetBP() static method (for attached BPs) wasn't checked.

This PR adds the check for that, plus a unit test.

- fixes #4319
2018-11-22 10:05:21 +01:00
Stephane Delcroix 07b697c84d Merge branch '3.4.0' 2018-11-09 12:53:09 +01:00
Stephane Delcroix f3c5405033
Resilient xaml (#4096)
* [Xaml] un-obsolete XamlLoader.Create

now that we plan to load Xaml files without compiling the ctor, keeping
XamlLoader.Create makes sense.

* [Xaml] add FallbackTypeResolver

* Additional tests

* More tests

* Further tests

* [Xaml] provide an mock App

* [C] allow re-registering implicit styles

* Some tweaks and reinstated test with missing resource key

* Add StyleAppliedToDerivedTypesAppliesToDerivedUnknownType test

* Renamed some stuff for consistency. Added some CSS tests.

* Remove use of ValueTuple

* Temporarily disable failing tests

* redirect valueprovider exceptions to the handler, allow the handler to intercept excpetion with Create()

* fix the CSS situation

* new callback, works for CSS
2018-11-09 10:03:17 +01:00
Andoni Morales Alastruey 14c2974965 [Xaml] Support correctly custom resource providers (#4236) 2018-11-07 15:07:18 +01:00
Stephane Delcroix ce181dc14d
[Xaml] fix Namescope being different than tree (#4089)
As part of #2556, the namescoping tree was assumed to be equiv to the
object tree, which is obviously wrong. This fixes it, while keeping the
old behavior as a fallback.

We might go further, but I can't come up with a reasonable scenario
failing.

- fixes #3821
2018-10-16 17:10:04 +02:00
Stephane Delcroix e2a578e845
[Xaml] Allow OnPlat markup in Styles (#3995)
- fixes #3862
2018-10-16 09:25:17 +02:00
Stephane Delcroix 391eb7c9bf [Xaml[C]] resolve Extensions first (#3977)
XamlLoader should first look for type with the Extension suffix. It used
to be the case, but somehow regressed.

- fixes https://github.com/xamarin/Xamarin.Forms/issues/3606#issuecomment-422377338
2018-10-08 18:59:53 -07:00
Stephane Delcroix f072f0ce47 [C] catch AmbiguousMatchException on GetProps (#3915)
- fixes #3870
2018-09-28 13:25:32 -07:00
Stephane Delcroix 4facc9b193 Revert "For consistency with ResourceDictionary, expose the Source for a StyleSheet (#2589)"
This reverts commit f66a72de5b.
2018-08-17 20:53:59 +02:00
Daniel Cazzulino f66a72de5b For consistency with ResourceDictionary, expose the Source for a StyleSheet (#2589)
This would allow previewer/designer/reloader to determine the source of a
stylesheet and refresh its content when appropriate.
2018-08-17 15:43:04 +01:00
Stephane Delcroix c79c77dbdf [build] Version and strongname the Build.Tasks (#3118) 2018-06-28 12:04:16 +01:00
Jim Bennett 5785fcb29d [Core] Add support for internal bindable properties for F# (#3069)
* Allowing internal BindableProperty fields for F# support

* Fixing tests

* Adding requested changes

- fixes #2425
2018-06-18 14:21:49 +02:00
Stephane Delcroix 11b1496db5 [Binding] FallbackValue and TargetNullValue (#2742) fixes #1803
- fixes #1803
2018-06-07 13:17:04 -07:00
Samantha Houts 14af670f5a Merge branch '3.1.0' 2018-05-23 11:27:58 -07:00
Samantha Houts a6a3b25ade Merge branch '3.0.0' into 3.1.0 2018-05-23 11:26:13 -07:00