Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [wpf]

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

-3
votes
0answers
18 views

I made wpf calendar [closed]

i made wpf calendar. i wanted to save data to use sql-lite.But it didn't work. Control ...
1
vote
1answer
91 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? ...
1
vote
0answers
48 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 ...
5
votes
1answer
62 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 ...
1
vote
0answers
23 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 ...
3
votes
2answers
97 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
2answers
243 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#: <...
11
votes
1answer
393 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 ...
2
votes
0answers
222 views

MVVM Databinding, Commands, Async - MVVM.Light [closed]

I'm new to C#, WPF and MVVM and I don't want to make common mistakes right from the beginning and get used to them. I already read some similar questions on best practices for WPF/MVVM but none of ...
1
vote
0answers
120 views

Setting the Owner property on a modal dialog in WPF/MVVM using a Func

I'm looking to solve the problem of setting the Owner property on modal dialogs in WPF, while using IoC and MVVM patterns. I've seen (and written) all sorts of ...
1
vote
1answer
75 views

WPF Content Navigation and Button management

I have been working on my first ever C# project and I'd love some feedback of the any and all aspects variety. I am building a game called Fleet Command. In the ...
2
votes
1answer
195 views

Vertical WPF icon button that uses Segoe MDL2 font for icon

This is a button that changes text and icon according to a Boolean state. for example, a play / pause button or a connect / disconnect button. The icon uses Segoe MDL2 Assets as the default font, but ...
4
votes
1answer
789 views

Concurrent observable collection

I'm working on a WPF 4.5 desktop application that has several nested collections with the following key aspects: writes mainly from UI thread, but also from worker threads writes are relatively ...
7
votes
0answers
429 views

Markdown Display in WPF

I wanted to display a markdown document in WPF sensibly without relying on an HTML rendering system. I wrote a control based on the RichTextBox, and used Microsoft'...
1
vote
1answer
102 views

Addition Program using wpf through MVVM

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. I have created a simple addition ...
3
votes
1answer
109 views

Processing a large list of strings

I am working on an application in C# WPF which reads a large file containing a number of HL7 formatted reports. My application takes in the file, reads and extracts any lines that starts with OBX and ...
1
vote
1answer
78 views

Parsing displayed month/year for calendar

I have a 6 x 7 grid for a calendar = 42 DateTimes. I'm trying to display the displayed month/year at the top of the calendar. If there are 3 months displayed, I ...
8
votes
0answers
89 views

Visual Studio exception visualizer for lengthy exception messages

I use Autofac a lot and for everything and when you make a mistake and forget to register a dependency etc. it'll tell you exaclty what's wrong. Although its ...
3
votes
1answer
144 views

Snake Game Library for WPF

Recently, I had a sick leave and to had some fun and improve coding skills I got a challenge to write a Snake Game for WPF. Desired RESULT 1) Game must be in separate .dll library; 2) Must have ...
1
vote
1answer
147 views

MVVMLight Toolkit Data Binding Technique

I'm simulating my real-world application by using a really simple demo app here, but it has the same concept. The question is MVVM Light Toolkit specific, as the ...
5
votes
1answer
135 views

Accessing View from ViewModel

Having a view (grid control) that provides some functionallity via methods (primary SerializeView / DeserializeView) that should be called from the view model which is bound to the view. One point to ...
-1
votes
1answer
64 views

Model Exposure with MVVM [closed]

I have been starting to learn MVVM to give my WPF projects better structure. I have to sample classes, DeviceModel and ...
4
votes
1answer
812 views

Loading a XAML file related to a control programmatically?

I'm trying to have a custom WPF control whose content is defined in XAML but avoiding the use of a UserControl. This is because a UserControl makes it impossible to ...
5
votes
2answers
140 views

Filter Producs by any property

I have Products table which looks like this: I have some data in this table and I want to filter it depending on this columns (Filtering with columns type of string isn't problem). For this I have ...
0
votes
1answer
128 views

Saving ResourceDictionary theme

I have the following command bonded to my button, It's supposed detect the current used theme and change it (Dark or Light). ...
11
votes
4answers
2k views

Countdown control with arc animation

I've implemented countdown timer control with arc animation that looks like this Implementation notes: For arc visualization I've created class Arc derived from <...
5
votes
2answers
5k views

Rounded borders for different controls (Button, TextBox, ComboBox) via Attached Property

Suppose you just want to set border radius for different controls: Button TextBox ComboBox ...
2
votes
0answers
213 views

Switching between ViewModels using IoC in a MVVM WPF application

I have a project that uses Caliburn.Micro to implement the MVVM pattern. For IoC, I am using MEF. All the ViewModels are marked ...
2
votes
1answer
114 views

A simple TicTacToe

A simple game of TicTacToe. Please review for style and other. Is this a proper ViewModel? ...
6
votes
2answers
8k views

Task timer async

I had been still using BackGroundWorker and decided to learn async Task. My test project is a simple timer that can be canceled. The target project is to read instruments with a delay for sampling. ...
3
votes
0answers
178 views

Media player subtitles in WPF - Part 2 Handlers and notifications

This is a continuation of Part 1. In this question I will present you with a single class which is the most crucial component of the whole system, it's responsible for firing notifications whenever a ...
4
votes
1answer
511 views

Media player subtitles in WPF - Part 1 Processing and storing

I'm writing a media player in WPF and since movies are playable, subtitles are a must. Here's what it looks like so far: On the left is the settings tab, in the middle is the actual player and on ...
0
votes
1answer
150 views

Filtering DbContext data dynamically by user input in WPF applications

I need to filter database data based on filters available to the end user in the form of search term text box, select boxes etc. I have put together this code and need feedback if this is a good way ...
4
votes
3answers
509 views

ListBox async filtering, cancelling previous task on filter update

I'm trying to come up with a nice way of filtering a ListBox asynchronously, to keep the UI responsive. The filtering gets fired off asynchronously each time the ...
5
votes
1answer
469 views

Complete ObservableDictionary

In conjunction with a recent question of mine, I found that an ObservableDictionary would be very handy for my situation, so I decided to implement one. I've ...
3
votes
1answer
143 views

Object pooling in WPF

In a WPF project I'm working on, often multiple objects reuse the same AnimationTimeline, to smooth that out I made an ...
-3
votes
1answer
76 views

Initializing commands C# [closed]

...
2
votes
0answers
107 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
425 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
3k 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 ...
1
vote
1answer
601 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
62 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
205 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
126 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 ...
3
votes
1answer
4k 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
75 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: ...
1
vote
0answers
763 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
749 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 ...