Microsoft Q&A

Windows Presentation Foundation

2,274 questions

A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.

Browse all Windows tags

2,274 questions with Windows Presentation Foundation tags

Sort by: Updated
0 answers

Issue with dependency properties on Visual Studio "Properties" window

I am working on a custom WPF Window and I am facing an issue with a DependencyProperty. Here is an example of my base class MyCustomWindow.cs: public class MyCustomWindow : Window { public static DependencyProperty UseTitleBarProperty =…

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,274 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.
7,514 questions
asked 2023-03-22T10:45:19.0333333+00:00
Simos Sigma 1 Reputation point
edited the question 2023-03-22T13:43:13.49+00:00
AnnaXiu-MSFT 12,846 Reputation points
1 answer One of the answers was accepted by the question author.

In C# XAML WPF app, getting Exception HResult -2146233079 Task

I have a Visual Studio C# WPF XAML application running on Windows 10 .Net 7.0. I have an async Task that runs continuously (while (IsRuuning). The job of the Task is to: every 100 ms, under a mutex, read the contents of a file located at statusfilePath,…

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,274 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.
7,514 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
864 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
2,756 questions
Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
6,610 questions
asked 2023-03-19T22:17:56.0933333+00:00
DonBaechtel-7903 101 Reputation points
commented 2023-03-22T08:28:09.28+00:00
Hui Liu-MSFT 16,001 Reputation points Microsoft Vendor
0 answers

Santa Claus system

Hello I am trying to create this app (https://onedrive.live.com/?authkey=%21AIkhWQ8tNNAJT6M&cid=A1DB505D658FD6E3&id=A1DB505D658FD6E3%211044956&parId=root&o=OneUp) I do not understand very well I already created the UI

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,274 questions
asked 2023-03-20T17:10:50.2+00:00
Eduardo Gomez 2,466 Reputation points
commented 2023-03-22T06:22:23.05+00:00
Hui Liu-MSFT 16,001 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

how to get all static members inside a class?

l let's say we have a class "MyClass", now i want to put all static menbers into a Dictionary , use name "a", "b", "c", "d" as key, use "aaa", "bbb", "ccc", ”ddd“ as value.…

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,274 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.
7,514 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
864 questions
.NET Standard
.NET Standard
A formal specification of .NET APIs that are available on multiple .NET implementations.
491 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,813 questions
asked 2023-03-22T04:00:04.1733333+00:00
兰树豪 261 Reputation points
commented 2023-03-22T05:47:40.05+00:00
兰树豪 261 Reputation points
2 answers One of the answers was accepted by the question author.

what is "Type" use for in C#?

let's say we have a unknow type instance_X, we get it's type: Type typeA = instance_X.GetType(); How do I use this variable typeA? Can it be used to declare a variable or instantiate an object? like: typeA typeaa = new typeA(); // if typeA 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,274 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
2,756 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.
7,514 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
864 questions
.NET Standard
.NET Standard
A formal specification of .NET APIs that are available on multiple .NET implementations.
491 questions
asked 2023-03-19T17:26:56.22+00:00
兰树豪 261 Reputation points
accepted 2023-03-22T03:53:18.04+00:00
兰树豪 261 Reputation points
1 answer

Como generar reportes en wpf?

Hola. Necesito generar reportes en mi aplicación WPF. Con gráficos y opciones de salida. Qué puedo implementar gratis?

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,274 questions
asked 2023-03-21T11:09:57.4266667+00:00
Frank Suero 21 Reputation points
answered 2023-03-22T03:00:17.1+00:00
Hui Liu-MSFT 16,001 Reputation points Microsoft Vendor
0 answers

Tab navigation not working after making wpf app as noactive.

Tab navigation not working after making wpf app as noactive. When we press tab, application not performing tab navigation. Please help/guide here.

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,274 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.
7,514 questions
asked 2023-03-17T05:30:46.5166667+00:00
Smrithi Surendran 61 Reputation points
commented 2023-03-21T13:15:55.5933333+00:00
Darga, Suresh - Dell Team 1 Reputation point
0 answers

How to restrict Path (Shape) stroke from zooming in C# WPF Canvas?

Hello, how to restrict Path(Shape) stroke in C# WPF for zoom and pan. Need to maintain Path stroke in all scale. Detailed images are attached with query. Capture1.PNG Capture2.PNG

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,274 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.
7,514 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.
597 questions
asked 2023-03-17T10:06:48.79+00:00
Pranav Kulkarni 0 Reputation points
commented 2023-03-21T03:18:08.6366667+00:00
Hui Liu-MSFT 16,001 Reputation points Microsoft Vendor
1 answer

How to make WPF DataGrid click Enter key to auto move to Next cell the same column and create a new cell and has focus on next cell for ready to type?

We ask a WPF question. it seems that Tags category does not include WPF. We have a WPF application which uses WPF DataGrid control to allow enter barcode number and barcode description. the DataGrid binds to collection of Barcodes which includes barcode…

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,274 questions
asked 2023-03-16T15:20:47.1733333+00:00
Jane Jie Chen 326 Reputation points
commented 2023-03-20T09:40:05.94+00:00
Hui Liu-MSFT 16,001 Reputation points Microsoft Vendor
0 answers

Azure B2C Password Reset User Flow errors with script error when viewed in WPF embedded web viewer

I have converted a legacy WPF app to use Azure B2C. Following the instructions here https://learn.microsoft.com/en-us/azure/active-directory-b2c/configure-authentication-sample-wpf-desktop-app The login process works as expected. When trying to access…

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,274 questions
Azure Active Directory
Azure Active Directory
An Azure enterprise identity service that provides single sign-on and multi-factor authentication.
13,500 questions
asked 2023-03-18T21:49:07.7633333+00:00
Kendall Rima 0 Reputation points
commented 2023-03-20T01:55:41.0966667+00:00
Hui Liu-MSFT 16,001 Reputation points Microsoft Vendor
2 answers One of the answers was accepted by the question author.

are below mentioned packages windows-specific dependencies?

My web application is using below packages, System.Security.Principal.Windows WindowsAzure.Storage Microsoft.WindowsAzure.ConfigurationManager System.windows.forms this particular application also has .resx files It does not have .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,274 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,318 questions
asked 2023-02-01T08:36:51.65+00:00
BangTV 40 Reputation points
accepted 2023-03-17T05:52:32.66+00:00
BangTV 40 Reputation points
1 answer One of the answers was accepted by the question author.

Integrate the electronjs application inside the Wpf application

I have WPF application in that i want to render the electronjs app inside the window frame. actually, I am able to load electronjs application but as separate application not in window frame. Please find below code: { process = new Process(); …

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,274 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.
7,514 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.
597 questions
asked 2022-06-16T06:45:10.687+00:00
Nandini Nammi 41 Reputation points
commented 2023-03-16T12:30:47.7+00:00
Naveen Sivaji 0 Reputation points
1 answer

How can i inject multiple viewmodels via CommnunityToolkit Nuget?

By following Code, I can inject single viewmodel Mainwindow.xaml.cs public MainWindowViewModel ViewModel => (MainWindowViewModel)DataContext; public MainWindow() { this.DataContext =…

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,274 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
864 questions
asked 2023-02-21T00:54:37.46+00:00
aaaaaaa 0 Reputation points
edited a comment 2023-03-16T08:49:48.1666667+00:00
Hui Liu-MSFT 16,001 Reputation points Microsoft Vendor
0 answers

How to save the UI state of A WPF Application before closing?

I have a WPF application where I use multiple controls like button, combo box, check box, Tree view etc. I use a lot of visual styles and control templates to look my application modern and stylist. My application works perfectly as much as I want but…

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.
7,514 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,274 questions
asked 2022-07-20T19:09:18.16+00:00
MERUN KUMAR MAITY 471 Reputation points
commented 2023-03-16T06:54:51.55+00:00
Hui Liu-MSFT 16,001 Reputation points Microsoft Vendor
1 answer

How Can I save a ComboBox selected value in settings file when it has dynamic content in WPF?

I have a WPF application where I use many ComboBox controls. Most of the time I save application user settings in the Settings file, though many people use JSON to do that work but I think the default Settings file in WPF application is provided by…

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,274 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.
7,514 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.
597 questions
asked 2023-01-17T12:01:51.96+00:00
MERUN KUMAR MAITY 471 Reputation points
commented 2023-03-16T06:43:53.07+00:00
Hui Liu-MSFT 16,001 Reputation points Microsoft Vendor
0 answers

How to assign control to variable in WPF MVVM

I tried a video SDK and got a example code written in C#,WPF below, it shows video stream on screen. the point is, it used the context variable and assigned PublisherVideo(a control in xaml) to Renderer I want to rewite it by MVVM pattern, is there any…

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,274 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.
7,514 questions
asked 2023-03-15T09:05:22.6333333+00:00
hungChun 0 Reputation points
edited a comment 2023-03-16T06:08:10.2666667+00:00
Hui Liu-MSFT 16,001 Reputation points Microsoft Vendor
1 answer

How to implement WPF Binding programmatically (not XAML) with TwoWay binding mode?

I have implemented some Dependency Properties in a c# class A as documented to mimic a very simple Control. In class B the Bindings and CLR Properties are implemented using the INotifyPropertyChange interface. Sending data from B to A works fine with…

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,274 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
864 questions
asked 2023-01-19T16:09:47.65+00:00
Jörg Debus 66 Reputation points
commented 2023-03-16T05:49:55.3+00:00
Hui Liu-MSFT 16,001 Reputation points Microsoft Vendor
1 answer

WPF Canvas.SetLeft Problem

set value not changed

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,274 questions
asked 2022-12-15T08:07:50.423+00:00
김 영철 1 Reputation point
commented 2023-03-15T07:22:46.0866667+00:00
Hui Liu-MSFT 16,001 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

WPF InkCanvas Smooth Stroke

I am working on a C# WPF project using NET5. I got a lot of help from MSDN, and I am very grateful. The core function of my program utilizes InkCanvas. Specifically, Drawing on the wall with an infrared pen The infrared sensor communicates 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,274 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.
7,514 questions
asked 2022-03-03T02:57:19.207+00:00
HoneyBee 186 Reputation points
commented 2023-03-15T07:00:38.75+00:00
Jack J Jun 21,741 Reputation points Microsoft Vendor
2 answers

How to track ComboBox selected Index in a WPF application?

Hello all talented C#, WPF developers. I have a question for you, Suppose I have a Combobox and the ComboBox have four items and I select the second item and I close the Combobox, and suppose the Combobox item source has changed and there more five items…

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,274 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.
7,514 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.
597 questions
asked 2023-03-13T15:53:47.9866667+00:00
MERUN KUMAR MAITY 471 Reputation points
edited a comment 2023-03-15T02:36:12.8533333+00:00
Hui Liu-MSFT 16,001 Reputation points Microsoft Vendor