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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:49:55+00:00 2026-06-17T13:49:55+00:00

This is probably a very stupid question, but I just cant figure it out.

  • 0

This is probably a very stupid question, but I just cant figure it out.
Assuming that I have a data structure represented by these two classes:

class Accessor
{
}


class Row : INotifyCollectionChanged
{
    public object this[Accessor index] {get;}
}

And if I also have a view-model like this:

class ViewModel
{
     public Row CurrentRow{get;}
     public Accessor CurrentAccessor {get;}
}

How can I define CurrentRow[CurrentAccessor] binding in XAML? I have tried using
{Binding Path=CurrentRow[{Binding Path=CurrentAccessor}]}, but this doesn’t seem to work.

Update: I should point out that Row class is a collection that implements INotifyCollectionChanged interface, so using a simple property wrapper like this
public object WrappedProperty { get{return CurrentRow[CurrentAccessor];}} wouldn’t work since then there will be no updates if the values stored in CurrentRow[CurrentAccessor] changes.

  • 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-17T13:49:56+00:00Added an answer on June 17, 2026 at 1:49 pm

    You might change your Binding into a MultiBinding with an appropriate converter:

    <MultiBinding Converter="{StaticResource RowAccessorConverter}">
        <Binding Path="CurrentRow"/>
        <Binding Path="CurrentAccessor"/>
    </MultiBinding>
    

    The converter might look like this:

    public class RowAccessorConverter : IMultiValueConverter
    {
        public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            var row = values[0] as Row;
            var accessor = values[1] as Accessor;
            return row[accessor];
        }
    
        public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotSupportedException();
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is probably a very stupid question. But assume that I have a DLL
This is probably a very stupid math question, but i can't seem to figure
This is probably a very simple and stupid question to ask, but I have
This is probably a very stupid question, but I am just not sure which
This is probably a very stupid question for SQL stalwarts, but I just want
This is probably a stupid question but, I cant for the love of god
This is probably very stupid question but here we go class Foo < ActiveRecord::Base
this is probably a very stupid question; in a bash script, given the output
This is probably a very simple question so please forgive my ignorance, but can
This is probably a very simple question but I'm a little confused how this

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.