Questions tagged [wpf]
Windows Presentation Foundation (WPF) is part of the Microsoft .NET framework used to create rich client user experiences for Windows application.
336
questions
0
votes
0
answers
100
views
Is this a good implementation of Dependency Injection using MVVM without any nuget packages?
So I've been looking into dependency injection for WPF while still using an MVVM pattern.
And something that's been incredibly difficult to wrap my head around was, how to create a navigation service ...
0
votes
1
answer
75
views
Copying multiple SQLite database files between two locations
Is this fastest and most reliable way to copy multiple database files (SQLite) from one location to other and overwrite them if they already exists, safely ?
Currently I'm using the below approach :
<...
0
votes
0
answers
145
views
MVVM file lister
I'm in the process of learning C# programming. I wanted to build a simple C# WPF application to practice.
My goals are:
Using WPF with MVVM
Using modern approaches
Avoiding boilerplate code (that's ...
0
votes
0
answers
69
views
Live filtering and sorting of data coming from another thread
Here is the repository with the project
I know that ObservableCollection is not thread safe and I think that blocking the thread where the original collection is, copying it and applying filtering or ...
0
votes
0
answers
273
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....
-1
votes
2
answers
81
views
Using default implementations to superpower flags enums with C# [closed]
I would like to share this post with the community since at first glance it is very promising. Storing flags in the database is something that I have been interested in doing for a while since it ...
0
votes
0
answers
191
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 ...
2
votes
1
answer
296
views
Resilient & Stable TCP Server Polling
I am looking for feedback to perfect my code developed for WPF in terms of speed, stability and resiliency. My code is supposed to handle synchronous status polling as well as asynchronous Commands to ...
4
votes
0
answers
88
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 ...
2
votes
0
answers
282
views
WPF DataGrid Column FIltering using Behaviors
This is the simplest implementation of the 'DataGridBehavior' Class for column Filtering I could come up with:
...
1
vote
0
answers
31
views
User control displaying data which refreshes every 0.125 seconds
I have the following data bindings set up:
...
1
vote
1
answer
408
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
1
answer
379
views
Cash register form
I'm pretty darn new to C# and to be honest in programming.
I'm experimenting on making a cash register type program and I picked WPF because its been recommended as better than Forms when it comes to ...
2
votes
0
answers
752
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
1k
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
...
5
votes
0
answers
66
views
Finding collision between two Images using virtual Rect
I'm making a game. There is a turtle and lots of platforms it can walk on. It walks on its own and you can change the direction it is walking. I implemented a working logic, but I think it can be ...
1
vote
1
answer
81
views
Photo browser WPF app - performance improvements
I'm working on WPF photo broswer app as a personal project. I realise my current strategy for thumbnail handling is poor as I read in the full image each time -- this shows when browsing a folder with ...
0
votes
1
answer
3k
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
1
answer
3k
views
My approach on nested properties that bind to XAML
Here is my simple model.
public class Product
{
public String Name { get; set; }
public int Price { get; set; }
public String Info { get; set; }
}
When ...
2
votes
0
answers
43
views
Refresh the List box with new rooms from the server every 3 seconds [closed]
So i have a server which I send a Request to and it sends me back a list of rooms,Now i made a window for joining rooms and I'm trying to refresh it every 3 seconds but when i use the Timer thread to ...
3
votes
0
answers
732
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 ...
3
votes
0
answers
2k
views
OpenCv webcam streaming class for WPF
My goal is to make a class that wraps the complexity of OpenCvSharp implementation to show a webcam streaming into a WPF Image. ...
4
votes
1
answer
142
views
Shift selection
Basically I have done a code for a project which works with a shift and ctrl selection. The program consists of a chart with specified points, which the user is able to select with the different key ...
2
votes
2
answers
2k
views
WPF login screen and share username and access id across other forms
Goal:
Goal of this application is to sign in using MySQL database and across the forms access the username and access id.
Reason I am sharing the username is for only reason at the moment, is to ...
3
votes
0
answers
585
views
WPF: An implementation of INotifyDataErrorInfo
An abstract base class which derives from the ObservableObject (MvvmLight), implementing the INotifyDataErrorInfo interface.
...
8
votes
1
answer
307
views
WPF BindableProperty<TValue> to Reduce Boiler Plate
I'm sure anyone who has used WPF is familiar with the irritating boilerplate code surrounding properties, usually of this form.
...
1
vote
1
answer
3k
views
scan activedirectory for all users and their groups in domain with c# [closed]
I wrote a method for a wpf app in .net core to get all users and their group by name if they are in a group from my active directory domaine.
...
1
vote
2
answers
196
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...
4
votes
1
answer
151
views
Method that filters a list parameters based on different fields
I have this code which is a callback for Filter in WPF ICollectionView. When I run code analysis, the cyclometic complexity is reported to be 11. I consider this ...
2
votes
2
answers
2k
views
Right way to handle, log and display exceptions
I repost my question here because it has been closed on stack overflow
This question could sound stupid but I am new to the logging, displaying and handling exceptions.
Because before I was just ...
0
votes
1
answer
2k
views
Async collection loading for display in WPF/MVVM
In order to improve UX (User Experience) in WPF for huge collections, I would like to load collection items in asynchronnous and staggered fasion. While the WPF UI is virtualized by default, there ...
3
votes
1
answer
69
views
Fixing Medical Claim Files through Text File Read/Write v3
This is another review on a program I've asked about before, now translated from VBA into C#. I'm sure I've brought over a lot of bad habits with me, so I'm spotlighting some key areas I'd love open-...
5
votes
2
answers
467
views
WPF/C# - Rock, Paper, Scissors Game
I have made my first little project using C#/WPF - a simple rock, paper, scissors game. I am happy with the functionality and look but I would love to know how a more experienced programmer would ...
4
votes
1
answer
2k
views
WPF Custom Control with a Single ObservableCollection DependencyProperty
I'm learning how to write WPF custom controls. My example, NameLister, exposes a single DependencyProperty, Names, of type ...
3
votes
1
answer
1k
views
WPF Extension to directly inject dependencies in the Window constructor
I just finished writing the core for my WPF application and because I'm still a very beginner at software design I wanted to get some feedback about the design decisions I've made.
I've uploaded ...
2
votes
0
answers
354
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 ...
7
votes
1
answer
283
views
Loading BitmapImages out of a Zip file
I'm working on a personal project to get better with C#, and as part of that I have a zip file with 20 or so images saved inside. I want to load those images out of the zip file and display them in my ...
4
votes
1
answer
86
views
More Efficient Way To Search On-Demand
I need better logic that would allow this search to perform quicker and more efficiently.
In XAML, I have a DataGrid and a ...
6
votes
1
answer
746
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 ...
3
votes
2
answers
80
views
Static global settings class with serializing
I have a class that is used for serializing and deserializing global application variables. I would like to know if there is anything that I can improve. I know I could inject a dependency to support ...
6
votes
1
answer
236
views
TreeView class in WPF class
We are converting a WinForms application to WPF. so I need to accept the input like WinForms. As I don't want to change the logic of it. Ao I write the class for those its works. But the is not good ...
5
votes
2
answers
199
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.
...
5
votes
1
answer
317
views
WPF Palindrome Checker Application
I made a WPF Application, called Palindrome Checker, which checks if what you input is a palindrome.
Any and all tips on how to make this code better in all capacities are wanted and appreciated.
<...
4
votes
1
answer
658
views
Factorial calculation UI freezes on loading many items in ListBox
I've been experiencing this performance issue for about 3 days and really need your help. I'm a novice at c# and cannot understand what I can do to optimize my application.
The problem is that the UI ...
-1
votes
1
answer
47
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 ...
1
vote
1
answer
479
views
Simple Desktop Calculator with WPF
I have developed this simple desktop calculator with WPF. Just wondering, what do you guys think of my coding style of this side project and any code refactoring needed to reduce repeat code?
...
8
votes
2
answers
200
views
Non-Entity framework database interaction model
A C# WPF user interface has been developed for the Book Inventory MySQL database previously shown in this question. Since the database had already been developed this was a database first ...
2
votes
0
answers
174
views
Simple Data Entry Application in WPF xaml UI
I made a simple data entry application in WPF MVVM and was just hoping for some input as I am pretty new to WPF . I have done the same application using winforms. Now I have recreated the same ...
4
votes
2
answers
737
views
WPF Bitmap / BitmapFrame to multi-page / multi-frame TIFF with JPEG encoding
I was searching for a long time how to write multi-page TIFFs with the JPEG encoding. TIFFs support JPEG encoded frames but the built-in encoder in .NET Framework does not have JPEG as a compression ...
5
votes
2
answers
4k
views
Simple calculator in C# WPF
I'm beginning to learn WPF and wanted to do a quick exercise. The code is as simple as it gets but I tried to evaluate each and every possible edge case. Any improvement is welcome, thanks.
C#:
<...