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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T02:32:17+00:00 2026-05-15T02:32:17+00:00

Can WPF bind to a generic class I created? It is basically Class<T> where

  • 0

Can WPF bind to a generic class I created?

It is basically Class<T> where T:MyInterface
Can I Bind to Class<T> and use MyInterface to Bind It?

  • 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-15T02:32:17+00:00Added an answer on May 15, 2026 at 2:32 am

    WPF can bind to any CLR object (or COM object exposed via the CLR), including instances of generic classes. The object can optionally implement INotifyPropertyChanged or subclass DependencyObject so that changes to its properties will be detected by the binding. If not, the property value is copied once when the binding is evaluated, but not updated.

    Technically WPF does not “bind to a class”: It binds to an object which is an instance of that class. So taken literally the answer to your question would be “no,” but I assume you were asking if it could bind to an instance of a generic class in which case the answer is “yes.”

    WPF does have a limitation as regarding generic classes: The XAML parser cannot create instances of generic classes or reference them within an {x:Type } markup extension, so for most uses with XAML you must create a concrete subclass of your generic class and reference that in your XAML. The exception to this is that the outermost element in a XAML can use the x:TypeArguments attribute to specify a generic class.

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

Sidebar

Related Questions

How can bind an event on a WPF Control to a method on my
If you are creating a WPF window or a WPF page, you can bind
I am doing some benchmarking to determine if I can use WPF for a
I've seen in WPF where you can bind control values to properties of other
With WPF how can I bind the IsEnabled property of a Button to the
Should it be possible to bind a WPF combo box to a class. I
Please tell me how can i bind a hashtable to a WPF Combobox. I
I'm playing around with WPF Binding and variables. Apparently one can only bind DependencyProperties.
How can we Use a DataGrid in WPF to show/update/add/delete records in a Table?
How can I bind a text file to a datagrid with C# WPF? The

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.