2,716 questions with Windows Presentation Foundation tags

Sort by: Updated
2 answers

How to trigger SelectionChanged event when ComboBox selected Index is same not necessarily changed in WPF C#?

Hi there, I have a simple WPF application where a different window will open if I select the last item of a Combo box. my code is working successfully but there some issue on my code. I want some more functionality. Suppose, I select the last item, 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,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.
10,656 questions
asked 2022-10-19T17:20:30.463+00:00
MERUN KUMAR MAITY 551 Reputation points
commented 2024-07-29T16:50:40.74+00:00
Rizwan322 0 Reputation points
2 answers One of the answers was accepted by the question author.

Item Template Not Using Data Context

Here is code for WPF window (omitting irrelevant…

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,716 questions
asked 2024-07-27T22:51:49.1966667+00:00
RogerSchlueter-7899 1,261 Reputation points
commented 2024-07-29T14:49:42.4566667+00:00
RogerSchlueter-7899 1,261 Reputation points
0 answers

Item Template Not Using Data Context

Here is code for WPF window (omitting irrelevant…

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,716 questions
asked 2024-07-27T22:55:00.58+00:00
RogerSchlueter-7899 1,261 Reputation points
commented 2024-07-29T14:41:29.21+00:00
RogerSchlueter-7899 1,261 Reputation points
0 answers

Is it able to check XAML Designer mode in csproj?

I have a .net 8 WPF project which is developed with lastest Visual Studio Community Version (v17.10.5). I have learned that I can use Condition attribute in csproj file to toggle build property. My question is, is there a Condition key word to check if…

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,716 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,895 questions
asked 2024-07-29T05:22:41.65+00:00
William Liu 346 Reputation points
commented 2024-07-29T14:36:19.36+00:00
Hui Liu-MSFT 47,421 Reputation points Microsoft Vendor
2 answers

CommunityToolkit 8.2.2 with Wpf .Net framework 4.8.1 gets error The name '' does not exist in the current context

Hi, I am working with WPF .Net framework 4.8.1 using CommunityToolkit 8.2.2. I've already set the LangVersion to 8.0, and migrated the package.config. In my MainWindowViewModel, there is a ObservableProperty string _myName, the Source Generator already…

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,716 questions
asked 2024-07-29T08:08:27.2433333+00:00
Dung Huynh 121 Reputation points
commented 2024-07-29T14:32:04.4133333+00:00
Hui Liu-MSFT 47,421 Reputation points Microsoft Vendor
0 answers

The WPF program touches the edge of a transparent background window in the surface pro 9 windows 11 operating system causing the window to lose its transparent effect

Under the Surface pro 9 windows 11 Professional operating system, when the touch screen touches the edge of the WPF transparent background window, the transparent window will turn into a "cloud white" color, and the transparent effect will be…

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,716 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
9,014 questions
asked 2024-07-29T05:20:21.6933333+00:00
whuuan 0 Reputation points
commented 2024-07-29T09:48:10.75+00:00
Hongrui Yu-MSFT 1,025 Reputation points Microsoft Vendor
1 answer

Mysterious XAML “The name "X" does not exist in the namespace” error won't go away

I'm working on a XAML/C# project. I have a custom abstract class derived from `System.Windows.Controls.UserControl`: `PageBase`. Visual Studio 2022 keeps telling me it can't find `PageBase` in the namespace. The…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,654 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,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.
10,656 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.
791 questions
asked 2024-07-28T01:51:58.1333333+00:00
Will Pittenger 281 Reputation points
edited the question 2024-07-29T03:00:16.6233333+00:00
Jiale Xue - MSFT 43,046 Reputation points Microsoft Vendor
0 answers

How to Host the Firestore Identity File Securely?

I am working on a WPF project with C#, and I am using Firebase Firestore for which I need to host the identity JSON file on disk. However, I want to ensure that users cannot access this file or the Firestore services using the information inside it. What…

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,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.
10,656 questions
asked 2024-07-19T09:13:39.21+00:00
fatih uyanık 80 Reputation points
edited a comment 2024-07-23T08:51:46.67+00:00
Hongrui Yu-MSFT 1,025 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

How do I access child elements

Hello. I have a problem, in one of the StackPanels I want to display product cards, where the user can write the quantity of goods purchased and their price, then the program should calculate the total amount. Everything should change dynamically 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,716 questions
asked 2024-07-14T09:01:52.8433333+00:00
vitaminchik 486 Reputation points
accepted 2024-07-21T17:11:43.75+00:00
vitaminchik 486 Reputation points
1 answer

Wpf white squares bug on display

When i running wpf application theres little white squares on display where position on mouse cursor. Any one know about these wieard bug

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,716 questions
asked 2020-03-03T17:47:31.28+00:00
manoj lakmal 1 Reputation point
answered 2024-07-20T12:50:17.2433333+00:00
Ridaali 0 Reputation points
1 answer One of the answers was accepted by the question author.

Entity Framework complains that there is no primary key

using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; namespace WpfApp6.Models; public partial class Product [Key] public int IdProduct { get; set; } public string NameOfProduct { get; set; } = null!; public…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
726 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,716 questions
asked 2024-07-09T20:27:16.29+00:00
vitaminchik 486 Reputation points
edited the question 2024-07-16T16:41:14.8+00:00
Dillan Simmons 1 Reputation point Microsoft Employee
1 answer

Elements overlap each other

Hello. I'm trying to build a wpf application using this layout. I have set all the elements, but they overlap each other. Can you help with column 2? What am I doing wrong. I need to drag an element from 1 column to 2 and the text should go to one of…

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,716 questions
asked 2024-07-10T19:20:13.0733333+00:00
vitaminchik 486 Reputation points
commented 2024-07-15T02:22:25.89+00:00
Hongrui Yu-MSFT 1,025 Reputation points Microsoft Vendor
1 answer

Text inversion in right-to-left languages such as Persian in the Itextsharp Paragraph

First and foremost, I apologize for my grammatical errors; my first language is Persian (Iran). I want to add Persian text to the PDF headline, but when I do this through the iTextSharp.text.Paragraph class, I get into trouble. I can solve this…

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,874 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,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.
10,656 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.
791 questions
asked 2021-11-12T23:34:53.513+00:00
رضا جافری 1,296 Reputation points
commented 2024-07-10T08:48:51.74+00:00
Enayatullah 0 Reputation points
1 answer

I am having an issue , the textbov does allow space when pressing space bar

<TextBox x:Name="txtLocationName" Grid.Column="3" Grid.Row="5" Height="22" VerticalAlignment="Center" TabIndex="17" …

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,716 questions
asked 2024-07-04T11:30:05.2+00:00
Sgcino Ngema 0 Reputation points
commented 2024-07-08T02:34:06.6266667+00:00
Hongrui Yu-MSFT 1,025 Reputation points Microsoft Vendor
2 answers

On remote desktop machine (Windows 11), the DataGrid (WPF C# application .Net Framework 4.7.2) event is throwing System.Reflection.TargetInvocationException.

The DataGrid event is giving the exception"System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Added item does not appear at given index '4'. " while…

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,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.
10,656 questions
asked 2024-07-01T14:03:37.68+00:00
Sharayu Mahadeorao P 0 Reputation points
commented 2024-07-08T02:30:46.19+00:00
Hongrui Yu-MSFT 1,025 Reputation points Microsoft Vendor
2 answers

How Can I track the Last DPI which is sent by WM_DPICHANGED in WPF?

I want to scale my WPF application according to available screen DPI. I know there Per Monitor DPI aware available but that are completely different what I want to achieve. I want to disable scaling for my WPF application even if windows has some scale…

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,716 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,525 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,656 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,638 questions
asked 2024-06-23T21:10:17.6933333+00:00
MERUN KUMAR MAITY 551 Reputation points
commented 2024-07-08T02:00:19.47+00:00
Hongrui Yu-MSFT 1,025 Reputation points Microsoft Vendor
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,654 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,716 questions
asked 2024-04-15T13:52:54.78+00:00
Sgcino Ngema 0 Reputation points
commented 2024-07-04T11:26:57.9866667+00:00
Sgcino Ngema 0 Reputation points
0 answers

WPF: Could not load file or assembly error in the designer but application runs with no problems

To try to solve another issue with the designer I've deleted bin and obj directories. Since then I'm facing this error while being in the designer: "The error message "Could not load file or assembly 'DesktopClient, Version=1.0.0.0,…

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,716 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,895 questions
asked 2024-03-01T08:49:05.19+00:00
Kratochvíl Lukáš 5 Reputation points
commented 2024-07-04T10:38:07.99+00:00
Thomas Froitzheim 0 Reputation points
1 answer

C# - How not make WPF UI Freeze while elaborating

I have a button that after I click it send a lot of data in a remote database with a loop, but during this operation whole wpf UI is freezing. My goal is to make the loader work while it is processing everything with the database. My button code: …

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,716 questions
asked 2021-06-24T10:01:59.587+00:00
babluplanet 21 Reputation points
edited an answer 2024-07-03T10:00:41.4433333+00:00
sophiamartin2342 0 Reputation points
0 answers

How to make UWP MediaElement to be loop mode when casting to a TV?

I find that when using UWP MediaElement (component name: video), it works well to be in loop mode when set as below: video.IsLooping = true; // method 1 video.MediaEnded -= Video_MediaEnded; video.MediaEnded += Video_MediaEnded; // method 2 private…

Universal Windows Platform (UWP)
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,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.
10,656 questions
asked 2024-06-28T08:17:01.82+00:00
Tom JD1 Xue 21 Reputation points
commented 2024-07-03T02:34:45.64+00:00
Tom JD1 Xue 21 Reputation points