XC0009 Error: No Property, BindableProperty, or Event Found for Border Class in .NET MAUI

Soumyadip Majumder 80 Reputation points
2025-02-10T12:40:14.9566667+00:00

I am encountering an XC0009 error while working with .NET MAUI and would appreciate any assistance in resolving this issue.

Screenshot 1:

Screenshot 2025-02-10 180010

Screenshot 2:

Screenshot 2025-02-10 180031

In Screenshot 1, while writing the 'Shadow' property for the "Border" class, the Build + IntelliSense in Visual Studio 2022 recognizes the property correctly. However, in Screenshot 2, when attempting to run the program, I receive the error XC0009: "No property, BindableProperty, or event found for 'Shadow' or mismatching type between value and property."

I am using .NET 9 SDK and would like to implement the 'Shadow' property in my project. Any guidance on how to resolve this would be greatly appreciated.

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,918 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,289 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Leon Lu (Shanghai Wicresoft Co,.Ltd.) 79,706 Reputation points Microsoft Vendor
    2025-02-11T01:48:09.3866667+00:00

    Hello,

    receive the error XC0009: "No property, BindableProperty, or event found for 'Shadow' or mismatching type between value and property."

    You cannot use the Shadow by setting Thickness.

    To add a shadow to a control, set the control's Shadow property to a Shadow object whose properties define its appearance like following code.

    <Border StrokeThickness="2" Stroke="Green" BackgroundColor="AliceBlue" Padding="20" >
     
       <Border.Shadow>
          <Shadow Brush="Black"
                Offset="20,20"
                Radius="40"
                Opacity="0.8" />
        </Border.Shadow>
    
        <Border.StrokeShape>
                <RoundRectangle CornerRadius="15"></RoundRectangle>
        </Border.StrokeShape>
           ...
    </Border>
    

    Here is a doucment about how to create shadow.

    By the way, please do not share your code or error with screenshot(it is inaccessible), you can paste you code or error directly here.

    Best Regards,

    Leon Lu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.