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

  • Home
  • SEARCH
  • 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 8647953
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T13:12:00+00:00 2026-06-12T13:12:00+00:00

For example i got a class person: class Person { string Name { get;

  • 0

For example i got a class person:

class Person {
     string Name { get; set; }
}

In my mainWindow of my wpf application i got a ObservableCollection with this class and i want to display this in a table.
I get it working to display the members(only Name in this case) in a table, but for some reasons i got a button in the table. In this button i use the ‘command’ property in the xaml file to bind an ICommand to it.

Thats what i got working sofar but how can i send the object ‘Person’ itself as parameter to the command? i used the commandparameter in the xaml succesfully for string / int but how can i send the object i’m displaying in the row?

Thnx!

  • 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-12T13:12:01+00:00Added an answer on June 12, 2026 at 1:12 pm
    <Button Command="{Binding ElementName=}" CommandParameter={Binding ElementName=ObjectToSendWithCommand" />`
    

    Sounds like you’re not binding the object correctly in the CommandParameter value. I needs to be a public property either in the codebehind or in your ViewModel (if you’re using MVVM) and if this value changes it will need to utilize the PropertyChanged event.

    Hope this makes sense.

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

Sidebar

Related Questions

I've got a class: class ThisClass { private string a {get; set;} private string
I have a Person object: public class Person { public string Name { get;
I've got a model similar to this: class Person(models.Model): name = models.CharField(max_length=40) birthday =
For example I got this 2 table dbo.fc_states StateId Name 6316 Alberta 6317 British
For example, I've got a business object Person : class Person : INotifyPropertyChanged {
For example i got a class and its got its own properties and i
For example I got a multi select box <select id =countries name=countries multiple=multiple> <option
I got the example in this link . I can't understand the addmove ,
i've got following example xml: <entity id=1> <name>computer</name> <type>category</type> <entities> <entity id=2> <name>mac</name> <type>category</type>
thank you for looking i got this example from my book but i cant

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.