Category "wpf"

Getting index of selected item in a ListView while WPF MVVM pattern is used

I want to get selected Item from ListView. My view is: <ListView Name="StudentGrid" Grid.Row="1" Margin="1,1,1,1" ItemsSource="{Binding studentList}" Selecte

Blocking main thread with SemaphoreSlim until background event arrives

Yes, I know, there are tons of threads on this topic. I read a lot of them and used them often (more or less) successfully. Now I got an old DLL (programmed in

WPF - Cannot change a GUI property inside the OnChanged method (fired from FileSystemWatcher)

I want to change a GUI property in the OnChanged method... (in actuality im trying to set an image source.. but used a button here for simplicity). This is cal

Change to array triggers change in other object

I am currently working on a chess game and I want to implement a Redo button. The way i am doing this is, that the I have a list of GameStateContainer class whi

MVVM Bindings doesnt update with PropertyChanged

All my bindings are not updated and I don't understand why My Model is: Public Class TestModel Implements INotifyPropertyChanged Public Event PropertyC

How to get focused window handler

I have a WPF custom virtual keyboard application. I need to host this WPF application as standalone and user should be able to use this to enter values for any

My C# WPF webscraper returns error when more than one result is found

I am working on a WPF XAML application that scrapes certain websites for products. I have the search part working and it finds what I'm looking for. But as soon

WPF two-way binding does not work for checkboxes inside a combobox

I've tried lots of solutions online but I still get this issue. I have a combobox whose item source is a list of customized class. Each element in the source is

WPF Scrollbar missing - There is no scrollbar shown in the inner listbox inside another list box

In my example, I have a list box (CommentsList). Every item in the list has another inner list ( repliesList). When I have have some commens the vertical scroll

Edit Datagrid in WPF

How I can provide ComboBox to a particular DataGrid Column in wpf when user tries to edit data grid . For example user can change the Operator at run time from

Suppress error Powershell not catching additional error when opening a WPF application

I'm trying to write 'Windows Powershell' command to simply open an application (DaxStudio). These are the options I've tried: Start-Process "c:\Program Files\DA

DockPanel Dock Top element to be scrollable while Dock Bottom does not get hidden

Issue: Creating a DockPanel with Top with flexible height scroller and bottom element. <DockPanel> <Scrollview DockPanel.Dock="Top" height="150">

The XAML Designer has exited unexpectedly. (Exit code: e0434352)

Xaml Designer keeps crashing, more info: Error The XAML Designer has exited unexpectedly. (Exit code: e0434352) Visual Studio Specs: Microsoft Visual Studio Pr

How do I fill a datagrid in my View with my datatable in my ViewModel

I am working on an MVVM WPF Application managing Users. I want to display all users from the Users Table in a datagrid in my UsersView. Here is my dataGrid

WPF Control lagging behind children WebView2 control

I am trying to make a draggable window sort of thing in wpf (.net core 6) and I am using webview2 to make a browser window. However I discovered this strange be

Textblock Runs Binding perfomance

(Sorry, google Translate) I'm writing a WPF chat and I'm running into a Textblock.Inlines binding performance issue. The problem occurs when switching tabs TabC

Coloring the first and last rows in a datagrid WPF C#

Can you guy tell me a great way of coloring the last row in a datagrid in WPF, I have to color the first and last rows, I found a way to do the first one by doi

How to change a property of a specific element in a DataTemplate from code behind?

I have a bug in my code. FindChild<T>() is searching a Element which is named "PasswordTextBox" but because "PasswordTextBox" is in the DataTemplate there

How to perform a correct binding using wpf MVVM

I'm working on a bank application in c# wpf using the MVVM pattern which allows a manager in charge of a branch to display the data of one of the customers of t

containing type does not implement interface 'IComponentConnector'

For some reason visual studio will not compile the below code. I am on .NET 6 WPF. Has there been any breaking changes that doesn't allow me to extend System.W