Comments (12)
All my custom ContentPage inherited XAML definitions are resulting in XAMLC errors.
When I surround the XAML with the ContentPage's Content node, it compiles. In that case, all my customization is not working.
Understand it's a Preview release but the basic scenario itself is failing. UT needs to be strengthened further.
from maui.
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!
Open similar issues:
- XAML Compile Causes Failure at Run Time (#22110), similarity score: 0.71
Closed similar issues:
- [regression/8.0.0-rc.1.9171] XAMLC is currently throwing exceptions in RC1 that don't appear to have been throwing in PReview7 (#17333), similarity score: 0.73
- [Bug] CollectionView not working (#2929), similarity score: 0.72
- MAUI XAML build error when using Data Template and binding (#14425), similarity score: 0.72
- The "XamlCTask" task failed unexpectedly. (#21910), similarity score: 0.71
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
from maui.
From what I can tell we're failing to compare type references because for some reason one of them is imported in the MPowerKit module:
from maui.
Something is odd here that it's showing DataTemplate for the baseClass coming from the MPowerKit.VirtualizeListView module. Looking at that assembly, I do not see any duplicated types, so what would be causing it to appear as though it's imported from that module?
from maui.
Verified this issue on VS Code 1.90.0 (9.0.0-preview.5.24307.10). Can repro it with sample project.
from maui.
It seems this may be due to a change in the runtime. We are currently investigating this and have some ideas of how we can at least mitigate it in the short term.
from maui.
I also experienced this issue, it propagated as a compiler error for the MAUI community toolkit, whilst compiling.
XC0009 No property, BindableProperty, or event found for "Content", or mismatching type between value and property.
<?xml version="1.0" encoding="utf-8" ?>
<toolkit:Popup xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
x:Class="MyTeamSafe.Views.ProgressPopup">
<VerticalStackLayout HorizontalOptions="Center" VerticalOptions="Center" BackgroundColor="Purple">
<ActivityIndicator IsRunning="True" />
<Label Text="{Binding Message}" />
</VerticalStackLayout>
</toolkit:Popup>
My temporary workaround was to switch the TargetFramework from
<TargetFrameworks>net9.0-android</TargetFrameworks>
to
<TargetFrameworks>net8.0-android</TargetFrameworks>
But I'm now installing dotnet SDK 9 preview 4 and referencing that from my global.json file to force my project to use preview 4 instead of preview 5
{
"sdk": {
"INFO": "From command line type `dotnet --list-sdks` to get the list of installed dotnet SDKs",
"version": "9.0.100-preview.4.24267.66"
}
}
from maui.
XC0009 No property, BindableProperty, or event found for "Content", or mismatching type between value and property.
Could you try enclosing the VerticalStackLayout
with an explicit Content
property tag, which might work?
<toolkit:Popup.Content>
<!-- Everything in-betwen -->
</toolkit:Popup.Content>
from maui.
Could you try enclosing the
VerticalStackLayout
with an explicitContent
property tag, which might work?
I'm sorry, but this doesn't fix it.
from maui.
This crude method works.
Define an intermediate base class and modify your Popups to inherit from it.
public class MauiPopup : Popup
{
public override View? Content
{
get => base.Content;
set => base.Content = value;
}
}
from maui.
Another example of this:
https://learn.microsoft.com/en-us/dotnet/communitytoolkit/maui/views/expander
<mct:Expander>
<mct:Expander.Header>
<Label Text="Baboon"
FontAttributes="Bold"
FontSize="Medium" />
</mct:Expander.Header>
<HorizontalStackLayout Padding="10">
<Image Source="http://upload.wikimedia.org/wikipedia/commons/thumb/f/fc/Papio_anubis_%28Serengeti%2C_2009%29.jpg/200px-Papio_anubis_%28Serengeti%2C_2009%29.jpg"
Aspect="AspectFill"
HeightRequest="120"
WidthRequest="120" />
<Label Text="Baboons are African and Arabian Old World monkeys belonging to the genus Papio, part of the subfamily Cercopithecinae."
FontAttributes="Italic" />
</HorizontalStackLayout>
</mct:Expander>
from maui.
Tested 8.0.70-ci.net8.24320.1 and I'm no longer seeing the error. A result of #23031 being merged?
Nightly 9.0.0-preview.5.24307.10 still generates the error. In both cases building with net9.0-ios
.
from maui.
Related Issues (20)
- Obsolete Compatibility.Layout
- Items in CollectionView take up large vertical space in iOS HOT 2
- Unable to debug Android MAUI App in Visual Studio for Mac HOT 4
- [Bug] [platform/android] [area-essentials] Shared Preference Android HOT 1
- App does not want to publish to ios not even simulator HOT 2
- Non-fatal Exception: System.ArgumentNullException HOT 2
- [MacCatalyst] Failure to run in release mode (arm64) HOT 9
- Windows: Entry with right aligned text keeps text jumping to the left during editing HOT 4
- Clean up the concepts of WrapperView HOT 1
- [net9.0] Blazor MAUI App hangs during back navigation because of disconnect code HOT 1
- .Net 8 MAUI Memory Leaks after navigating to multiple pages and then navigating to root page. HOT 1
- ContentPage unload event fires, if another page is opened, not if at unload HOT 1
- Changed order of calls to properly close MediaPicker Activity / ViewController and set the picker result
- Shadows not rendering as expected on Android and iOS HOT 1
- App crash in Release Mode when binding ItemSource in CollectionView HOT 3
- Error when attempting to create a new MAUI project HOT 4
- No se encuentra la tarea "maui: Build". HOT 3
- Receiving text sent to the MAUI app using Share function on Android does not work HOT 1
- Bug report page shows a broken link to Xamarin.Forms repo. HOT 2
- AppThemeBinding BarBackground with Brush in NavigationPage not working HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from maui.