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
2
votes
0answers
119 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 ...
2
votes
1answer
88 views

Event based input files management system

I'm currently making a system that can accept different sorts of files and some classes are interested only in specific types of files, while some don't discriminate at all. Note Type of file isn't ...
5
votes
2answers
535 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 ...
4
votes
0answers
4k views

WPF CustomControl Image Button that changes with state and does not use ControlTemplate

Note: See Verticle WPF icon button that used Segoe MDL2 font for icon for an example using Segoe MDL2 for the icons. I need a button that changes appearance based on the state of a Boolean. A ...
2
votes
2answers
835 views

Handling FTP exceptions like no internet etc

I'm currently working in a project where the user needs to log in and after that I will check if the directory /cloud/user/Projects exists and if it doesn't, I will create them. The code works, ...
1
vote
0answers
66 views

Tiny app to track working time on Jira tickets

I'm a .NET intern. For my project management we work with Jira and we have to track real working time on a ticket to log the work and compare it to the original estimate. For this purpose I have ...
1
vote
0answers
226 views

A ViewModel build with ReactiveUI 8 to get web images

This is a practice application that I built to learn Rx.Net & RxUI. It follows the MVVM pattern and is written in C# with WPF. Here is a link to a question I asked during the development, which ...
0
votes
1answer
5k views

WPF button with xaml-defined icon that changes with state

I needed a button with text and icon that did two things: Text and icon went grey if the button was disabled. Icon changes depending on Boolean property (e.g. connected / disconnected). For the icon ...
-1
votes
1answer
130 views

I need help to simplify this code [closed]

I have a code like this but the problem is that is very inefficient (2000 lines) and I don't know how to make it simple, I have this code too when the RacePosition variable is 1, 2, 19, 20. I would ...
4
votes
1answer
5k views

Updating WPF image from camera frame grabber thread

I have created a WPF application in .NET 4.6.1. to display video from the frame grabbing event for a machine vision camera. In XAML there is an image control bound to a WriteableBitmap ...
-1
votes
1answer
76 views

Open/Close Principle in front GUI element [closed]

I'm working over project for my studies. It's a simple program about brewing coffee. I'm thinking about solution for showing single parameter in GUI. I have a source brew parameter class: ...
2
votes
0answers
962 views

Prism find active/existing ViewModel

I was facing an issue where I want to retrieve existing/active ViewModels from the Prism runtime. Here's the code I've done to achieve it: ...
1
vote
1answer
940 views

Combobox with multiple itemssources MVVM

I'm trying to make a list of either customers or suppliers based on a radio button. I have a solution that works but I want to know if it is a correct solution to work with the MVVM-model. Next to ...
0
votes
1answer
2k views

Improving CollectionView Filter Speed

I have around 350 People loading into a CollectionView and am already noticing some lag when filtering on their ...
2
votes
2answers
1k views

C# Extending the DispatcherTimer - Intermission timer

I'm working on a WPF project where a timer with Pause/Resume functionality is required. The standard Windows.Threading.DispatcherTimer doesn't offer that, so I ...
-1
votes
2answers
3k views

Set Label content and make it disappear after 5 seconds

Let's say I have a label and a button. If I click the button, the label is set to some text, say "hello, world!", and after 5 seconds, it should disappear. Easy enough, right? I have the following ...
3
votes
0answers
335 views

Media player in WPF - Event binding

I recently started making a media player, this is the first time I'm using WPF and I found that most project are utilizing the MVVM architectural pattern, I haven't used that one either but I decided ...
2
votes
1answer
580 views

TPL Task tracker which keeps track of tasks

This class keeps track of tasks which are added and tries to remove them after certain delay. I tried doing it with CustomTaskScheduler but didn't get much in return. Here is my related question on ...
2
votes
0answers
165 views

Fractal renderer in WPF

This was made mostly for fun, but also to practice. I'm generally looking for feedback on how to make the code run faster, any obvious mistakes I'm making in regards to using WPF, which I'm not at ...
1
vote
1answer
1k views

Xaml Wpf Snake game

I'm doing a game in Xaml WPF and I didn't really choose the tools and languages. It's to be hidden in a really big app with a lot of code. The whole snake takes place in a simple xaml canvas and xaml....
6
votes
1answer
2k views

Sorting ListView Columns

I use these codes to re-order columns in a ListView in ascending or descending order: ...
1
vote
2answers
78 views

Filter a list based on some ComboBoxes

So I have a grid with data and above that grid 2 comboboxes, the grid will be filled with data based on the selected values from the comboboxes. This works but can you do it way easier like I did? <...
2
votes
2answers
225 views

C# page creator - best practices, improvements and dynamically calling classes

I'm a self-taught programmer and I've recently started working as a junior developer. Unfortunately I'm also the most experienced member of the team due to my employers unwillingness to pay senior ...
4
votes
2answers
2k views

Rendering a heat map for 400.000 points

I am trying to draw a heat map with a given input of points and amplitude of each point. The normal input size is around 400000 points, but the code draws every 15th point. The map is drawn onto a <...
4
votes
1answer
5k views

Change UI display order of an ObservableCollection

I have an ObservableCollection that is filled with custom elements of type Video runtime. These have the properties of Name, Rating and Number of Viewers. I want to ...
3
votes
1answer
3k views

Correct use of MVVM and MouseEvent Handling

My XAML looksl ike this: ...
13
votes
1answer
3k views

Detecting UI thread hanging and logging stacktrace

I have an application that needs to always be responsive. I've written a class that is designed to monitor the UI thread. The goal is to provide useful information in the logs to be able to understand ...
4
votes
1answer
165 views

Displaying tweet from Twitter API using TextBlock Inlines

I'm fetching tweets from the Twitter API and display them in a TextBlock using multiple Inline elements so that I can highlight (...
2
votes
0answers
199 views

Control for displaying error messages

I am working on a WPF application consisting of a tree view and multiple "view parts" that display details about the selected node. The content of the view parts are loaded asynchronously which may ...
3
votes
2answers
5k views

Using SQLite in WPF Project

I am new to WPF and SQLite. I want to use a SQLite database in my project for managing accounts. I create a helper class for the SQLite connection and CRUD operations, which I initialize in my ...
2
votes
1answer
2k views

Saving WPF DataGrid changes to Entity Framework

I feel like I had to invent a whole new way to do this because I couldn't find anything that did this the way I wanted to... The basic process involves reading changes to cells and capturing ...
1
vote
1answer
487 views

C# Events in a Tic Tac Toe game

I am new to coding and am trying to understand events what is an annoying stage but super important I guess. I just made a Tic Tac Toe game and it is working but not really "beautiful" coded. I really ...
6
votes
1answer
160 views

Processing input in background while user is typing

Use case A GUI with 2 controls: An input control for text (a DNA sequence) that should be analyzed A result control that displays the analyzing result of the entered text The analysis takes 2-3 ...
3
votes
2answers
95 views

Display information returned from feedservice and SQL querys on WPF window

The class file below handles the display of information to a WPF window. In its current state it works except for the fast it takes 2 minutes for the window to open because of the SQL query's and ...
0
votes
1answer
3k views

Simple MVVM Create, Update, Delete Records using WPF [closed]

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. The default namespace to all classes as <...
1
vote
0answers
379 views

WPF “Glowing” button user control

I have created a "wrapper" for a button that "pulses" until the user presses the button. The implementation that I came up with is below, but I'm sure there's a better approach. ...
10
votes
2answers
963 views

CommandBinding refresh on parameter changed

I need the command I am executing on a datagrids context menu to know which column was clicked on. XAML ...
3
votes
1answer
2k views

Add controls to a canvas and scale their measures relative to it

I have some code which adds components to a canvas at runtime, WPF application. The user enters some values which translate to the amount of controls to be added and where. There is one canvas which ...
4
votes
1answer
1k views

Action<Object> callbacks using the mediator method

I have a WPF project which uses XAML and C#. It adheres (as best as I know) to the MVVM methodology. As part of it, I have used a mediator class (the 'Gang of Four' design). You register for ...
1
vote
0answers
2k views

Using IoC Container with Entity Framework Repository Pattern

I am using WPF with Entity Framework 6 (DB first), Caliburn.Micro, and MEF. I am trying to ...
11
votes
1answer
2k views

Simple Tic-Tac-Toe Application in WPF

I made a Tic-Tac-Toe game in WPF and was just hoping for some input as I am pretty new to WPF and I am still a student so I'm sure that my C# code in general may be lacking XAML: ...
5
votes
1answer
484 views

WPF Multiscreen Media Application

Information I have a Multiscreen Application written for a Client that basically is displaying Video content with MediaElements bind to a ContentControl on 5 Screens horizontally(5 splittet Videos). ...
0
votes
2answers
1k views

Using “Lookup Logic” in a WPF Converter (vs extra properties in “model” classes) [closed]

There seems to be a point of contention on my project team regarding what method should be used when trying to display something about an object that requires "lookup-logic". Namely, should their be a ...
2
votes
0answers
830 views

Hotkey-System for command-based WPF applications

I wrote a Hotkey-System for command-based WPF applications. Could you please take a look at my code (even if it consists of multiple classes :P). I am mainly interested in following things: How ...
4
votes
2answers
2k views

MVVM Navigation WPF

Currently, I'm trying to learn every aspect of the MVVM design pattern. So basically I've written a little WPF App where I'm trying to understand Navigation in MVVM, the app has one MainView wich ...
6
votes
1answer
249 views

View-model for a WPF UserControl that validates regular expressions

I've created a small User Control library in WPF that contains a few GUI widgets that allow users to enter regular expressions. The widgets provide visual feedback when the user has entered an invalid ...
7
votes
3answers
855 views

Optimize WPF application (2 WPF Windows and a huge mess)

Right now i have a WPF application supposed to display some media into a WPF Window, from actions in another WPF Window ( for example : you write text in a textbox, you click on a button, and the text ...
1
vote
1answer
41 views

Declarative DependencyProperety registration

Most properties have simple requirements so it should be possible to register their Dependency Property fields declaratively. I made a small experiment and it seems to work just fine. The first ...
4
votes
1answer
104 views

Making Dependency Property registration strongly typed v2

This is my second attempt to create a strongly typed builder for the Dependency Property. I've improved the two main weaknesses of the previous version which were: Can specify only ...
3
votes
1answer
632 views

Making Dependency Property registration strongly typed

I've been working on another builder, this time for the DependencyProperty because it's object-based. This means that every ...