2,818 questions with Windows Presentation Foundation tags

Sort by: Updated
0 answers

AppDomain.CurrentDomain.BaseDirectory is Empty While Loading Media In WPF

Hello, I am working on a WPF window which supports multiple frameworks <TargetFrameworks>net8.0-windows;net48</TargetFrameworks> i have a media element in a window written <MediaElement x:Name="Video"                          …

.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,067 questions
Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,818 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,238 questions
asked 2025-01-27T04:47:18.25+00:00
commented 2025-01-27T11:43:10.6566667+00:00
1 answer

I want to lock the current HDMI port in C# WPF (.NET Framework)?

I want to lock the HDMI port. If a HDMI port is used for a monitor then if other HDMI port is used then i want to lock existing port. How to do so in C# WPF?

.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,067 questions
Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,818 questions
Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,716 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,238 questions
asked 2025-01-16T08:11:55.82+00:00
Vishal2 Bansal 225 Reputation points
commented 2025-01-27T08:54:03.0933333+00:00
Roy Li - MSFT 33,591 Reputation points Microsoft Vendor
3 answers

How to know whether the snap applied in windows 11 windows. Is there any API.

Is there a method or any API to tell if snap is enabled or disabled in Windows 11? Please answer if there is any other way.

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,818 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,238 questions
XAML
XAML
A language based on Extensible Markup Language (XML) that enables developers to specify a hierarchy of objects with a set of properties and logic.
830 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
10,546 questions
asked 2022-04-26T04:51:23.56+00:00
visi venkat 1 Reputation point
commented 2025-01-25T13:41:37.2766667+00:00
Castorix31 86,506 Reputation points
1 answer

How to Save a WPF DataGrid Back to Database after Editing

Hi, I am wondering if theirs a way to save a updated Line from WPF DataGrid back to Database . I don't Know the best way to do this without going back to WinForms Apps. I would like to use WPF, any help would be appreciated.

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,818 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,238 questions
asked 2025-01-22T21:17:16.64+00:00
Luke A'Court 0 Reputation points
commented 2025-01-24T13:46:12.9233333+00:00
Luke A'Court 0 Reputation points
1 answer

How to get the current page number or check if PDF viewer is on the Last page of a PDF in WPF Webview2 control?

I am working on a WPF application where I use Webview2 to display PDF files. I rely on Edge's built in PDF rendering mechanism and am not using any external PDF libraries. I've successfully loaded the PDF using the following…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,818 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,238 questions
asked 2025-01-23T07:01:02.52+00:00
Praveena S Kumar 0 Reputation points
commented 2025-01-24T05:34:51.5033333+00:00
Hongrui Yu-MSFT 4,200 Reputation points Microsoft Vendor
2 answers

How Can I Detect if the System Clock is Moved Forward or Backward in a C# WPF Application?

Hello, In my C# WPF desktop project, I want to detect if the system clock has been moved forward or backward. When such a change is detected, I would like to take specific actions. For example: Show a warning if the system clock is moved forward. Log an…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,818 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,238 questions
asked 2025-01-16T10:34:03.34+00:00
fatih uyanık 200 Reputation points
commented 2025-01-24T02:49:21.61+00:00
Hongrui Yu-MSFT 4,200 Reputation points Microsoft Vendor
1 answer

Playing Video in WPF

Description : I have a WPF Project with one Main Window under main window multiple tab item each tab item i binded with user control(Separate xaml)In user control i tried to play one video using MediaElement control... Project Setup: Project that target…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,067 questions
Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,818 questions
asked 2025-01-21T05:57:40.91+00:00
Prasanth R A 5 Reputation points
edited a comment 2025-01-23T17:32:21.2+00:00
EmilyS_726 75 Reputation points
1 answer

UCEERR_RENDERTHREADFAILURE (0x88980406) when multiple processes of the same WPF application are open.

Hello! Application: My application draws a huge number of OrderBooks (https://www.investopedia.com/terms/o/order-book.asp), for this my hierarchy looks like this: MainWindow -> TabControl -> TabItem -> DockingManager -> DockPanel. In…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,818 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,238 questions
asked 2023-05-17T15:54:05.8133333+00:00
Ayrat Khaydarov 5 Reputation points
commented 2025-01-23T17:12:06.0533333+00:00
MOLDAVSKYY Volodymyr 0 Reputation points
1 answer One of the answers was accepted by the question author.

What would be the appropriate method for view models in a C# WPF project?

Hello I created record insertion and update view models in my c# wpf project. These view models have common save and cancel commands. When the save command is clicked, it calls the save function from the relevant service and if there are any error…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,818 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,238 questions
asked 2025-01-22T07:17:10.66+00:00
fatih uyanık 200 Reputation points
accepted 2025-01-22T08:59:00.8666667+00:00
fatih uyanık 200 Reputation points
1 answer

Multiple HTTPs Requests

Hello All, We have a WPF application built on .Net Framework 4.8. This application communicates with an HTTPs server to perform a list of commands. These commands must be executed one after another and must not be sent in on go. This communication is…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,818 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,238 questions
asked 2024-12-20T07:04:45.51+00:00
S Abijith 466 Reputation points
commented 2025-01-22T06:12:29.15+00:00
S Abijith 466 Reputation points
1 answer One of the answers was accepted by the question author.

I want to disable/enable usb and HDMI port whenever my c# wpf (.net Framework 4.7.2) app runs.

Online resources are not present for above queries. I want solution for both admin/non-admin user account. Please help to provide me the solution.

.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,067 questions
Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,818 questions
Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,716 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,238 questions
asked 2025-01-15T12:29:34.7333333+00:00
Vishal2 Bansal 225 Reputation points
accepted 2025-01-22T05:07:30.16+00:00
Vishal2 Bansal 225 Reputation points
1 answer One of the answers was accepted by the question author.

I run in a trouble. WPF, compiled XAML: on changed text handler run but not all controls initizlzed

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,818 questions
XAML
XAML
A language based on Extensible Markup Language (XML) that enables developers to specify a hierarchy of objects with a set of properties and logic.
830 questions
asked 2025-01-19T05:49:16.4366667+00:00
Roma Golich 20 Reputation points
accepted 2025-01-20T17:06:21.8666667+00:00
Roma Golich 20 Reputation points
2 answers

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…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,067 questions
Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,818 questions
asked 2025-01-07T03:15:44.66+00:00
Knot 0 Reputation points
commented 2025-01-17T01:10:47.81+00:00
Hongrui Yu-MSFT 4,200 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

How to Design Validation, Error Management, and Message Service in a Layered Architecture for a WPF Project?

Hello I am working on a WPF application using the MVVM pattern and performing validations through a centralized ValidationService that leverages FluentValidation. During the validation process, I need to check whether an ISBN already exists in the…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,818 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,238 questions
asked 2025-01-13T10:16:24.99+00:00
fatih uyanık 200 Reputation points
accepted 2025-01-16T10:36:06.14+00:00
fatih uyanık 200 Reputation points
2 answers One of the answers was accepted by the question author.

I want to enable/Disable (i.e. lock/unlock) the Bluetooth through the C# wpf Application

Hi I want to enable/disable the Bluetooth programmatically in c# .NET WPF app. I am not able to find correct implementation. Pls help.

.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,067 questions
Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,818 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,238 questions
asked 2025-01-14T13:11:39.5233333+00:00
Vishal2 Bansal 225 Reputation points
accepted 2025-01-15T13:22:53.75+00:00
Vishal2 Bansal 225 Reputation points
3 answers

How to use WPF Mouse.OverrideCursor in a VB.NET application

I tried a sample WPF code, that Kareninstructor recommended to me, from https://github.com/karenpayneoregon/visual-basic-getting-started/tree/master/ChangeCursor to test the usage of Mouse.OverrideCursor - this worked beautifully. However, it is a…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,818 questions
VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,768 questions
asked 2021-01-27T21:30:00.707+00:00
Jim Webb 41 Reputation points
edited the question 2025-01-12T17:42:01.4666667+00:00
TP 102K Reputation points
4 answers

How to convert outlook email (.msg) to pdf c# ?

Are there any free libraries using which I can convert outlook emails i.e. .msg files to pdf in my WPF c# app? I've tried using PDFSharp like below but the data is not showing properly at all. The email body contains tables and text and sometimes it may…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,818 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,238 questions
asked 2023-05-09T07:35:53.6466667+00:00
don bradman 621 Reputation points
edited the question 2025-01-10T07:14:01.1+00:00
TP 102K Reputation points
1 answer

Dependency Properties in User Controls

I have a simple Slider and Label user control that I load into my window and I want to change the following properties using databinding from the main window. Slider Properties -> Value, SelectionStart, SelectionEnd (all doubles) Label Properties…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,067 questions
Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,818 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,238 questions
asked 2024-12-18T16:06:49.42+00:00
dmccric 0 Reputation points
commented 2025-01-06T14:48:50.3133333+00:00
dmccric 0 Reputation points
2 answers One of the answers was accepted by the question author.

How to Print a PDF File in C# WPF

Hello everyone , I have a PDF file with several pages and I need to print it using C# and WPF technology. Can someone provide some guidance on how to achieve this and customize the settings, such as page size, orientation, and margin? Thank you.

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,818 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,238 questions
asked 2024-08-12T03:03:17.3833333+00:00
Kamyab Faghih 65 Reputation points
commented 2025-01-06T04:43:25.5666667+00:00
winironteam 26 Reputation points
1 answer

How to implements desing time adorner for WPF?

I want to provide design-time support for my user control in WPF. I found out about adorners, but unfortunately, I could not implement them (In design time). I used this walkthrough, but it is old and no longer being updated. I would appreciate any help…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,818 questions
asked 2024-12-31T16:35:22.22+00:00
Олег Чижов 0 Reputation points
commented 2025-01-06T02:47:10.1233333+00:00
Jack J Jun 24,631 Reputation points Microsoft Vendor