Questions tagged [mvvm]
The Model-View-ViewModel design pattern, which separates presentation from data and logic.
177
questions
1
vote
1
answer
77
views
ViewModel for meetings and rentals
I am bringing up to date an old Xamarin app. I am concerned mostly with any design patterns I should be using or anti-patterns I shouldn't be using. This is my first attempt creating a ...
0
votes
0
answers
110
views
Properly implement MVVM pattern in multiwindow WPF app
I'm trying to develop a SQLite based WPF app (c#) utilizing the MVVM pattern. I'm building this on a decade old laptop with only 2 GB RAM, 20 GB of free storage in it and Windows7.
So I'm using .Net 4....
0
votes
0
answers
54
views
Is this valid MVVM when clicking an item to open a new window?
So I'm currently playing around with WPF and MVVM and I've been trying to find a way to select an item in a list and display it in a new window. And I came up with a solution that I personally like ...
0
votes
0
answers
25
views
Initialize and run/stop subprograms in ViewModels
I make WPF application and I need start "subprograms" (scan directory & send to the API for now, in future - accept incoming files) in MainViewModel, ...
0
votes
0
answers
55
views
GUIComparer with MVVM dialog to allow user input in ArrayList sorting algorithm
download
Bit of an esoteric title, but let me explain. I wanted to create an IComparer that can be supplied to a sorting algorithm, which rather than using the ...
2
votes
3
answers
125
views
Is this method for loading data in a C# application recommended?
Goal
I'd like to understand if this current method, of loading data and inserting data into a database I currently use is to be avoided?
Code
I drafted a simple application that loads data and inserts ...
4
votes
0
answers
86
views
License-holder editing application
I am building a WPF (Windows Presentation Foundation) application. And I'm trying to use the MVVM (Model–View–ViewModel) design pattern. It's fascinating and rewarding, even though it seems overly ...
1
vote
2
answers
111
views
checking is ellipse is filled or not
following code below works fine but feels kind of a mess. Any one has a better way to do this?
I am creating a basic "Enter Pin" to unclick screen on an app. So if the user enters the 1st ...
1
vote
1
answer
254
views
Updating Multiple Collections In ViewModel Based On A Single ListView Selection - WPF
-I have a ListView, and its SelectedItem property is bound to EmployeeModel SelectedEmployee in my VM, and it implements the Set method from MVVM Light. (Basically, ...
2
votes
0
answers
541
views
Tic Tac Toe game using WPF+MVVM
I am looking for some advice on how to create a new ViewModel within an already existing ViewModel.
I am creating a Tic Tac Toe game, to improve my knowledge of the MVVM pattern, WPF and C#. I am ...
2
votes
0
answers
319
views
C# Learning MVVM by creating a Login functionality
I am trying to get my head around how MVVM pattern works. Would like to hear some reviews if I am implementing it correctly.
View
...
1
vote
1
answer
452
views
Create buttons with MVVM architecture
im trying to migrate my very large swift view controller to mvvm but it still feels very large, can you guys give me any advice
What this controller does is simple it shows a UIView on which i can ...
3
votes
0
answers
176
views
A better understanding for separation of concerns. Android; Kotlin
I am an Android developer with only 5 months of experience. I am still learning and trying to do my best.
Right now I am interested in concept of ...
2
votes
1
answer
76
views
Which is better-way to casting model
I need to convert my model to fit data in tableview cell finding better approach
...
11
votes
0
answers
310
views
Host-Agnostic Model-View-ViewModel Infrastructure
I've written an API that unlocks some serious MVVM capabilities with VBA's MSForms UI framework.
This is the complete code-behind for an example ...
0
votes
1
answer
2k
views
C# Event handler for WPF MVVM
So I've been learning about MVVM and I had a problem. I often had to start a thread to download or do some longer task in background and when it is done change some properties so the UI updates. The ...
3
votes
0
answers
465
views
Navigation strategies for a SwiftUI-based app using MVVM pattern
I'm finding it difficult to decide on the best architectural pattern for a SwiftUI app but, for the moment, I'm sticking with MVVM as I found this a good fit conceptually.
I'm trying to avoid the ...
3
votes
0
answers
422
views
Simple MVVM Navigation for WPF in c#
I have been learning MVVM and I have decided to create a small framework for simple MVVM programs I can make in the future. This program provides navigation between a main menu, settings menu, start ...
4
votes
2
answers
204
views
Sanity check a simple RPG character
I'm writing an assistant for the tabletop RPG Pathfinder in Java. I intend to use the MVVM pattern using JavaFX, possibly through mvvmFX. Before I go into the V-VM phase, I have built a first ...
4
votes
1
answer
358
views
Configuring NavigationService and NavigationView in one place
Context
The main goal located a configuration NavigationService and NavigationView in one place. In order to minimalization a ...
3
votes
0
answers
407
views
WPF: An implementation of INotifyDataErrorInfo
An abstract base class which derives from the ObservableObject (MvvmLight), implementing the INotifyDataErrorInfo interface.
...
3
votes
1
answer
109
views
Android - Simplify ViewModel and Repository classes with OOP
Let's say I have 2 repository classes:
...
1
vote
2
answers
168
views
Async Check for Domain Fullname With WPF and Caliburn.Micro
I have a small WPF program built using Caliburn.Micro which checks Active Directory for a user with the current username of the logged-on user. I have a Bootstrapper...
2
votes
0
answers
291
views
Is this an acceptable MVVM Model with IEditableObject implementation?
I'm trying to follow MVVM pattern in a VB.net WPF application, and I would like to implement IEditableObject.
Is this code acceptable for an MVVM application? In ...
6
votes
1
answer
593
views
WPF MVVM ColorLister with navigation
By hashing together various online tutorials I've constructed my first MVVM application that lets users navigate between "tabs" and a "tab" (ColorList_Tab) that performs basic list functions such as ...
2
votes
1
answer
89
views
ViewModels for image transformations
In my project I have a chain of Fragments where each one gets a bitmap, manipulates it, then sends it to another fragment for more processing.
My fragment chain looks like this:
CaptureFragment -> ...
5
votes
2
answers
158
views
MVVM model letting the user select a directory in a testable manner
My application needs to let the user select a folder from somewhere on their local machine. Below are the interface and model pair that I have written to let the user do so.
...
2
votes
0
answers
98
views
Swift MVVM: Repositories - loading entities and dependency injection
I create a lexikon and a navigation for ZOO. I use MVVM architecture supported by ReactiveSwift. I have a few questions about my practises and whether I could write my repositories better and more ...
-1
votes
1
answer
46
views
Is attempt like this, when using Application class, breaking MVVM pattern? [closed]
In my application I am using two view models. MainViewModel if fiered when MianWindow is initialized. And UpdateViewModel is fiered when UpdateWindow is initialized.
The update VM is supposed to use ...
5
votes
1
answer
196
views
Scraping an parsing jockeys data using Task.Run
I started to have HUGE doubts regarding my code and I need some advice from more experienced programmers and architects.
On the button click, the application runs a method, that is running a ...
3
votes
1
answer
2k
views
Create Products TableView with PAGINATION and LIKE product feature in RxSwift MVVM
I have tried to develop a simple product listing app in RxSwift with MVVM design pattern. I have managed to achieve it but I need someone to review my code, such as:
Have I followed the proper ...
4
votes
1
answer
114
views
Android clock in/out app
I am writing a clock in / out and payroll app for Android. I am no professional, but I was hoping I could get some feedback on whether my code is spaghetti or not. This is just one of many classes &...
3
votes
1
answer
1k
views
Login page using RxSwift in MVVM
I am building a simple login page which will check for username before navigating to another screen and here is how I am doing the binding now. I would like to know if I am doing it right and if I am ...
2
votes
0
answers
1k
views
Setting the Owner property on a modal dialog in WPF/MVVM using a Func
I'm looking to solve the problem of setting the Owner property on modal dialogs in WPF, while using IoC and MVVM patterns. I've seen (and written) all sorts of ...
1
vote
1
answer
479
views
Addition Program using wpf through MVVM
I'm new to MVVM and WPF. Please suggest whether this is okay or I need to correct my understanding of MVVM which I confess is very limited as at the moment.
I have created a simple addition ...
12
votes
1
answer
7k
views
Filter Collection by Multiple Criteria
I want to the user to filter a list of receipts by various criteria. Just the regular, an empty filter should show all items, an entry in customer should show all receipts from that customer and an ...
10
votes
1
answer
183
views
Visual Studio exception visualizer for lengthy exception messages
I use Autofac a lot and for everything and when you make a mistake and forget to register a dependency etc. it'll tell you exaclty what's wrong. Although its ...
1
vote
2
answers
1k
views
Android MVVM application architecture
Inspired this guide: https://developer.android.com/jetpack/docs/guide
I try to build some app with similar architecture.
App interact with remote API via http protocol (json responses from server). ...
1
vote
1
answer
5k
views
Flutter - Implementing a simple ListView with MVVM
I've implemented a simple ListView in MVVM that displays a few PrepSteps (short form of PreparationSteps). While implementing I wasn't sure about if my approach is "...
1
vote
0
answers
2k
views
LiveData, MVVM and Repository Pattern
Is this a good approach or I've just found a nasty workaround?
I'm using MediatorLiveData class because seems useful to update the source of a ...
1
vote
1
answer
863
views
MVVMLight Toolkit Data Binding Technique
I'm simulating my real-world application by using a really simple demo app here, but it has the same concept. The question is MVVM Light Toolkit specific, as the ...
1
vote
0
answers
370
views
Xamarin Forms with Ninject navigation service
I am new to Xamarin Forms and I have been searching online finding ways to set up navigation in a MVVM fashion. In particular I am designing around a concept I found here. However, I am using Ninject ...
5
votes
1
answer
990
views
Accessing View from ViewModel
Having a view (grid control) that provides some functionallity via methods (primary SerializeView / DeserializeView) that should be called from the view model which is bound to the view.
One point to ...
-1
votes
1
answer
77
views
Model Exposure with MVVM [closed]
I have been starting to learn MVVM to give my WPF projects better structure.
I have to sample classes, DeviceModel and ...
0
votes
1
answer
227
views
Saving ResourceDictionary theme
I have the following command bonded to my button, It's supposed detect the current used theme and change it (Dark or Light).
...
2
votes
0
answers
435
views
Switching between ViewModels using IoC in a MVVM WPF application
I have a project that uses Caliburn.Micro to implement the MVVM pattern. For IoC, I am using MEF. All the ViewModels are marked ...
5
votes
1
answer
96
views
Viewport for Card Match Game
This is the 2nd half of my Memory game. The first half can be found here. The repository can be found on Github.
I am using SFML 2.4.2. In this project I focused on a few key aspects of design and ...
8
votes
1
answer
743
views
Winform, with a workaround to avoid dependencies
I'm working on a Winform project. We currently have a modular design (shown in the image) in our project. Where on every user action (button clicked or selection changed etc), first we set the Model ...
6
votes
1
answer
779
views
Data Model for a Memory Game
I have a Memory style card matching game. The project is big enough that I want to break up the review. The first part that I am giving you is the data model. If you are interested the full project ...
4
votes
1
answer
5k
views
Login modal with MVVM pattern
I would like some feedback on whether this follows MVVM principles well.
The MainPage has a Login button that opens the login modal page. Upon successful login, the LoginPageViewModel will raise an ...