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

learn more… | top users | synonyms

7
votes
2answers
77 views

AsyncCommand using MVVM and WPF

Goals I want to be able to call async code using the MVVM pattern I want to be able to add loading animations/screens without having to add properties for each command on my viewmodels I may want ...
3
votes
1answer
57 views

Weaving through the MIST

Original post here: MIST - auto-implemented, attribute-driven .NET notification mechanism I've developed (and use) an IL "weaving" solution for auto-implementing property change notification in ....
7
votes
3answers
178 views

MIST - auto-implemented, attribute-driven .NET notification mechanism

I have a component that I've used myself for quite some time, the short story is that it automagically implements a property change notification mechanism (very useful for implementing ...
2
votes
2answers
101 views

C# SerialPort implementation

I'm writing a C# WPF project built with a MVVM pattern. This software is written to use a medical diagnostic device, so in our planning it will be certified IEC 62304. Since I've been mainly writing ...
1
vote
0answers
28 views

Loading sub items of TreeView in background

I am working with a TreeView (default control from .Net Framework) that displays hierachical data. Data are bound to the view using MVVM pattern with the ...
1
vote
0answers
21 views

Extension for BindableBase that can dispose the old value of a property if that property implements IDisposable and is not null

I am interested in hearing opinions on this. I need a way to dispose the old value of a property in a way that's compatible with BindableBase. Specifically, I have ...
0
votes
0answers
61 views

Prism 6 Popup Window with EventAggregator to replace a service

I have a WPF project with Prism 6 and EF6. In my project I have a MainTabModule which has ...
5
votes
1answer
106 views

MVVM: Am I doing it right?

I read a lot of articles recently concerning XAML, WPF, data binding and MVVM. I also watched some MVVM tutorials and downloaded some MVVM samples. I finally got my first MVVM sample to work, but ...
2
votes
1answer
173 views

ReactiveUI And WPF - Reusing a value to update multiple properties

I've created my first ReactiveUI app in WPF. Simply, the user enters their full name in one textbox, and then the name gets split into its parts and displayed in the other textboxes. This is just an ...
5
votes
1answer
90 views

Enumerating smart card terminals asynchronously in ViewModel constructor

I started a project the other day and started going down the path of using async and await as I have never used it before and it seems like a good match. The app that I'm making is a WPF solution ...
1
vote
0answers
81 views

WPF Track child collection validation errors

I have a need to get notified about validation errors that occur in a child collection of my ViewModel. For validation I use the ...
3
votes
1answer
67 views

Unity Repository Best Practices

I am now developing a product, which will use Unity & Repositories when it comes to data management. I will demonstrate on a simple example. What we want to do, ...
1
vote
0answers
99 views

Saving the state of a ViewModel

I've the following scenario, I've got some viewmodel that need to persist their state on disk. I've defined a custom attribute as: ...
4
votes
1answer
52 views

FindAllReferencesCommand 2.0

Rubberduck 2.0 will feature a "Search Results" dockable toolwindow that will be used for displaying the results of Find all references, Find all implementations, and whatever else we need to find. It ...
1
vote
1answer
50 views

Randomly choose a game executable from a folder 2.0

After asking Randomly choose a game executable from a folder, I applied the recommended changes. I also redesigned the program to make use of the MVVM (Model-View-Viewmodel) paradigm, using Prism 6.0. ...
4
votes
0answers
259 views

Unit of Work and repositories in MVVM / Windows 10 app

I’m currently aiming to make my first app for the Universal Windows Platform (UWP) / windows 10. It’s a small app but should follow some best practices patterns (although I’m considering it as a first ...
5
votes
1answer
1k views

Navigation between pages in WPF MVVM application

EDIT: Here is the code repo: https://github.com/AntwanReno/navi I did a project in WPF MVVM. Just a single Window with single ...
5
votes
1answer
94 views

DialogService which can return a result and closes Window

I wanted to have a DialogService that can return an arbitrary result. The views to be displayed are implemented as UserControls, and UserControls cannot close themselves (nor directly the parent ...
9
votes
1answer
111 views

Code Explorer 2.0: A folder hierarchy to organize VBA projects

Next release of Rubberduck will introduce a very cool @Folder annotation system that the Code Explorer will use to organize modules into - you guessed it - folders: ...
8
votes
2answers
492 views

Monitoring the clipboard

The following class monitors the clipboard and raises an event whenever the contents change. The monitoring starts when the class is created and ends when Dispose ...
4
votes
1answer
169 views

MVVM light message handling

Recently I started to use mvvm light messenger and it lead to creating this ugliness which I have to refactor now. What would be the best future proof way to refactor this whole class? ...
3
votes
1answer
74 views

Closing Tab Item Confirmation

For this project I'm targeting .NET 4.6 with Prism 6 as a toolkit to implement correct MVVM patterns. The code below allows me to raise a dialog box with Yes, No, Cancel buttons. If the user clicks '...
0
votes
1answer
30 views

Data binding with keydown

I want to create a JS MVVM framework for learning and personal project. jsFiddle HTML: ...
5
votes
3answers
335 views

Fetching, adding, and viewing games

This is a simple application that will eventually manage certain files for video games. For now, I'm only posting code that handles fetching, adding, and viewing games. I'm trying to keep things ...
4
votes
0answers
131 views

Unit of work with Repository pattern

I am trying to work on a WPF application and decided to go for Unit of Work and Repository pattern, along with MVVM. I am using Entity Framework as my ORM. Could ...
8
votes
1answer
158 views

TestExplorer 2.0 - From Grid to TreeView

Rubberduck's unit testing feature (heck, the whole project) started with a VBA unit testing framework that was ported from vba to c#; the VBA logic was pretty much simply rewritten in another language,...
4
votes
1answer
336 views

WPF MVVM Navigation

Following a lot of research and mainly based on this tutorial I came up with the following structure in my application: ObjectBase - all view models inherit it: ...
0
votes
0answers
38 views

Single page web mini app clients

Task: a one-application separation of logic. I'm just learning to write patterns MV*. Have I used shared model of view? View: ...
3
votes
0answers
1k views

WPF MVVM Dialog with Prism, MahApps.Metro

I am building a Metro-themed WPF application with MVVM approach using Prism and MahApps.Metro. I have to show a custom dialog from view model. Currently, I am using ...
1
vote
0answers
335 views

Xamarin Forms MVVM Light Toolkit usage

I am playing around with Xamarin, because there is a good chance that I might have to start a project using it in a few months. What I am mostly looking at is Xamarin Forms as I am familiar with WPF ...
1
vote
1answer
54 views

Organizing museum artwork

I have a small Django project to help organize museum artwork. In my models.py file, my museum object is defined as follows: ...
5
votes
1answer
183 views

WPF application depending on large file

I've got a quite simple WPF application, trying to implement a correct MVVM pattern. The application in itself is simple: one listItem and one textbox + button for searching. On init, the entire ...
12
votes
2answers
754 views

MVVM data binding for a video encoding form

I am creating a C# WPF application. I am intending to bind all of the GUI controls via data binding to my ViewModel, rather than code behind - as per MVVM. I have ...
5
votes
1answer
306 views

Passing a password to a viewmodel

I've got a project I've been working on that connect to a file server and writes some data to a text file. In order to do this I added a textbox for the user to type their username and a passwordbox ...
1
vote
2answers
114 views

MVVM Model modifying data

I’m trying to rewrite one of my projects using the MVVM pattern. I have a feeling though I’ve not done it correctly because I think my Model is too “smart”, it has methods to modify its own ...
3
votes
1answer
1k views

Controlling a Windows Service from a WPF app

I have a WPF Control Panel app, where I'm trying to stay close to an MVVM architecture. The control panel (the "the CP") is for a WCF service ("the Scheduler"), hosted in a Windows Service ("the Host")...
2
votes
1answer
1k views

Asynchronous method and collection binding

I have a WPF application, in which I'd like to bind a collection to a combobox using an asynchronous method : ...
5
votes
2answers
77 views

The cycle continues - VM's part 4

So, this is my refactored VM: ...
3
votes
1answer
336 views

Using list of tasks to obtain and cache data

I develop Windows Phone App with Prism framework (MVVM). I use data caching. To get data I use proxy service. Proxy service creates two ...
4
votes
1answer
3k views

From event handler to command: on my way to MVVM

I have a WPF C# application that I want to move to a MVVM pattern. My first step is to remove the button click handlers from the code behind of the UI. I've found some examples online and then ...
4
votes
2answers
155 views

MVVM, Navigation, and More - Part 3

This is actually a second follow-up to Correct MVVM format, but I have made different changes. This is my ViewModel.cs class for my MainPage.xaml: ...
4
votes
1answer
177 views

Reacting to Boolean state in reactive ViewModels

When this ViewModel loads we kick off the IsAuthenticatedCommand: If the result of ...
7
votes
1answer
2k views

A ViewModel using ReactiveUI 6 that loads and sends data

Most of the Rx Compelling Examples™ load and store data locally, which I don't find that Compelling. I spent some time coming up with how to best perform the following actions but want to make sure I ...
3
votes
1answer
70 views

View model usage

I'm about to start work on a large project using MVVM design pattern. I've worked on smaller projects in the past using MVVM, but I want to make sure my approach to MVVM is good/manageable as possible ...
7
votes
2answers
131 views

Correct usage of MVVM and object for method

I'm writing my first C# Windows Store app and am learning C# from scratch. I'm trying to implement MVVM as I understand it and object orientated patterns, obviously though I'm expecting to be doing it ...
3
votes
2answers
78 views

Creating list ViewModels in the correct way

I'm using Caliburn Micro to create a WPF application. So what I want to do here is a typical Master/Detail situation. I'm displaying a list of Users and you can can add/edit a User and save the ...
2
votes
1answer
1k views

Saving a collection of WPF user control layout into an XPS document

I am making an application to save a layout of user control into an .xps document. But, the export doesn't seem completed if the data is too many. I've tried to encapsulate each part with ...
1
vote
0answers
290 views

Nhibernate repository for MVVM applications

I am developing a single user .net desktop application that lists numerous (over 2000) contacts sorted by an algorithm. I use NHibernate and did consider a session ...
3
votes
1answer
396 views

WPF Binding to a Repository with Entity-Framework

I have an MVVM WPF application that will make use of a repository and unit-of-work. This is my Entity Framework database-first model: ...
15
votes
2answers
2k views

Understanding the MVVM concepts and validation of my code

I have been learning MVVM concepts and trying to implement it in my new project. I want to validate my work that I have been doing these past days. I want to know if I follow correctly the MVVM ...