Questions tagged [view-model-pattern]
25 questions
0
votes
1 answer
In VIew how to use ViewModel with ViewModelProvider
Here is my MineSweeperView class:
class MineSweeperView : View {
constructor(context: Context?) : super(context)
constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs)
private var userViewModel: UserViewModel
…

Dominik
- 49
- 7
0
votes
2 answers
why is my Listview ItemsSource null (uwp app c#)
I'm trying to bind a List in my ViewModel to a ListView in my Page but I can't get it to work, the ItemsSource is always null allthough the list is populated with values.
This is how I set the whole thing up.
theese attributes are added to the page…

narancha
- 309
- 2
- 16
0
votes
2 answers
WPF MVVM ViewModel containing ViewModels not updating
I'm very new to WPF and MVVM, and it's been causing me a lot of headaches. Due to issues with navigation, I decided to just have all my content visible at once. I thought I would create a new ViewModel (MainViewModel) to contain my two other…

user1959309
- 101
- 1
- 11
0
votes
2 answers
MvvmCross: Hybrid Xamarin.Forms and Android Activity Application
Being new to MvvmCross I've decided to create a small Xamarin.Forms app. I have a MainPage.xaml tied to its ViewModel MainViewModel.cs which is displayed first. I have a FirstView.axml located in the droid project along with its activity. The…

Aiden Strydom
- 1,198
- 2
- 14
- 43
0
votes
0 answers
Trying to create MVVM ViewModelFirst with nested Views and nested ViewModels
I am new to using MVVM and am trying to find a reasonably elegant approach using a ViewModel First strategy while creating an interface of nested Views. I have taken a brute force stab at making a workable solution but I can't imagine this is an…
0
votes
1 answer
How to control selection from ViewModel of MultiSelectTreeView
I've got a WPF MultiSelectTreeView (downloaded from here: http://unclassified.software/en/source/multiselecttreeview).
Now I want to control, which items the user selects. A simple example is that he shouldn't be able to select child nodes of…

timnot90
- 351
- 1
- 13
0
votes
1 answer
Can a 'ViewModel' hold 'DomainModel' type property
In asp.net MVC 4, I have 2 DomainModels
Product
Order
and a related ViewModel
OrderDetailsViewModel
In my "OrderDetailsViewModelMapper" mapper file I am manually mapping these 2 DomainModels to my ViewModel. Mapper file…

Jaish Mathews
- 766
- 1
- 9
- 25
0
votes
3 answers
Populating mvc4 viewmodel with multiple List<>
I have a list of 22 categories with about 8 menuItems per category, but my viewmodel ends up with only the last item in the list. I'm having a hard time seeing where the problem is.
At this point I'm sure the problem is in how I'm populating the…

NNassar
- 485
- 5
- 11
- 25
0
votes
2 answers
How do I add a Custom Query for a drop down and retain the View Model Pattern?
I've read many articles which they state that querying should not be placed in the Controller, but I can't seem to see where else I would place it.
My Current Code:
public class AddUserViewModel
{
public UserRoleType UserRoleType { get;…

xivo
- 2,054
- 3
- 22
- 37
-1
votes
2 answers
How to bind child view to parent viewmodel in ExtJs 5?
I need to bind child view to viewmodel of parent view.
my structure is -
parentView{
items : [{
xtype : 'childview'
}]
}
parentViewModel{data : NAME}
childview : {
items : {[
xtype : 'label',
bind : {value :…

Krishna Agrawal
- 44
- 2
- 8