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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T16:21:32+00:00 2026-06-12T16:21:32+00:00

I have a problem trying to bind a property of an object in a

  • 0

I have a problem trying to bind a property of an object in a mvxBindableListView with MVVMCross and Android.

The structure of the classes is the next:

public class A 
{
    public string MyPropertyA1 { get; set; }
    public int MyPropertyA2 { get; set; }
}
public class B 
{
    public int MyPropertyB1 { get; set; }
    public int MyPropertyB2 { get; set; }
}

public class C
{
    public int MyPropertyC1 { get; set; }
    public A MyPropertyA { get; set; }
    public B MyPropertyB { get; set; }
}

The mvxBindableListView is like that:

<?xml version="1.0" encoding="utf-8"?>
<Mvx.mvxBindableListView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:local="http://schemas.android.com/apk/res/Android.Client"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
local:MvxBind="{'ItemsSource':{'Path':'Results'}}"
local:MvxItemTemplate="@layout/detail_viewmodel" />

Where Results is: public ObservableCollection Results { get; set; }
and the detail_viewmodel is:

<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:local="http://schemas.android.com/apk/res/Android.Client"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_marginLeft="6dip"
    android:layout_marginTop="6dip"
    android:textAppearance="?android:attr/textAppearanceLarge"
    local:MvxBind="{'Text':{'Path':'MyPropertyA.MyPropertyA1'}}" />

When the application runs, it shows me the mvxBindableListView with the number of elements that contains the variable ‘Results’ , but the rows are empty.

Anyone know what is happening? thanks

  • 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-12T16:21:34+00:00Added an answer on June 12, 2026 at 4:21 pm

    I tried changing the Tutorial application to use an email with:

        public class Thing
        {
            public string Life { get; set; }
    
            public Thing()
            {
                Life = Guid.NewGuid().ToString();
            }
        }
    
        public class SimpleEmail
        {
            public Thing MyThing { get; set; }
            public string From { get; set; }    
            public string Header { get; set; }    
            public string Message { get; set; }
    
            public SimpleEmail()
            {
                MyThing = new Thing();
            }
        }
    

    And the template to include:

    <TextView
    android:id="@+id/email_header"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_marginLeft="6dip"
    android:layout_marginTop="6dip"
    android:layout_toRightOf="@id/email_from"
    local:MvxBind="{'Text':{'Path':'MyThing.Life'}}"
    />
    

    This showed the Guid’s fine.

    Looking at your code, because your models do not support INotifyPropertyChanged, then I wonder if you are setting the ViewModel properties before you are binding?

    To fix this, I might try:

    public class A 
    {
        public string MyPropertyA1 { get; set; }
        public int MyPropertyA2 { get; set; }
    }
    public class B 
    {
        public int MyPropertyB1 { get; set; }
        public int MyPropertyB2 { get; set; }
    }
    
    public class C
    {
        public int MyPropertyC1 { get; set; }
        public A MyPropertyA { get; set; }
        public B MyPropertyB { get; set; }
        public C()
        {
           MyPropertyA = new A() { MyPropertyA1 = "TestValue" };
        }
    }
    

    If your app then shows “TestValue” then you know that the binding is working.

    If you then need to get the right values shown, you have two choices:

    1. Set the properties before you bind the view to the data
    2. Somehow, somewhere on the binding chain signal the INotifyPropertyChange event so that the binding knows it has to refresh
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this problem when trying to run hello world program using android SDK.
I have a class that has an instance property on it like below Public
EDIT: Problem was fixed in .NET 4.0. I have been trying to bind a
I have a problem trying to turn my python code into an executable using
I have a problem trying to register my own Event/Listener to the event dispatcher.
I have a problem trying to design some generic storage.. Basically I have the
I have a problem trying to edit. I work with Areas for better management
I have a problem trying to hide .php extension from the url I have
I implemented the table sorter yesterday and i have a problem trying to change
I have a problem when trying to count in PHP using a button and

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.