Skip to content

Fix GridLayout System.TypeLoadException on Windows for CommunityToolkit.Maui.Sample#302

Merged
TheCodeTraveler merged 1 commit intomainfrom
Fix-Windows-GridLayout-Exception
Feb 17, 2022
Merged

Fix GridLayout System.TypeLoadException on Windows for CommunityToolkit.Maui.Sample#302
TheCodeTraveler merged 1 commit intomainfrom
Fix-Windows-GridLayout-Exception

Conversation

@TheCodeTraveler
Copy link
Copy Markdown
Collaborator

Description of Change

This PR fixes the System.TypeLoadException for GridLayout causing the Gallery Pages to appear blank on the Windows Sample App:

System.TypeLoadException: 'Could not load type 'Microsoft.Maui.Controls.GridLayout' from assembly 'Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null

Additional information

The error was caused by an old version of CommunityToolkit.Maui.Markup. Updating to CommunityToolkit.Maui.Markup-pre7 resolves the issue.

@TheCodeTraveler TheCodeTraveler requested review from VladislavAntonyuk and pictos and removed request for VladislavAntonyuk February 17, 2022 17:59
@TheCodeTraveler TheCodeTraveler enabled auto-merge (squash) February 17, 2022 18:01
@TheCodeTraveler TheCodeTraveler merged commit 20dde98 into main Feb 17, 2022
@delete-merged-branch delete-merged-branch bot deleted the Fix-Windows-GridLayout-Exception branch February 17, 2022 18:12
pictos pushed a commit that referenced this pull request Feb 18, 2022
* Alphabetize FlyoutItems

* Reorganize Folder Architecture, Create ViewsGallery, Use AppShell

* Fix Build Errors

* Fix Build Errors

* Update CommunityToolkit.Maui.Sample.csproj (#302)

* Update Shell + DI

* Add Popups to `MultiplePopupPage`

* Finish `MultiplePopupPage`

* Update MultiplePopupPage.xaml.cs
marsscotia pushed a commit to marsscotia/Maui that referenced this pull request Feb 21, 2022
TheCodeTraveler added a commit that referenced this pull request Mar 14, 2022
* android and ios popup implementation

* bring renderer

* Moved Handlers to Core project

* updated Windows supported version

* Added Handlers, native popup and Extensions to Core project

* Added workaround classes until p12

* Added NavigationExtensions and Popup implementation

* Added workaround until p12

* Updated Core to p12

* p12 update

* returned with the WrapperControl

* Handler work

* initial spike on PlatformSpecificConfiguration and Handlers

* Fixed popupColor on iOS

* more iOS love

* Changed the method call to be one from internal MAUI

* IsLightDismissEnabled is now bindable

* IsLightDismissEnabled is now a Bindable Property

* Ported all sample pages from XCT to MCT

* hold for rebase

* Added popup samples

* adjusted to workaround a maui bug

* changed the obsolete API to a supported one

* Fixed windows popup version

* code style

* Added xml docs and code improvements

* More xml docs and code clean up

* Fixed sample

* Fixed border and size calculation on Windows

* more native work

* samples!

* fixed editor config

* Update src/CommunityToolkit.Maui.Core/Platform/Android/PopupExtensions.android.cs

Co-authored-by: Vladislav Antonyuk <33021114+VladislavAntonyuk@users.noreply.github.com>

* Update src/CommunityToolkit.Maui.Core/Platform/Windows/MCTPopup.windows.cs

Co-authored-by: Vladislav Antonyuk <33021114+VladislavAntonyuk@users.noreply.github.com>

* Update src/CommunityToolkit.Maui.Core/Platform/Windows/PopupExtensions.windows.cs

Co-authored-by: Vladislav Antonyuk <33021114+VladislavAntonyuk@users.noreply.github.com>

* Update src/CommunityToolkit.Maui/Extensions/Navigation/NavigationExtensions.netstandard.cs

Co-authored-by: Vladislav Antonyuk <33021114+VladislavAntonyuk@users.noreply.github.com>

* Update src/CommunityToolkit.Maui/Extensions/Navigation/NavigationExtensions.netstandard.cs

Co-authored-by: Vladislav Antonyuk <33021114+VladislavAntonyuk@users.noreply.github.com>

* moved files and updated to p13

* Changed prop implementation on PopupSize

* bump windows version to match .NET MAUI template

* Replace all Xamarin references to MAUI
RIP Xamarin (◡︵◡)

* Code review

* removed the "native" word

* fixed wrong tag

* fixed ViewController set

* removed using

* make the navigation on Windows better

* Remove `netstandard`

* Fix `UniformItemsLayoutTests ` namespace

* Update PopupViewHandler.shared.cs

* Update PopupViewHandler.shared.cs

* Implement Shell and Dependency Injection for Popup Sample App (#303)

* Alphabetize FlyoutItems

* Reorganize Folder Architecture, Create ViewsGallery, Use AppShell

* Fix Build Errors

* Fix Build Errors

* Update CommunityToolkit.Maui.Sample.csproj (#302)

* Update Shell + DI

* Add Popups to `MultiplePopupPage`

* Finish `MultiplePopupPage`

* Update MultiplePopupPage.xaml.cs

* Update `AppShell.xaml` for MacCatalyst

* Update `Microsoft.NET.Test.Sdk ` NuGet Package

* Rename to `PopupExtensions.*.cs`

* Update Code Organization

* Update Code Organization

* Create PopupTests.cs

* Rename `MCTPopup` to `MauiPopup`

This aligns with the .NET MAUI naming convention, e.g. `MauiLabel`

* Add `MacCatalyst` Values

* Added workaround for Windows measurement

* improved comment

* Update `Title`

* Center the red frame

* Use `ButtonPopup`

* Added a test as sample

* Fixed namespace and added xml docs

* Updated to use Page instead of INavigation

* Fixed measurement on Android

* Popup tests to make Brandon Happy  ƪ(ړײ)‎ƪ​​

* Update Exceptions

* Add `ShowPopupAsync`, `dotnet format`

* Removed MainPage reference from MauiPopup.macios

* Moved Maui.Controls reference to CommunityToolkit.Maui project

* code fix style

* Renamed BasePopup -> Popup

The control isn't abstract anymore

* deleted old Popup file

* measurement is hard  (ノ ゜Д゜)ノ ︵ ┻━┻

* Fix `CsharpBindingPopup`

* add `static`

* Move `WrapperControl` to `CommunityToolkit.Core.Views`

* Add Nullable Static Analyzers, Remove Null Forgiving Operator, Remove unused parameters

* Remove unneeded Null Propagating Operator

* `dotnet format`

* Remove unneeded Null Propagating Operators, Remove Unused Code

* Remove Unused Code

* Fix Null Crash

* Rename HandlerImpl to HandlerImplementation

* Move `PopupExtensions` to `Views/Popup`

* Rename `BasePopup`  to `Popup`

* Fix Typo

* Update PopupExtensions.shared.cs

* Update PopupExtensions.windows.cs

* Reorder methods, Set default Color from `null` to `Colors.Transparant`

* Update Namespaces

* Update MauiPopup.windows.cs

* Update src/CommunityToolkit.Maui.Core/Handlers/Popup/PopupViewHandler.macios.cs

Co-authored-by: Brandon Minnick <13558917+brminnick@users.noreply.github.com>

* Add missing `;`

* Fixed popup issue for MacCatalyst

* Improved the measurement calculation

* Fixed samples

* Added netstandard rules on csproj

* moved non-platform code to a new file

* code style

* Update `ReturnResultPopup` Sample

* Moved wrapper control to CommunityToolkit.Maui project

* Removed WeakEventManager code

* Windows work to support the Wrapper change

* Fixed popup crash

* Remove `*.netstandard.cs` file suffix

The .NET MAUI Community Toolkit doesn't support .NET Standard; only .NET 6.0+ is supported.

We will defer this to the Discussion #301:
#301

* Remove Unused `MainGalleryViewModel`

* Remove Duplicate `PopupAnchorViewModel` + `PopupPositionViewModel`, Consolidate Under `Add Views View Models`

* Update `Add Extensions` Comment

* Update `MauiPopup` Naming

* Rename `BasePopup` to `Popup`

* Convert `public class MockApplication` to `class MockApplication` to match `ApplicationHandlerStub`

* Remove `netstandard`

* Us DI to Inject `CsharpBindingPopupViewModel`

* Update XML Comments for `LightDismiss`

* Rename to `IPopup.OnLightDismissed()` to match `IPopup.OnClosed()` and `IPopup.OnOpened()`

Since this is the method that runs _after_ a Light Dismiss has been triggered, it should use the `On*` naming and use the past-tense of `*Dismissed` to demonstrate that it is a reaction to an event that happened in the past

* Rename to `WasLightDismissed` to denote that the action has already happened by using the past-tense

* Fix OnLightDismissed for Windows

* Fix `CommunityToolkit.Core` namespace -> `CommunityToolkit.Maui.Core`

* Removed border and fixed double event subscription

* added xmlns namespace for Views namespace

* Changed the default color

* Added layouts to xml schema

* Consolidate Fields + Properties together

* Consolidate Fields + Properties Together

* Rename `PopupViewHandler` to `PopupHandler`

* Replace Light Dismiss Nomenclature (#324)

* Update `CommunityToolkit.Mvvm` NuGet Pacakge

* Resolve Recommendation from @VladislavAntonyuk

https://github.com/CommunityToolkit/Maui/pull/290/files#r817959288

Co-authored-by: Brandon Minnick <13558917+brminnick@users.noreply.github.com>
Co-authored-by: Vladislav Antonyuk <33021114+VladislavAntonyuk@users.noreply.github.com>
@github-actions github-actions bot locked and limited conversation to collaborators Nov 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants