2,665 questions with Windows Presentation Foundation tags

Sort by: Updated
1 answer

How to implement layered architecture?

Hello I started working on layered architecture to write some more professional code in C#. As a result of research on the internet, I saw that each person implements layered architecture differently. This caused confusion. I use the MVVM pattern in my…

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,665 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.
10,191 questions
asked 2024-04-10T20:42:05.4866667+00:00
fatih uyanık 80 Reputation points
commented 2024-04-18T07:42:05.57+00:00
Hui Liu-MSFT 37,946 Reputation points Microsoft Vendor
1 answer

Is it possible to create and set styles and/or template for combobox in c# only?

Hi, I'm trying to setup a app frontend in C# only. I'm more practiced with c# then XAML, but also have the feeling that I can make the app windows/pages more parametric in this way. Thus far I'm succeeding in this, however when I tried setting up…

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,665 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.
10,191 questions
asked 2024-04-12T14:03:37.46+00:00
Reinder Weenink 0 Reputation points
commented 2024-04-18T03:27:20.57+00:00
Hui Liu-MSFT 37,946 Reputation points Microsoft Vendor
2 answers

How to reference/consumme assembly manifest based on CPU in WPF C# Application project?

I want to reference an older Win32 assembly from a Wpf C# application. I do have both x86 or x64 versions of the Win32 assembly but I don't see how to reference based on selection target CPU.I can only specify either one. The Visual Studio C# project…

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,665 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.
10,191 questions
asked 2024-04-16T12:44:11.6233333+00:00
Nicolas Montmarquette 0 Reputation points
commented 2024-04-18T03:25:53.2766667+00:00
Hui Liu-MSFT 37,946 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

Binding Errors in a Simple Project

I have carved out a simple project from a larger one to demonstrate the binding errors I am getting so the names I use might seem ... odd. The following is the ENTIRE project: 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,665 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,562 questions
asked 2024-04-16T22:49:29.3466667+00:00
RogerSchlueter-7899 1,176 Reputation points
commented 2024-04-18T02:15:22.2366667+00:00
Hui Liu-MSFT 37,946 Reputation points Microsoft Vendor
1 answer

Selection Rectangle not moving along with datagrid content during scroll.

I am attempting to replicate the selection behavior of Windows File Explorer within a WPF DataGrid. Specifically, I aim to implement a selection rectangle that mimics the functionality of File Explorer's selection mechanism. Currently, I have created 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,665 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.
10,191 questions
asked 2024-04-11T05:08:56.16+00:00
Amit 0 Reputation points
edited a comment 2024-04-16T17:32:50.41+00:00
Amit 0 Reputation points
1 answer One of the answers was accepted by the question author.

Could not load file or assembly "System.Runtime" on Windows Server

I migrated a WPF project from .NET Framework to .NET 6 which builds fine on my local system (windows 11). However when I moved forward to Azure pipeline, we got this error and it can be replicated on a Windows Server 2022 VM. There are multiple .NET…

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,665 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,072 questions
asked 2024-04-12T21:44:36.36+00:00
zhangjinzhou 20 Reputation points
accepted 2024-04-16T15:02:40.2+00:00
zhangjinzhou 20 Reputation points
1 answer

I am having a problem with WPF text box , its not allowing record space when pressing space bar on key board

When adding some text on text box in a wpf application its not arecording the space. it's only allowing it if i type the text as one string and use the back keys to go back to to where i want to record the space. Not sure what is the cause and solution…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,338 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,665 questions
asked 2024-04-15T13:52:54.78+00:00
Sgcino Ngema 0 Reputation points
commented 2024-04-16T12:37:27.8233333+00:00
Sgcino Ngema 0 Reputation points
1 answer

WPF TextBox Cursor position changed when I write korean + Hanja key

Hello. When I use WPF TextBox to test, there is a bug that causes the cursor to move to the front of the word when I type in Korean and press the Hanja key. How to fix it? I attached a gif file that reproduced the bug. thanks.

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,555 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,665 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.
10,191 questions
asked 2024-04-15T01:02:03.13+00:00
Banlim 0 Reputation points
answered 2024-04-15T08:28:22.4533333+00:00
Hui Liu-MSFT 37,946 Reputation points Microsoft Vendor
3 answers

MVVM datagrid comboboxes are not displaying the initial values and the moderator dropdown list needs to be unique

Based on my last request from this community and I got the POC working.…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,338 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,665 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.
10,191 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.
760 questions
asked 2024-04-06T18:45:14.3233333+00:00
Yvon 50 Reputation points
commented 2024-04-13T07:02:21.7566667+00:00
Peter Fleischer (former MVP) 19,231 Reputation points
22 answers One of the answers was accepted by the question author.

How to save all the updates in a datagrid (set of comboboxes) MVVM back to the database in WPF C#?

I have similar issue as @Mesh Ka working on the filtering between comboboxes. https://learn.microsoft.com/en-us/answers/questions/1481853/filtering-a-combobox-in-a-datagrid-based-on-anothe Thanks for the solution! The challenge I have is to save all the…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,338 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,665 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.
10,191 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.
760 questions
asked 2024-02-22T18:34:30.8433333+00:00
Yvon 50 Reputation points
edited an answer 2024-04-12T16:51:38.34+00:00
Yvon 50 Reputation points
1 answer

Set EXE language in C# WPF

I am working in C# WPF and want to change EXE Language which appears in EXE Properties-Details Page- Language. Originally the "Language" is "Language Neutral". Even though I am changing the "Assembly Neutral Language" from…

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,665 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.
10,191 questions
asked 2024-04-05T08:11:41.9333333+00:00
Amol Bhavsar 0 Reputation points
commented 2024-04-12T09:49:43.41+00:00
Hui Liu-MSFT 37,946 Reputation points Microsoft Vendor
0 answers

The problem with the MediaElement in WPF .NET 8.0 not supporting relative paths for the media source,Why?

Hi, I'm attempting to utilize the MediaElement in WPF to play video files with either .mp4 or .wmv extensions. However, I've encountered issues when passing the source as a relative path or a Pack URI. Strangely, it works fine when I provide an absolute…

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,555 questions
Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
4,718 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,665 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.
10,191 questions
asked 2024-04-08T08:17:36.1833333+00:00
Sanjay Kumar Jha 151 Reputation points
commented 2024-04-12T09:47:02.55+00:00
Hui Liu-MSFT 37,946 Reputation points Microsoft Vendor
2 answers One of the answers was accepted by the question author.

[WPF] HttpClientHandler SendAsync Call Never Getting HTTP Response Back

Our project is developed with WPF C# with Target framework version of .Net Framework 4.6.2. We were trying to do a POST call using HttpClientHandler, But we didn't get any response or the status back. The application stays hanged, Didn't…

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,665 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.
10,191 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.
760 questions
asked 2022-03-11T05:55:35.95+00:00
Magi 21 Reputation points
commented 2024-04-12T07:45:46.3433333+00:00
Gabor Hollosy 0 Reputation points
1 answer

How to change the titlebar menu style to Windows 11 style

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,665 questions
asked 2024-04-02T06:48:56.2833333+00:00
quan zhao 20 Reputation points
commented 2024-04-11T01:57:18.0633333+00:00
Hui Liu-MSFT 37,946 Reputation points Microsoft Vendor
2 answers One of the answers was accepted by the question author.

Draw chart with System.Windows.Controls.DataVisualization.Toolkit

Source thread: Generating a graph using DataVisualization Charting in WPF, answered by Peter Fleischer. I have a chart here: I want to get the same chart drawn with System.Windows.Controls.DataVisualization.Toolkit in WPF app, does anyone…

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,665 questions
asked 2020-02-25T03:27:22.497+00:00
Charles He-MSFT 96 Reputation points Microsoft Employee
commented 2024-04-10T16:18:24.0966667+00:00
Nieman, Michelle J 20 Reputation points
2 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,665 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.
10,191 questions
asked 2023-05-09T07:35:53.6466667+00:00
don bradman 621 Reputation points
commented 2024-04-09T15:22:37.15+00:00
Redar Ismail Chicho 1 Reputation point
2 answers One of the answers was accepted by the question author.

WPF blazor hybrid application with console output window

I am following the guid in learn.microsoft.com to develop a .net8 WPF blazor hybrid app. Here is the link. I build and run the WPF application successfully according to this guid. However, I can`t make the WPF with a Console window even if I set 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,665 questions
Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,373 questions
asked 2024-04-03T06:57:30.51+00:00
William Liu 246 Reputation points
answered 2024-04-08T20:37:04.71+00:00
Bruce (SqlWork.com) 54,711 Reputation points
0 answers

how to dispose the BlazorWebView in WPF blazor hybrid application?

I have a usercontrol which contains BlazorWebView control. After load/unload this usercontrol several times, I find there are more and more Microsoft Edge WebView2 appear in Windows task manager. I guess it was caused by the unreleased BlazorWebView…

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,665 questions
Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,373 questions
asked 2024-04-06T01:15:06.14+00:00
William Liu 246 Reputation points
commented 2024-04-08T07:06:41.4566667+00:00
William Liu 246 Reputation points
0 answers

About automatic suggestion and completion of XAML codes on Visual Studio Code

Hello I installed the Visual Studio Code application on my computer. I generally work on C#. But I have a problem. When developing a WPF project and working in XAML files, suggestions of XAML codes are not completed by the compiler in CS files as in C#…

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,665 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.
10,191 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.
760 questions
asked 2024-03-24T20:52:48.8666667+00:00
fatih uyanık 80 Reputation points
commented 2024-04-08T05:59:10.4966667+00:00
Jiale Xue - MSFT 30,126 Reputation points Microsoft Vendor
1 answer

An issue implementing migrations in the data layer

Hello I started developing a new c# WPF project. In a solution, I separated the layers as UI and Data. I placed database-related models and configurations in the data layer. Then, I gave the Data project as a reference to the ilse UI project. The problem…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
694 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,665 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.
10,191 questions
asked 2024-04-05T08:04:08.8033333+00:00
fatih uyanık 80 Reputation points
commented 2024-04-08T05:33:09.8066667+00:00
Jiale Xue - MSFT 30,126 Reputation points Microsoft Vendor