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 6222513
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:19:39+00:00 2026-05-24T08:19:39+00:00

I have a class in assembly AssemblyX with property Comment. I want to bind

  • 0

I have a class in assembly “AssemblyX” with property “Comment”. I want to bind AssemblyX.Comment to TextBlock.Text in another assembly?

I’m trying to do it in the following way but it is not working.

<Window xmlns:cc="clr-namespace:SomeNamespace;assembly=AssemblyX">
<TextBlock Text={Binding cc:Comment}/>
...
  • 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-05-24T08:19:39+00:00Added an answer on May 24, 2026 at 8:19 am

    You usually don’t bind to a property of a class, you bind to a property of an instance of a class. So in your codebehind you’d create an instance:

    SomeNamespace.SomeClass instance = new SomeClass();
    instance.Comment = "bla";
    this.DataContext = intstance;
    

    And in your xaml you bind:

    <TextBlock Text="{Binding Comment}"/>
    

    In this case it absolutely does not matter in what assembly SomeClass is declared, as long as you current project references that assembly. It also doesn’t matter what SomeClass is named. All that matters is that the instance you bind against has a property named Comment.

    If the property of your class is static and you therefore don’t have an instance, you can bind to the static property like this:

    <TextBlock Text="{Binding cc:SomeClass.Comment}"/> 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a base class that has the following property: public virtual Dictionary<String, int>
I have the following situation: Assembly A - Class library, contains my control Control
I have a windows service that references an assembly which contains the following class.
Consider the following. You have a class that you want to serialize with XmlSerializer
I have to use a class/assembly made in C# .NET from native C++ application.
I have a C# (2008/.NET 3.5) class library assembly that supports WPF (based on
I have an assembly containing a number of classes. This is a class library
I have a third party assembly with a public abstract class implementing a certain
In brief: Is it ever excusable to have assembly names and class names stored
Heyo, My class at college has us writing programs in assembly. I have never

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.