How to load in a Bitmap from a canvas
My problem is to load a Bitmap (for retrieving his pixels) from a canvas used to draw a image. So I need to have a Bitmap from a image drawn on a screen in a canvas. This because Bitmap has the command GetPixel(). the canvas has no similar statement…
How to avoid flickering of background color of second window(w2) and directly show running mediaelement embedded in it. This Second window(w2) is called from main window w1?
I have a main window w1. I create a window w2 with initial visibility as hidden. I added a mediaelement inside w2 and added a media source to play. As soon as media source is opened i want to make w2 visible on w1. w1 is also visible but it is…
DataGrid is Not Updating Properly
I have a DataGrid that should display a new item when it is added to the ItemsSource but that is not happening and I can't see the error. The XAML: <DataGrid x:Name="dgTimes" ItemsSource="{Binding…
WPF rendering issue on any machine
Please follow this steps to catch problem on your machine. Please, help me resolve it. Create empty WPF project. Use property CacheMode="BitmapCache" in MainWindow's Grid; Show MainWindow on start application, then hide it. Show new any…
WPF/XAML Add Item not working in C# Library Shared Project - VS 2022 V17.6.3
I am working on a .net 4.8 c# library project and I am using a Shared Project within it to help with versioning. When I attempt to add a WPF User Control under the shared project, it is not an available template. If I create it under one of the other…
Fill and remove elements at any time, asyncronous mode.
Hello, I receive data as a string, packed in json format. I can receive the data at any time. I would like to work through the data step by step. At the same time, I may remove a row of data and then add new data. How can I avoid collisions and…
UserScopedSetting Data Store Location
I have a WPF .NET Framework 4.7.2 app that uses the UserScopedSetting attribute class to save custom settings to the users AppData\Local folder. On my development machine, the path to my user.config file looks like the following:…
How to fix storyboard moving tile within column
In working in visual studios storyboard- I am unable to move a tile within a column- but I can move it across different columns. If I wanted to move a tile up in the column- it is not allowing me. It appears to move when I drag it but then goes back to…
Displaying Files of Unknown Types Stored in SQL Server Using C# WPF
I am developing a C# WPF application using .NET 6 in Visual Studio 2022, with a SQL Server 2008 R2 database. My database contains a table GRADE_CUST_GRP with a column GCPS of type image, where files of various types are stored without any file extension…
How do I implement a "mouse double click" for a ListBox?
This xaml code attempts to implement a "mouse double click" for a ListBox "list of cities". xaml <ListBox x:Name="gLBxCities" Margin="10,0,10,10" Foreground="#0000FF" > xaml.cs private The…
Can you help us solve crashes in DataGrid WPF?
We are experiencing crashes in particular environments on customer sites in our WPF application. The callstack points to the DataGrid control, which contains in these cases CheckBoxes which are ToggleButtons (callstack). Our codebase extends the…
Windows Presentation Foundation (WPF) end of life
Hi All, I would like to know if anyone has any information on future roadmap for WPF. Is there any date for microsoft retiring WPF and removing future support? Thanks in advance Narayanan
How to Access and Insert into the First Element of a List <> in WPF C# ?
I have a List <> which I populate by showing available audio devices. The Audio Device List<> which is created by manipulating ancient Win32 APIs. My Code is working fine, currently there no issue present on it. But I have some requirement,…
How to create and display an Excel file?
Hello. Is it possible to create an Excel file in a WPF application in C#. At the same time, so that you can display and edit this file as in the Microsoft Excel application?
What Does the launcher.exe Do?
When I publish my application on VS 2022, I get a launcher.exe file. I cannot find any information on what it does and I am wondering if I must include the file when I distribute my application. So far, my application does not give me any errors when I…
UIAutomation throws AccessViolationException on Windows 11
Original post on stackoverflow: https://stackoverflow.com/questions/72872197/uiautomation-throws-accessviolationexception-on-windows-11 Also posting here as there might be more views, maybe from people at MSFT too. If it's considered duplicata,…
WPF: Could not load file or assembly error in the designer but application runs with no problems
To try to solve another issue with the designer I've deleted bin and obj directories. Since then I'm facing this error while being in the designer: "The error message "Could not load file or assembly 'DesktopClient, Version=1.0.0.0,…
change paper tray lexmark printer in wpf c# program
Hello, how can I change the paper tray for a Lexmark XC9235 printer in a C# WPF application?
Why is my RelayCommand Parameter Not Available in the ViewModel
<ListBox DisplayMemberPath="Name" ItemsSource="{Binding Path=GeoElements}" SelectedValue="{Binding Path=RouteID}" SelectedValuePath="ElementID"> <i:Interaction.Triggers> …
Issues with BLE Gatt Services
Hi guys, We are using the BLE GATT services supplied by the Windows CSWinRT nuget package in a .net 6 WPF application. Two issues have raised their heads and I'm hoping someone could point me in the right direction. The main issue we have been facing…