Skip to main content

Questions tagged [wpf]

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

29 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5 votes
0 answers
77 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 ...
innominateArt's user avatar
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 ...
Ole M's user avatar
  • 141
4 votes
0 answers
477 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 ...
Denis's user avatar
  • 8,458
4 votes
0 answers
5k 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 ...
geometrikal's user avatar
4 votes
0 answers
3k views

WPF MVVM Dialog with Prism, MahApps.Metro

I am building a Metro-themed WPF application with MVVM approach using Prism and MahApps.Metro. I have to show a custom dialog from view model. Currently, I am using ...
Lucius's user avatar
  • 141
4 votes
0 answers
223 views

Swapping Tab Order

The code I have below swaps two tabs around. This is done through creating an array, deleting all tabs and then recreating them which seems very inefficient to me. ...
RedLaser's user avatar
  • 277
3 votes
0 answers
1k 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 ...
EricNie's user avatar
  • 41
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. ...
user avatar
3 votes
0 answers
777 views

WPF: An implementation of INotifyDataErrorInfo

An abstract base class which derives from the ObservableObject (MvvmLight), implementing the INotifyDataErrorInfo interface. ...
Kostas K.'s user avatar
  • 215
3 votes
0 answers
307 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 ...
Denis's user avatar
  • 8,458
3 votes
0 answers
484 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 ...
Denis's user avatar
  • 8,458
3 votes
0 answers
372 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. ...
JammoD's user avatar
  • 255
3 votes
0 answers
268 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 ...
Matt S's user avatar
  • 41
2 votes
0 answers
518 views

WPF DataGrid Column FIltering using Behaviors

This is the simplest implementation of the 'DataGridBehavior' Class for column Filtering I could come up with: ...
AYOUB BOUSSAID's user avatar
2 votes
0 answers
895 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 ...
Jack Dane's user avatar
  • 121
2 votes
0 answers
2k 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 ...
DeveloperLV's user avatar
2 votes
0 answers
392 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 ...
Notts90's user avatar
  • 141
2 votes
0 answers
206 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 ...
Vini's user avatar
  • 21
2 votes
0 answers
2k 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 ...
epalm's user avatar
  • 121
2 votes
0 answers
515 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 ...
Mycroft Holmes's user avatar
2 votes
0 answers
305 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 ...
mwryl's user avatar
  • 144
2 votes
0 answers
2k 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: ...
Shimmy Weitzhandler's user avatar
2 votes
0 answers
282 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 ...
Torn's user avatar
  • 121
2 votes
0 answers
404 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 ...
JanDotNet's user avatar
  • 8,538
2 votes
0 answers
1k 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 ...
Artery's user avatar
  • 121
2 votes
0 answers
200 views

Keep clean SimpleIoc initialization when reusing UserControl

Originally I had ChildUserControl inside ParentUserControl inside MainWindow with this view-...
Sam's user avatar
  • 143
2 votes
0 answers
225 views

BackgroundWorker in WPF executing multiple methods

I've implemented a BackgroundWorker in my WPF app. My code is pretty ugly though. I've been told to write as little as redundant code as possible. IS there some generic Method I could employ to reduce ...
Fang's user avatar
  • 535
1 vote
0 answers
32 views

User control displaying data which refreshes every 0.125 seconds

I have the following data bindings set up: ...
Ollie Sharratt's user avatar
1 vote
0 answers
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 ...
Sabyasachi Mukherjee's user avatar