Hello how can i bind data of multiple classes to a single list view through xaml. I sucessfully bind data from single class to a lisview but when i try to bind data of more than one classes it didn't show anything in xaml.
Binding data of multiple classes to single list view/xamarin forms
1.8k Views Asked by bilawal At
1
There are 1 best solutions below
Related Questions in XAML
- WPF multiple control property simultaneous changes
- Telerik's WPF RadColorPicker NoColorText property not working
- Ellipsis inside button content Windows Phone
- Binding to "this.property" object in VisualStateMenager
- Scroll view mistakes
- ContextMenu Closes Immediately
- Update ObservableCollection where the items are received from another List
- Looping "complex" object with ItemsControl
- Animation Trigger (Storyboard + Trigger) in C#
- Exporting Datatable
- xaml c# chart with custom axis label
- Xamarin Forms - Show Cancel button in toolbar items instead of Back (iOS)
- Can custom text be added to a listview cell?
- Bind control property from the inner control
- WPF Interactions CallMethodAction for DataTemplate in ListCheckBox thrown a exception "Could not find method on object of type"
Related Questions in XAMARIN
- Xamarin Table View Crash
- How to read a characteristic (e.g. in WICED Smart example "speed_test")
- Using Azure MobileServices library with my own LAN WebApi
- Bundle Multiple Xamarin apps in one pkg installer
- Xamarin Google Cloud Messaging GcmClient.CheckDevice(this) causes runtime error
- UIAlertView popup won't let me swipe up Control Center
- How do I Insert a Previously Created SQLite Database into a Xamarin.Android App?
- Can custom text be added to a listview cell?
- How to run a ASP.net project to Xamarin Studio
- How can i do a fill animation in Xamarin.Forms
- How to change Display Alert default focus on a button?
- Mixing a CocosSharp game with UIViewControllers
- Building C# code in VSCode on Mac
- How to use research Kit framework in Xamarin
- Why is my app requesting permissions I didn't ask for?
Related Questions in DATA-BINDING
- Understanding Polymer data-binding and HTML tags
- WPF MessageBox Cancel checkbox check
- Binding to "this.property" object in VisualStateMenager
- Update ObservableCollection where the items are received from another List
- ObservableInt causes crash on DataBinding Library
- Polymer 1.0 Data Binding in <styles>
- Bind constraints in Input control of SAPUI5
- Access into a Binary Search Tree via a bound function in a function template
- Serve arbitrary html in angular data bind
- submit dropdown angularjs spring MVC
- Periodically update Polymer Binding
- MVC WPF DataContext for two UserControls
- Binding ComboBox to ViewModel in WinForms
- JavaFX binding: does BeanPathAdapter work?
- Resetting form controls after action in Angular
Related Questions in PORTABLE-CLASS-LIBRARY
- Serializing TypeInfo / Type across .Net Platforms
- GetTypeInfo Performance in Windows Store Apps
- SQLite net PCL - Simple select
- Can PCL libraries run with ASP.NET MVC?
- Xamarin.Forms PCL MVVM Light > Custom Control > Best Practice?
- c# Method tooltip doesn't appear in other project
- Getting inherited public static field with Reflection in Portable Class Libraries
- `PortableClient` constructor failing after moving project
- C# PCL HMACSHAX with BouncyCastle-PCL
- Move code to DLL out of Windows Store app if it uses full-framework library?
- swig in c# - HandleRef could not be found in portable class library
- Why aren't the fields of the URI class available in PCL?
- Xamarin Forms: StackLayout with rounded corners
- Progressbar with Percentage Text in Xamarin forms
- how to fill image on stacklayout xamarin forms pcl
Related Questions in SHARED-PROJECT
- Shared project with resource dictionary (xaml)
- How to use Custom Renderer in Xamarin Shared Project
- Newtonsoft.json serializing and deserializing base/inheirited where classes are from shared projects
- Shared projects and resource files
- Xamarin.Forms Shared Project Web Service
- Preventing mobile projects from using certain .cs files in a Shared Project
- Reference something from a shared project
- Can I store resources and Windows Forms in a Visual Studio Shared Project?
- Xamarin Forms Shared Play Mp3 file on Android
- Where should most of my platform specific code be in MVVM? (Beside View)
- Xamarin Shared Project on Rider?
- Xamarin Sharing A Base Android and iOS Project with multiple Android and iOS apps
- Visual Studio 2019, how to use Image located in Shared Project in WPF/XAML?
- Connect Xamarin Cross-Platform project to OData Service
- Xamarin Shared Library and PCL
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
You cant't do that 'directly'. As all
UIElementcontrols have only oneBindingContextproperty, you can bind only one objet at a time.In MVVM patterns, you implement ViewModel classes to group all the needed data to display on the associated page...
So for your 'Listview', I suggest you to make a property in your ViewModel that references a new object that is simply the aggregation of all classes you want to connect to your listview.
A simple exemple:
And in your xaml, presuming your viewModel implements a property of type
ListviewAggregatedDatacalled 'VmAggregatedDataProp', You could have something like that:Binding names in this example must be replaced by your own properties... Tell me if it s clear...