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

170 Коммитов

Автор SHA1 Сообщение Дата
Tim Barham 083b4ea122 Set ExceptionHandler on HydrationContext in ApplyPropertiesVisitor.SetTemplate() (#6573) 2019-06-19 10:31:30 +02:00
Tim Barham 7b21069fad Resolve fallback type before trying to make constructed generic type (#6511)
* Resolve fallback type before trying to make constructed generic type

The FallbackTypeResolver hander in the Forms previewer does not have access to the x:TypeArguments attribute, so if it constructs a proxy generic type from metadata it can't construct it. So the previewer has to create an unconstructed generic type, and Forms will need to construct it.

So we need to move the code that constructs the generic type after the call to FallbackTypeResolver.

(cherry picked from commit 5acfea4f457453856a8905002f4d35c8e9aad106)

* Fix error building DesignTimeLoaderTests in 4.1
2019-06-13 20:21:55 +02:00
Stephane Delcroix c08e49c79d readd IVT 2019-06-05 21:22:14 +02:00
Stephane Delcroix 70bf803eb1
handle implicit resources (#6416) 2019-06-05 15:23:04 +02:00
Akihiko Odaki ca409d3d14 [Xaml[C]] Allow to connect to event handler with overloads (#5118)
* [Xaml] Allow to connect to event handler with overloads

* [XamlC] Allow to connect to event handler with overloads
2019-06-04 13:45:18 +02:00
Rui Marinho f8fd2811dc
Merge branch '4.0.0' 2019-05-22 22:32:28 +01:00
Rui Marinho 38711f35d0
Merge branch '3.6.0' into 4.0.0 2019-05-22 16:23:05 +01:00
Stephane Delcroix 48885e0331
Load resources (#6243)
* internal method to only reload RDs

* fix test
2019-05-22 14:02:45 +02: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
Stephane Delcroix b08de7f487 IVT HotReload 2019-05-06 11:25:58 +02:00
Stephane Delcroix 42b61a8722
report file location on error (#6024) 2019-05-03 20:29:08 +02:00
Akihiko Odaki 92ee64e2f6 [Xaml[C]] Allow to connect to static event handler (#5119) 2019-05-03 20:25:03 +02:00
Stephane Delcroix 48f48371db
[X] pass the instance along the rlq (#6007)
allow resourceprovider to track lifecycle of xaml-generated object
2019-05-02 17:51:12 +02:00
ShaneN 5475846880 merge 4.0.0 into master 2019-04-08 13:17:37 -06:00
Tim Barham 53979c8297
XamlLoader should not ignore x:TypeArguments on root node (#5804) 2019-04-05 15:31:28 +10:00
Samantha Houts 723f2de439 Merge branch '4.0.0' 2019-03-27 17:14:57 -07: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
Akihiko Odaki 422c4419f3 [Xaml] Throw XamlParseException when a duplicate property is detected (#5558) 2019-03-26 15:49:05 +01: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