mvvm Questions

2

I have two tabs that is bind to one viewmodel which contain a PlotModel of oxyplot and view model selected through a DataTemplate. When click on the first tab the viewmodel was bind properly but wh...
Intercommunion asked 14/9, 2014 at 13:0

1

To avoid this being an X-Y problem I will explain what I want to achieve first, and then what I tried to achieve it and failed. Problem: I have a bunch of texts which I am searching through. The se...
Kapp asked 10/9 at 3:49

3

I've read a number of questions about this error that relates to dismissing sheets, but none dealing with SwiftUI's Map. The following code generates this error. Nothing is being updated in the vie...
Desiderative asked 23/9, 2022 at 16:36

3

Solved

I'm a student learning C# with WPF using the MVVM pattern. Recently I have been working on a [art of my application (a custom splash screen) that should not be closed when I don't want it to. I hav...
Oakie asked 6/6, 2013 at 22:38

5

Solved

I have created a Window which has a ListView to display a collection of persons. There are also 3 TextBoxes that are supposed to display the person's first and last name, and an age. Finally, there...
Province asked 6/4, 2011 at 20:30

5

Solved

I've been trying for hours to get to the point where I can start a WPF application and have full control. I want to be able to create a ViewModel, create a View (Window), set the data context of th...
Telespectroscope asked 9/8, 2010 at 10:57

5

Solved

is it possible to bind an itemscontrol with canvas as template to multiple DataTemplates? I have 2 collections and depending on the type I would like to display a different control on my canvas. ...
Barstow asked 29/3, 2011 at 13:8

7

Solved

I'm trying to follow the MVVM pattern in a WPF application as good as I can, mainly to be able to create unit tests for my ViewModel logic. In most cases data binding between ViewModel properties ...
Taxicab asked 2/4, 2011 at 16:34

3

I have ListView (virtualization is on by default), which ItemsSource is bound to ObservableCollection<Item> property. When data are populated (property is set and notification is rised) I se...
Quieten asked 11/7, 2016 at 9:14

9

Solved

Scenario: User clicks a button on the View This invokes a command on the ViewModel, DoProcessing How, and where does the Wait cursor get set, considering the responsibilitues of View and ViewMode...
Glop asked 12/4, 2012 at 6:52

3

Solved

IN an MVVM pattern is it acceptable or even possible to access ViewModel properties in the views code behind? I have an observable collection which is populated in the ViewModel. I need to use it ...
Jarietta asked 6/12, 2012 at 21:48

13

Solved

I have a ViewModel defined like this: public class LocationTreeViewModel<TTree> : ObservableCollection<TTree>, INotifyPropertyChanged TTree : TreeBase<TTree> I want to refer...
Lamonicalamont asked 4/4, 2012 at 5:0

2

Solved

My problem/situation is very similar to Wpf DataGrid SelectedItem loses binding after cell edit but I'm not using any "custom" WPF framework. I have a model that implements INotifyPropertyChanged a...
Osmen asked 26/6, 2013 at 0:54

3

Solved

It seems that for some reason, Microsoft has created an interface for it's messenger and then gone and implemented the logic as extension methods on the interface itself. Unfortunately, I cannot us...
Longshore asked 7/9, 2021 at 8:5

21

Solved

I am trying to implement MVVM pattern in my android app. I have read that ViewModels should contain no android specific code (to make testing easier), however I need to use context for various thin...
Beutler asked 21/7, 2018 at 0:29

6

Solved

I have a Person class: public class Person : INotifyPropertyChanged { private string _name; public string Name{ get { return _name; } set { if ( _name != value ) { _name = value; OnProperty...
Refinery asked 8/8, 2012 at 17:37

6

Solved

I try to avoid code behind in views, within my WPF MVVM project. However I have some things that are very specific to the view. For example when a control gets focus I want the full text to be hig...
Acescent asked 2/1, 2014 at 12:39

9

Solved

I have a textblock: <TextBlock HorizontalAlignment="Left" Name="StatusText" Margin="0,20" TextWrapping="Wrap" Text="{Binding StatusText}"> ... Status ... </TextBlock> codebehind: p...
Unattended asked 27/8, 2014 at 8:20

3

Solved

I often bind the IsExpanded and IsSelected properties of a TreeViewItem to my viewmodel. This for example makes it possible to make an item pre-expanded when the tree is loaded or expand an item wh...
Binominal asked 19/1, 2015 at 14:58

3

I'm learning to use Jetpack Compose and I was trying to follow a tutorial to create a Pokedex with Hilt and MVVM, everything was going well until I tried to implement the viewModel, when I injected...
Lavonia asked 13/4, 2022 at 0:5

23

I have a Button that closes my window when it's clicked: <Button x:Name="buttonOk" IsCancel="True">Ok</Button> That's fine until I add a Command to the Button i.e. <Button x:Name...
Naylor asked 7/12, 2010 at 12:18

2

Solved

I was wondering if it is possible to hide a control on a view if the property to which the control is bound does not exist in the view model. For example, if I have the following: <CheckBox Con...
Householder asked 27/3, 2012 at 16:36

8

Solved

The app crashes as soon as it gets installed and throws the weird error above. I have annotated the activity as shown below as well as its child fragments. @AndroidEntryPoint class HomeActivity : ...
Theologize asked 22/9, 2020 at 8:43

3

Solved

I have an observable collection in the view model that implements Bindable Base as follows Please have a look at the MoveUp and MoveDown methods where they are bound to two buttons in the view. Whe...
Fonsie asked 14/11, 2014 at 1:31

3

Solved

I'm building an Android app that uses Dagger-Hilt. Altough Dagger-Hilt is in my build.gradle file as you can see below, build.gradle (project file): buildscript { ext { compose_version = '1.1.0-b...
Chubby asked 3/9, 2022 at 6:27

© 2022 - 2024 — McMap. All rights reserved.