Questions tagged [mvvm]

The Model-View-ViewModel design pattern, which separates presentation from data and logic.

Filter by
Sorted by
Tagged with
0
votes
0answers
40 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 ...
1
vote
3answers
104 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
0answers
84 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
1answer
66 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 a app. So if user enter 1st digit, than ...
1
vote
1answer
87 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, ...
0
votes
0answers
170 views

iOS: Combine and Clean Architecture

I’m learning a lot of from Combine thanks to an amazing book in raywenderlich. Currently i’m writing an app and following the clean MVVM architecture. Then I have the following layers: Domain(...
2
votes
0answers
366 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
0answers
155 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
1answer
164 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
0answers
111 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
1answer
75 views

Which is better-way to casting model

I need to convert my model to fit data in tableview cell finding better approach ...
10
votes
0answers
273 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
1answer
900 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
0answers
325 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
0answers
219 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
2answers
146 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
1answer
255 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
0answers
281 views

WPF: An implementation of INotifyDataErrorInfo

An abstract base class which derives from the ObservableObject (MvvmLight), implementing the INotifyDataErrorInfo interface. ...
3
votes
1answer
103 views

Android - Simplify ViewModel and Repository classes with OOP

Let's say I have 2 repository classes: ...
1
vote
2answers
137 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
0answers
254 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
1answer
484 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
1answer
87 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
2answers
128 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
0answers
82 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
1answer
41 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
1answer
188 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
1answer
1k 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
1answer
100 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
1answer
964 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
0answers
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
1answer
408 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
1answer
5k 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
1answer
170 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
2answers
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
1answer
4k 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
0answers
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
1answer
780 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
0answers
344 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
1answer
911 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
1answer
74 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
1answer
218 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
0answers
382 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
1answer
93 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
1answer
698 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
1answer
762 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
1answer
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 ...
2
votes
0answers
264 views

Initializing child windows in MvvM

I have a MvvM application that is working very fine. However I am not sure if I'm writing a clean code, especially the part handling child windows with their controller. So to begin, i have this ...
6
votes
2answers
792 views

Using a service interface to get user input from dialogs

I haven't worked with WPF/MVVM for a while, but now I'm back fixing some issues with one of my old apps and remembering the struggles I always had when dealing with asking for user input (eg. showing ...
1
vote
1answer
5k views

Testing async method call from constructor

I have a project where I want to build a more sophisticated ToDo list - basically a personal project management system. I'm just starting out with the project, and I'd like some feedback on whether my ...