Questions tagged [wpf]

Windows Presentation Foundation (WPF) is part of the Microsoft .NET framework used to create rich client user experiences for Windows application.

Filter by
Sorted by
Tagged with
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....
user avatar
-1 votes
2 answers
75 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 ...
user avatar
  • 199
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 ...
user avatar
  • 121
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, ...
user avatar
2 votes
1 answer
98 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 ...
user avatar
0 votes
0 answers
60 views

Sort Data in Categories to display in Treeview

I import a list of objects from an JSON file and want to display it in a WPF TreeView Control. The Data looks like this: ...
user avatar
  • 21
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 ...
user avatar
  • 141
2 votes
0 answers
121 views

WPF DataGrid Column FIltering using Behaviors

This is the simplest implementation of the 'DataGridBehavior' Class for column Filtering I could come up with: ...
user avatar
1 vote
0 answers
30 views

User control displaying data which refreshes every 0.125 seconds

I have the following data bindings set up: ...
user avatar
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, ...
user avatar
2 votes
1 answer
130 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 ...
user avatar
  • 21
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 ...
user avatar
  • 121
2 votes
0 answers
320 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 ...
user avatar
  • 53
5 votes
0 answers
59 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 ...
user avatar
1 vote
1 answer
73 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 ...
user avatar
  • 63
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 ...
user avatar
3 votes
1 answer
2k 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 ...
user avatar
  • 327
2 votes
0 answers
32 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 ...
user avatar
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 ...
user avatar
  • 41
3 votes
0 answers
1k 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. ...
user avatar
4 votes
1 answer
99 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 ...
user avatar
2 votes
2 answers
956 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 ...
user avatar
  • 53
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. ...
user avatar
  • 215
8 votes
1 answer
263 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. ...
user avatar
  • 83
1 vote
1 answer
2k 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. ...
user avatar
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...
user avatar
4 votes
1 answer
146 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 ...
user avatar
2 votes
2 answers
1k 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 ...
user avatar
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 ...
user avatar
  • 143
3 votes
1 answer
65 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-...
user avatar
5 votes
2 answers
391 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 ...
user avatar
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 ...
user avatar
  • 161
3 votes
1 answer
899 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 ...
user avatar
  • 141
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 ...
user avatar
7 votes
1 answer
230 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 ...
user avatar
4 votes
1 answer
82 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 ...
user avatar
  • 51
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 ...
user avatar
3 votes
2 answers
77 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 ...
user avatar
  • 205
6 votes
1 answer
223 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 ...
user avatar
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. ...
user avatar
5 votes
1 answer
279 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. <...
user avatar
  • 51
4 votes
1 answer
586 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 ...
user avatar
-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 ...
user avatar
  • 81
1 vote
1 answer
324 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? ...
user avatar
1 vote
0 answers
64 views

Chaining asynchronous calls to update UI [closed]

In an app the UI is updated from different threads. To queue this, I have created a utility class ...
user avatar
  • 119
8 votes
2 answers
180 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 ...
user avatar
  • 18.5k
2 votes
0 answers
126 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 ...
user avatar
  • 21
4 votes
2 answers
580 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 ...
user avatar
5 votes
2 answers
3k 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#: <...
user avatar
12 votes
1 answer
4k views

Linq for ObservableCollection

Purpose ObservableCollection<T> is not strictly a WPF class, but its intended purpose seems to be for use in WPF. It's the standard implementation of ...
user avatar

1
2 3 4 5
7