Windows Presentation Foundation (WPF) is part of the Microsoft .NET framework used to create rich client user experiences for Windows application.
3
votes
1answer
51 views
Managing documents with manager class
So I have a program that visualizes data from files (csv,txt,etc.). These files are saved to database as individual tables. In my application I have DocumentExplorer...
5
votes
5answers
255 views
Another DataGrid (ObservableCollection) Filtering Method
I have re-written my DataGrid filtering method to try to improve performance and I feel that although this is the fastest yet, there is still room for improvement ...
6
votes
1answer
67 views
MP3 tag Project in MVVM style
After reading the books "Clean Code" from Robert C. Martin and the "Head First Design Patterns" book from Elisabeth Robson I decided to make a mp3 tag application.
I tried to do it in the MVVM style ...
2
votes
1answer
59 views
Trying MVVM on timer app
Check me:
Model should do everything. That's where all functionalities and features are accommodated. It has some properties, that I can access and use. ...
7
votes
1answer
161 views
A Binary Editor with Live Text Preview
This is a tool I needed for some other things (it's incomplete, but almost done) which is essentially just a text-editor that has two text-boxes: the left being the binary view / raw bytes, the right ...
2
votes
1answer
59 views
Synesthesia for the rest of us (i.e. algorithm for unique string colorization)
I'd like to form an algorithmic connections between a particular string and and a particular color, in such that each unique string is always the same color.
My particular use case is for a kiosk ...
1
vote
0answers
43 views
XML settings file read/write Design Patterns [closed]
I'm new to C# and would like to create a WPF app with xml config file. I have a certain setting file written by using System.Xml.Linq;.
And I'd like to write ...
3
votes
2answers
69 views
Catching exception inside model
Is it normal to catch exception in concept of MVVM inside model? Or how should it be? How to improve this code?
This is simple application that allows user to drop .pfx certificate on the label. <...
2
votes
1answer
112 views
MVVM - ObservableCollection & Entity Framework DbContext
I'm trying to catch WPF using MVVM pattern, where my set of models is implementing ObservableCollection as well as Entity Framework's ...
2
votes
1answer
76 views
WPF controls visibility throught IMultiValueConverter
I have control with RadioButtons.
Each RadioButton represent some state of document. Each document have a lot of labels, buttons and another trash.
I need to ...
2
votes
2answers
128 views
A list of students using MVVM
Is this a proper MVVM implementation? I copied it off a sample but the source would not open so I have to put stuff in spots? Should I call in different files? My first MVVM and have trouble with the ...
5
votes
6answers
544 views
Shuffles male or females names based on Fisher Yates algorthim
The code below has many Lists<> but I'm not sure how to modify it. The only thing here that is an algorithm is the Fisher Yates shuffle algorithm. I am trying ...
1
vote
0answers
37 views
Keep clean SimpleIoc initialization when reusing UserControl
Originally I had ChildUserControl inside ParentUserControl inside MainWindow with this view-...
4
votes
1answer
117 views
Using Mutex to prevent multiple WPF application launches
I've inherited an existing application which is a WPF implementation of toast notifications. This application is installed to multiple client PCs across the estate and, once installed, runs in the ...
2
votes
1answer
80 views
Invoke model logic in one UserControl from view-model in another UserControl without violating MVVM
I am developing WPF application keeping MVVM and using Prism. Here is simplified scheme:
I need to invoke model logic in UserControlResult when executing command ...
2
votes
1answer
81 views
PDF conversion and timestamp tool
Since the last post, I have ported it to WPF (semi-MVVM) and added support for Excel and PowerPoint files, and custom fields and scripts.
The conversion is done by interop with office. Apparently ...
2
votes
1answer
94 views
WPF object model control with singleton and static messenger? ConditionalWeakTable?
As always first I have to say that I'm an amateur and not native English speaker, so please have a little patience if I write nonsense ;)
I've worked as an accountant for more than 10 years and since ...
4
votes
1answer
85 views
ViewModel base class supporting property notification, error notification and property value history
I've created a general purpose ViewModel base class in what I believe it's purest
behaviour. It features property notification, error notification and property value history. Please take a look at it ...
5
votes
2answers
75 views
ListBox with a dynamic number of TextBox elements
I am making a kind of form, and I want the user to be able to enter a dynamic number of string inputs. The idea is that a single TextBox will be displayed, and once ...
1
vote
1answer
80 views
WPF Mvvm async function ViewModel
I worried about this code in a ViewModel. ViewModel shoud not contain any code exept binding's. But without async update ui should stuck. How to improve it? The main problem that this is need to be ...
3
votes
0answers
52 views
WPF Prism DelegateCommand Setup
I am currently in the process of learning WPF Prism and I have four buttons that I want to all go to the same place but with a different value being passed depending on which button has been pressed.
...
5
votes
1answer
90 views
Find a value in a comma delimited String
Here is a simple WPF converter method designed, where the object is a string, and the parameters are a string, which contain a set of comma separated values. The program return true if the list has ...
2
votes
1answer
142 views
WPF: Model to View Model data binding to implement Two Step View
I am trying to use Two Step View pattern in WPF. The problem is about keeping things in sync – I need a way to data-bind models to view models. Are there any good existing solutions? My approach is to ...
4
votes
1answer
56 views
Many similar ViewModel methods to fetch and prepare model data
I have a MVVM application that fetches data from active directory and displays it in a DataGrid. The exact data displayed is determined by which query a user runs, ...
4
votes
1answer
149 views
Active Directory Tool - Wpf application to query active directory and display results 2 (UI)
This is an update from here. I have made some changes, and have decided to only include the UI side of things in this particular question. I wanted to make the application follow the MVVM pattern, but ...
3
votes
1answer
60 views
8
votes
1answer
309 views
Active Directory Tool - WPF application to query active directory and display results
This is a Windows Presentation Foundation application that queries active directory and can display lists of users, users by group, groups, and users by manager (direct reports). It operates on ...
7
votes
2answers
214 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 to ...
4
votes
2answers
86 views
Code Explorer UI
The third post in the Code Explorer series is about the UI and main VM.
This is the XAML, except a few hundred lines of styling:
...
3
votes
1answer
64 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
216 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 ...
0
votes
0answers
69 views
User control wpf can't create by myself
I need some help with this control. I've created this but I don't like how I have done it. Could somebody review my xaml code and give me some advise how can I improve it?
The control I have to ...
1
vote
1answer
93 views
Slow Filtering Method on DataGrid
Sometime ago I asked a question regarding a slow Filtering method for my DataGrid. Months later and I have a relatively quick method, though I am still looking to ...
2
votes
2answers
606 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 ...
3
votes
1answer
1k views
WPF/MVVM with Entity Framework, Repository and Unit of Work pattern
I'm building WPF/MVVM application and I'm struggling implementing Unit of work pattern.
The part, about which I'm not sure is UnitOfWork class. Here is my thought:
...
7
votes
1answer
169 views
Creating interactive tours for WPF applications
I am developing a WPF component that can be used to create interactive tours for WPF applications. To further improve the API in terms of usability and intuitiveness, the input of other developers is ...
10
votes
5answers
315 views
Setting user permissions, where certain permissions imply other permissions
The purpose of the class is to set permissions for a user. These include delete, download, upload, view, etc. These properties often depend on other properties, and setting them has side effects.
For ...
1
vote
0answers
41 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
2answers
386 views
Simple Tic Tac Toe
I have written a simple Tic Tac Toe game in WPC C#. I am just a beginner and learning. Could you tell me if there is something wrong with my code / could be done better? I am pretty much satisfied ...
1
vote
0answers
41 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 ...
6
votes
1answer
112 views
Eraser tool for GIF editor
I am making a GIF editor in C#, and I am currently working on the eraser tool. I am not sure what I can do to make it more efficient, because when I make the thickness (diameter) more than 30 (pixels) ...
3
votes
1answer
137 views
Implementing a filter
I have implemented a filter for filtering a IEnumerable of a specific type.
To accomblish this goal i have created three classes: ...
1
vote
0answers
122 views
Automatically close popup after a certain period of time
There is a Popup in my application which I want to close automatically after a certain delay. And I want to have an attached behaviour which I could turn on/off and ...
5
votes
1answer
127 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
510 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 ...
6
votes
1answer
102 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 ...
2
votes
1answer
74 views
Helper method to find VisualChildren of multiple Types
I created an helper method to return a List of UIElements where the returned elements have to match with one of the ...
1
vote
0answers
173 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
3answers
397 views
Extracting Excel data out of an existing Excel file
I've made a method to extract Excel data out of an existing Excel file. It contains 3 tabs where info should be extracted from. The data should be stored to use local so it's always fast available. It ...
3
votes
1answer
84 views
Uploading .dll files to a local computer
I have created a simple application that has grown a little bit. Though most likely it won't grow anymore, I have looked back and I realized that it has become a little monster in terms of how many ...