2,833 questions with Windows Presentation Foundation tags

Sort by: Updated
1 answer

Points displaying wrong

Hello I am sorry or not putting the framework correctly, but I cannot find WinUI The problem is that in the canvas my points are displaying correctly but when I go into guided mode to select my points they dont correspond I don't have point 1,…

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,833 questions
asked 2025-02-23T21:52:58.61+00:00
Eduardo Gomez Romero 1,255 Reputation points
commented 2025-02-28T03:19:53.4533333+00:00
Hongrui Yu-MSFT 4,605 Reputation points Microsoft Vendor
1 answer

Canvas math problem

I have this Canvas that is 100 mm x 100 mm the problem is that when I draw a line es calculating bad (or I'm the bad one) if I select 0,0 and 18,18. I shod have but for some reason I get this is the code private readonly…

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,833 questions
asked 2025-02-27T15:49:23.9166667+00:00
Eduardo Gomez Romero 1,255 Reputation points
answered 2025-02-28T02:26:50.55+00:00
Hongrui Yu-MSFT 4,605 Reputation points Microsoft Vendor
1 answer

How can you unhide a Button inside a UserControl when a Page loads into a Frame on the MainWindow?

UserControl: <UserControl x:Class="Scores.Views.UserControls.MenuBar" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"    …

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,833 questions
asked 2025-02-27T17:55:20.3+00:00
Michael Bahr 20 Reputation points
edited the question 2025-02-28T01:06:04.16+00:00
Jiale Xue - MSFT 49,051 Reputation points Microsoft Vendor
2 answers One of the answers was accepted by the question author.

WPF Validation and Style Issue

Hi All, I have a textbox on screen with ValidationRule for required field validation: <TextBox Grid.Row="1" Grid.Column="1" Name="txtFirstName" Margin="10,10,5,5"…

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,833 questions
asked 2025-02-24T14:29:11.8766667+00:00
Pratham Jain 221 Reputation points
accepted 2025-02-27T12:04:44.52+00:00
Pratham Jain 221 Reputation points
1 answer One of the answers was accepted by the question author.

two usercontrols with different dependency properties have the same content

i have a usercontrol called filtercontrol that's in a in a itemscontrol. the itemscontrol ist bound to a observablecollection. the usercontrol has a dependency property that's set a guid. wenn the guid is set the usercontrol gets data from a source to…

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,833 questions
asked 2025-02-26T09:06:20.7066667+00:00
Jungbluth 0 Reputation points
accepted 2025-02-27T08:31:34.6766667+00:00
Jungbluth 0 Reputation points
1 answer

WPF Cannot see SelectedItem in TreeView

I'm using WPF .Net 9.0, I cannot see the SelectedItem element of the TreeView. Anybody would know why ?

.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,104 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,833 questions
asked 2025-02-17T00:51:57.6933333+00:00
Bernard Lessard 1 Reputation point
commented 2025-02-26T01:45:33.4066667+00:00
Hongrui Yu-MSFT 4,605 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

NET Core 3.1 app clickonce publish include a folder(from library project)

WPF Prism desktop project sln module folder data.txt module.cs app app.cs app references module module is a .dll project app is .exe project <Content Include="folder\data.txt"> …

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,833 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,317 questions
asked 2021-09-26T14:37:02.377+00:00
Grant Yu 21 Reputation points
accepted 2025-02-25T03:27:26.3066667+00:00
Grant Yu 21 Reputation points
1 answer

How to Detect Stylus Pen Sides (Pen Tip vs. Eraser) in WPF (C#)

Hello, I’m developing a WPF application in C# that interacts with a stylus pen on a Windows device. I need to detect which side of the stylus is being used—whether it’s the pen tip or the eraser side. Could someone guide me on how to achieve this…

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,833 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,317 questions
asked 2025-02-06T04:36:22.5+00:00
Manjunath PM 0 Reputation points
commented 2025-02-25T02:57:48.6033333+00:00
Hongrui Yu-MSFT 4,605 Reputation points Microsoft Vendor
2 answers One of the answers was accepted by the question author.

How can I see why a project cannot use "Application Timeline"

I have two startup projects in a solution - both are WPF applications that produce an .exe output tied to an xaml application. I would like to use the Application Timeline feature to analyze my app and for one project I can select the feature, but for…

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,833 questions
asked 2025-02-18T12:29:03.24+00:00
cbra-caa 20 Reputation points
accepted 2025-02-24T09:51:44.0966667+00:00
cbra-caa 20 Reputation points
1 answer

Showing WPF window having webView2 control gives error dialog with description - Microsoft Edge can't read and write to its data directory

Showing WPF window having webView2 control gives error dialog with description - Microsoft Edge can't read and write to its data directory I have Webview2 control in WPF Window as shown below in webViewStrings.xaml file <Window…

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,833 questions
asked 2025-02-07T15:57:54.6933333+00:00
Ajay Gera 45 Reputation points
commented 2025-02-24T01:09:08.7533333+00:00
Hongrui Yu-MSFT 4,605 Reputation points Microsoft Vendor
1 answer

OutOfMemory exception from System.Windows.Media.Composition.DUCE.Channel.BeginCommand

We're running a WPF application that renders 3d graphics into a viewport, but sometimes we get an OutOfMemoryException with the following stack trace: 2025-02-19 03:39:07,028+11:00 FATAL An unhandled exception was caught System.OutOfMemoryException:…

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,833 questions
asked 2025-02-19T22:54:52.6833333+00:00
Naim Kingston 0 Reputation points
commented 2025-02-20T20:22:02.17+00:00
Viorel 120.1K Reputation points
0 answers

Issue with Reset Password Functionality on Company Account

The reset password window does not respond when attempting to change the password for an account with a company taken over by Totalenergies. I was previously with an electric car charging company, paying a £4 monthly fee and using my bank account for…

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,833 questions
asked 2025-02-17T14:29:05.5266667+00:00
abdul hamid 0 Reputation points
0 answers

Win11 - User32.GetRawInputData fails to read data since 24H2

Background: We are using HwndHost class to host child window inside WPF application. From WndProc method we are forwarding input messages (WM_INPUT) to child process/window using User32.SendMessage. The child process/window WndProc method then receives…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,104 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,833 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
10,875 questions
asked 2025-01-28T16:38:45.1933333+00:00
Vít H 0 Reputation points
commented 2025-02-13T20:14:14.9066667+00:00
Dan Thompson (SBS) 0 Reputation points Microsoft Employee
1 answer

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…

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,923 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,833 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,447 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,317 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
10,875 questions
asked 2025-02-04T09:07:39.76+00:00
Yathavakrishnan 0 Reputation points
commented 2025-02-12T03:08:01.5633333+00:00
Jiale Xue - MSFT 49,051 Reputation points Microsoft Vendor
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,833 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,317 questions
asked 2025-01-22T21:17:16.64+00:00
Luke A'Court 0 Reputation points
commented 2025-02-10T08:12:24.7733333+00:00
Hongrui Yu-MSFT 4,605 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,104 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,833 questions
asked 2025-01-21T05:57:40.91+00:00
Prasanth R A 5 Reputation points
commented 2025-02-05T09:41:38.3166667+00:00
Hongrui Yu-MSFT 4,605 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

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,833 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,317 questions
asked 2025-01-23T07:01:02.52+00:00
Praveena S Kumar 20 Reputation points
accepted 2025-02-03T10:28:34.77+00:00
Praveena S Kumar 20 Reputation points
0 answers

WPF UI Not Rendering in Custom Credential Provider Within UAC

I am developing a custom Credential Provider where I launch a WPF application as a Class Library. The WPF window is supposed to display UI elements like buttons and textboxes. However, when the Credential Provider loads and the WPF window appears inside…

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,833 questions
Windows 10 Security
Windows 10 Security
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Security: The precautions taken to guard against crime, attack, sabotage, espionage, or another threat.
3,008 questions
asked 2025-02-03T07:11:42.3666667+00:00
Priyanka Desai 5 Reputation points
edited a comment 2025-02-03T09:53:33.4+00:00
Hongrui Yu-MSFT 4,605 Reputation points Microsoft Vendor
1 answer

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,104 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,833 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,317 questions
asked 2025-01-27T04:47:18.25+00:00
commented 2025-02-03T07:45:24.4866667+00:00
Jiale Xue - MSFT 49,051 Reputation points Microsoft Vendor
2 answers

Is my technology stack suitable for a startup

I have developed a startup. My technology stack: C#, WPF, Postgresql, Dapper. Is this stack optimal for a startup? I listened to the opinions of previous developers and now I doubt it. Perhaps the problem is that the program does not work on other…

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,833 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,317 questions
Startups
Startups
Companies that are in their initial stages of business and typically developing a business model and seeking financing.
6 questions
asked 2025-01-29T19:45:17.5233333+00:00
vitaminchik 486 Reputation points
commented 2025-02-03T06:13:37.8+00:00
Jack J Jun 24,881 Reputation points Microsoft Vendor