Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8934151
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:42:58+00:00 2026-06-15T09:42:58+00:00

I have several attached properties in several classes throughout my framework. All of these

  • 0

I have several attached properties in several classes throughout my framework. All of these are mapped into a single xml Namespace using the XmlnsDefinitionAttribute. I have noticed that if I declare some of these attached properties without referring to the class name (the class that actually contains the property, I get the compile-time error:

The property 'XXX' does not exist in XML namespace 'YYY'

To explain better, this happens when I have let’s say a FocusHelper class that has an IsFocused attached property, but try to use it in XAML like this:

<CheckBox my:IsFocused="true"/>.

Notice I specified the xml namespace (which I have correctly declared), but not the class name.

My question is:

Is there a way to achieve this? the error hints me that there is a way to define properties inside namespaces directly. Is this even possible?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T09:42:59+00:00Added an answer on June 15, 2026 at 9:42 am

    This isn’t a XAML issue, this is a C# “issue”. Meaning, you can’t have a “global” property in C#. It must be inside a class.

    There is no “global” concept in C#.

    In order to get the syntax you want you would have to be able to declare a property globally (i.e. outside the context of a class) and that isn’t possible in C#

    This is why framework attached properties also have the class name preceding them (Grid.Column, Canvas.Top)

    In the case of the Framework Attached properties (Grid.Column, Canvas.Top etc…) you don’t have to specify the namespace because they are in the “default” namespace

    xmlns=""
    

    as opposed to your namespace

    xmlns:my=""
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been reading about dependency properties in several books but all have one
I have several qdockwidget and within these a qtableview, as seen in the attached
I have several NSButtons that are attached to a single IBAction. I need to
I have several images positioned on top of each other using absolute positioning. These
I have several xml files with different node structure. I want to extract xml
I have several xml files that are formated this way: <ROOT> <OBJECT> <identity> <id>123</id>
I have an array of FileReference objects which have several listeners attached to each
I'm using the jquery plugin ColorBox . I have a page with several item
I am using the Reflection classes in order to get all the fields inside
I have set up a dialog with several tabs. One of these contains twenty

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.