2,855 questions with Developer technologies | Windows Presentation Foundation tags
Impact of Changing Framework Order in runtime.config.json on Application Stability
Description: I am working on a .NET 8 WPF application that undergoes obfuscation using SmartAssembly. During the build, runtime.config.json is generated automatically, but SmartAssembly picks WindowsBase.dll from Microsoft.NETCore.App instead of…
Developer technologies | Windows Presentation Foundation
DataGrid TextBox Search using Ctrl + F and F3
I am building a WPF MVVM application. I have a DataGrid, like so: <DataGrid Name=“Employees” AutoGenerateColumns=“False” CanUserAddRows=“False” EnableColumnVirtualization=“True” …
Developer technologies | Windows Presentation Foundation
Developer technologies | XAML

UI Slows Down When Listing Large Data (3000+ Records) in WPF Application
Hello, I am developing a library automation system using WPF and MVVM. My application contains more than 3000 book records, which I list using ICollectionView and ObservableCollection. However, while loading and displaying the data, the UI slows down…
Developer technologies | Windows Presentation Foundation
WPF DataGrid resizing column causes extreme scrolling
I have found a behavior with the stock WPF DataGrid that I can't explain or prevent, but it feels like a bug. I am curious if anyone has run into this and what the fix or workaround is. Steps to Reproduce: When using a DataGrid with several columns…
Developer technologies | Windows Presentation Foundation

How to control the Visibility property of a UserControl object dynamically using Binding property?
I am working on a .NET C# project to learn MVVM. I am struggling to control the Visibility property of a UserControl dynamically. The login screen (userView.xaml) is a small centralized box that has two userControl views named signInUC.xaml and …
Developer technologies | Windows Presentation Foundation
How to reference global resources in user controls in wpf class library projects
I created a WPF class library, and then added a UserControl "Card.xaml", and a resource dictionary "GlobalRes.xaml", I hope to use the style resources in GlobalRes in the Card control. As shown…
Developer technologies | Windows Presentation Foundation
Developer technologies | C#
How to get the custom WPF dialog box in visual studio
I am using webview2 to display the page on the wpf dialog box initially the issue is there was visual studio icon that was coming by default on the top left I want to remove that icon so that I used WindowStyle="ToolWindow" due to this my…
Developer technologies | Windows Presentation Foundation
Windows 11 22598.100 Tooltip problem with WPF apps
I'm finding that Tooltips in WPF V4.8 apps (and earlier versions) are not working in Windows 11 build 22598.100. They appear but then immediately disappear. It happens in all WPF based apps. Tooltips are ok in Winforms apps and also .NET 5.0 WPF apps are…
Developer technologies | Windows Presentation Foundation
Windows for business | Windows Client for IT Pros | User experience | Other
How to change Windows Lock Screen background without creating a UWP app?
I need to programmatically change the Windows Lock Screen background, but my application's logic is quite complex, and it can't be achieved using the built-in Windows functionalities. I know that it's possible to create a UWP app and use the…
Developer technologies | Windows Presentation Foundation
How to number rows in dataGrid
Hello. I am using datagrid. Is it possible to make it possible for the user to add a combined row or with columns by clicking on the table? And how it is possible to make numbering of lines as an example? If a combined string is encountered, then the…
Developer technologies | Windows Presentation Foundation
Developer technologies | C#

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…
Developer technologies | Windows Presentation Foundation
SQL Server | Other
Developer technologies | C#

WPF PrintDialog: How to Enable and Detect Selected Page Print Feature?
Our WPF application targets .NET 4.8. The WPF application can generate run report which include 12 pages. run report allows print. So far there is no option, and it always prints all 12 pages. we like to add feature to allow select page numbers and only…
Developer technologies | Windows Presentation Foundation
WPF: Customizing WPF PrintDialog in Framework 4.8 to Add Input Box for Page Selection
Our WPF application targets .NET 4.8. The WPF application can generate run report which may include 12 pages. A run report allows print. So far there is no option, and it always prints all 12 pages. We like to add feature to allow select page numbers and…
Developer technologies | Windows Presentation Foundation
Optimizing WPF Application Startup Time on Shared Network Drive
My team is facing an issue when publishing the application on a shared network drive. When an end user opens the program for the first time after starting their computer, it takes significantly longer compared to running it from the local C drive (18…
Developer technologies | Windows Presentation Foundation
Developer technologies | .NET | Other
The keyboard inputs are not updating correctly in the hosted WinForms application
Hi, We are encountering an issue in a WPF application hosted within a WinForms application. The keyboard event is triggered correctly, but the values are not updating properly in the UI. Here’s the setup: Create a WinForms application with a user…
Developer technologies | Windows Forms
Developer technologies | Windows Presentation Foundation
Windows for business | Windows Client for IT Pros | User experience | Other
Developer technologies | Visual Studio | Other
Developer technologies | C#
Excel formatting issue in C#
Hi All, I have a WPF application in which I am exporting data to excel. I have merged some cells and added some data to it. After printing I observed some formatting issue where some of the text is cutted and missing: _excelApp = new…
Developer technologies | Windows Presentation Foundation
Announcing Control Changes for Screen Readers in My WPF Project?
Hello everyone, In my WPF project, I want to implement screen reader support, particularly in registration forms, for visually impaired users. My goal is to ensure that changes in controls (e.g., textboxes, comboboxes, checkboxes, etc.) and error…
Developer technologies | Windows Presentation Foundation
WPF: Why BackgroundWorker.RunWorkerCompleted Event() throw an exception and main thread does not receive it?
Our WPF application targets .NET 4.8. The AbortableBackgroundWorkder class inherences from the BackgroundWorker class and used as following. there are two background workers: _protocolProcessorBackgroundWorker..DoWork() will call …
Developer technologies | Windows Presentation Foundation
WPF C# fitting different Screen Sizes
Hi, I'm coding a nice smart tiny app :) and coding on a desktop PC - yesterday Im starting to test a release version and create a setup project - already done. For testing I put the setup file on my old notebook - and ahhhhhhh can't believe it. My…
Developer technologies | Windows Presentation Foundation

Cannot Assign x:Name to Elements Inside ContentControl in WPF UserControl
Hello, I have created a UserControl in WPF that contains a ContentControl. This ContentControl can accept any external content (Grid, StackPanel, TextBox, etc.). However, when I use the UserControl in another page and try to assign x:Name to elements…