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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:37:25+00:00 2026-05-26T23:37:25+00:00

I wanna make a databinding in a custom class. But it seems different from

  • 0

I wanna make a databinding in a custom class.
But it seems different from normal databinding.

For example, I have a custom class DisplayInfo with a properties DisplayText(string), DisplayStyle(string) and DisplayDescription(string).

and in another custom class ViewUI that contains a property DisplayData which is of type DisplayInfo.

for example:

public class ViewUI 
{
    ....
    public DisplayInfo DisplayData { get; set; }
    ....
}

I want to do DataBinding of the DisplayText in the Xaml. How could I do so?

reference:

<Page ......>

.....
.....
.....

    <ViewUI .......>

        <ViewUI.DisplayData>
            <DisplayInfo Description="Description 123456...." DisplayStyle="Style123" DisplayText = "{Binding.....}"/> <!-- (How to do databinding here or in other place?) -->
        </ViewUI.DisplayData>


    </ViewUI>

</Page>
  • 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-26T23:37:25+00:00Added an answer on May 26, 2026 at 11:37 pm

    You have to change properties in custom class to dependency properties. If property of your class is dependency property then you are able to bind it in xaml.

    For more info about dependency property visit http://msdn.microsoft.com/en-us/library/ms753358.aspx

    What Is a Dependency Property?


    You can enable what would otherwise be a common language runtime
    (CLR) property to support styling, data binding, inheritance,
    animations, and default values by implementing it as a dependency
    property. Dependency properties are properties that are registered
    with the WPF property system by calling the Register method (or
    RegisterReadOnly), and that are backed by a DependencyProperty
    identifier field. Dependency properties can be used only by
    DependencyObject types, but DependencyObject is quite high in the WPF
    class hierarchy, so the majority of classes available in WPF can
    support dependency properties. For more information about dependency
    properties and some of the terminology and conventions used for
    describing them in this SDK, see Dependency Properties Overview.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wanna make a text editor but its different other text editors.It will get
I have 2 question I wanna make Mysql table that have charset utf8 but
I wanna make object from another class in other one. so I done it:
i've built my first wpf application, nothing fancy, but i wanna make it look
I will make upload my application today to my homepage and wanna to have
I wanna make change in css class every 3 loops. In the first three
Got a chart control i wanna make from a data table. the table looks
I wanna make the Mel-Frequency Cepstrum Algorithm but there are some things that I
I have create several canvas with transparent background and wanna make some move event
From what I've seen, if I wanna make a NON-opengl game loop what I

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.