Microsoft Q&A

Windows Presentation Foundation

2,474 questions

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

Browse all .NET tags

2,474 questions with Windows Presentation Foundation tags

Sort by: Updated
1 answer One of the answers was accepted by the question author.

How to display ContextMenu on certain TreeViewItem and highlight the selected TreeViewItem in WPF following MVVM

Following MVVM, I have developed a TreeView and now I want mouse right click to show ContextMenu on certain TreeViewItem. As you can see in the screeshot, I only want the ContextMenu to be displayed when mouse right clicks on the first level…

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,474 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.
8,953 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.
687 questions
asked 2023-09-20T10:36:51.4633333+00:00
BabyHai 41 Reputation points
edited a comment 2023-09-22T10:51:17.3833333+00:00
BabyHai 41 Reputation points
1 answer

WPF custom animation thread

Hello, I have a small simple WPF application (I am learing by doing). I made some custom drawing on a Canvas declared in XAML, by using code in the corresponding C# file. Now I want to access the canvas from another thread to be able to apply geometric…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
2,018 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,474 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
5,945 questions
asked 2023-09-16T17:21:29.6333333+00:00
Daniel Santos 0 Reputation points
commented 2023-09-22T09:56:41.3666667+00:00
Hui Liu-MSFT 21,376 Reputation points Microsoft Vendor
1 answer

XAML Designer view is not loading

In Visual Studio 2023 Preview Version System.NullReferenceException Object reference not set to an instance of an object. at Microsoft.VisualStudio.DesignTools.SurfaceDesigner.DesignerService.CreateDesigner(IHostSourceItem item, IHostTextEditor…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
2,018 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,474 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
3,769 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.
8,953 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.
687 questions
asked 2023-09-20T14:12:40.2966667+00:00
M Faheem Akhtar 0 Reputation points
edited a comment 2023-09-22T03:15:18.0833333+00:00
Hui Liu-MSFT 21,376 Reputation points Microsoft Vendor
1 answer

How can I create a Complex View Like this one in WPF DataGridView C#?

I created this Example and Tried to make it as Simple as Possible so that you can Understand Clearly. I have SQL Server Database Named EmployeesDB that contains 4 Tables as following: 1.       Employees Table which is the Parent Table in this Example. 2.…

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,474 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
3,769 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
10,918 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.
8,953 questions
asked 2023-09-20T09:04:32.94+00:00
Mesh Ka 140 Reputation points
commented 2023-09-22T02:16:22.8033333+00:00
Hui Liu-MSFT 21,376 Reputation points Microsoft Vendor
2 answers One of the answers was accepted by the question author.

How can i make a popup dialog form in WPF?

as the heading suggests, i have a wpf application like this, on the MainPanel of my application i display user controls and sometimes i want to display a popup menu like the picture below when for example a user wants to do add some changes 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,474 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.
8,953 questions
asked 2023-09-02T08:51:03.27+00:00
Mesh Ka 140 Reputation points
commented 2023-09-21T08:26:50.73+00:00
Mesh Ka 140 Reputation points
0 answers

Memory Leak on ToolTip

In our product we are using a ribbon control with tool tips and it appears the tooltips are leading to memory leaks. I've been able to repeat with a simple sample project (attached as a .zip but renamed as .txt to allow attaching). It's simply a ribbon…

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,474 questions
asked 2023-09-19T14:42:34.43+00:00
James Pike 0 Reputation points
commented 2023-09-21T02:58:28.7333333+00:00
Hui Liu-MSFT 21,376 Reputation points Microsoft Vendor
2 answers One of the answers was accepted by the question author.

How to reorder TreeViewItem by drag&drop in TreeView using interactivity.behavior class in WPF

I have implemented the Drag&Drop from a ListBox to a TreeView, as displayed below. Now I want, for example, after dropping items to TreeView, I can drag ListBoxItem2 and drop it in the TreeViewItem1 and vice versa for other two items. I am using…

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,474 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.
8,953 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.
687 questions
asked 2023-09-08T10:49:00.42+00:00
BabyHai 41 Reputation points
commented 2023-09-20T10:46:08.77+00:00
BabyHai 41 Reputation points
1 answer

WPF 3D to 2D projection appears wrong?

Have a case where a point on the PerspectiveCamera’s LookDirection vector does not project to the center of the Viewport3D. Any thoughts as to why? Here are details of the case (all the values are rounded for brevity): The Viewport3D is 778, 405. Any…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
2,018 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,474 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.
8,953 questions
asked 2023-09-11T14:55:48.5633333+00:00
WoodManEXP 1 Reputation point
edited a comment 2023-09-19T17:57:14.2166667+00:00
WoodManEXP 1 Reputation point
1 answer

How to load FBX file in Helixtoolkit.SharpDX using Assimp in WPF?

I'm using Helixtoolkit in my WPF project and it seems that Helixtoolkit doesn't support FBX files. So I think I should use the 3D model import-export library Assimp. how can I import an FBX file into my WPF project using HelixToolkit.Wpf.SharpDX.Assimp ?…

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,474 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.
8,953 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.
687 questions
asked 2022-06-20T16:09:53.31+00:00
Yasmine_nj 1 Reputation point
commented 2023-09-19T15:16:02.6533333+00:00
Mike Wells 1 Reputation point
2 answers

Adorner Not showing

Hope you can help. I am continuing to try and learn WPF and my current test project (which I have simplified significantly to demonstrate my problem) is to display an Adorner on a window when a button is clicked to open a new Window. When this window 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,474 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.
8,953 questions
asked 2023-09-15T09:50:57.5466667+00:00
BigH61 481 Reputation points
commented 2023-09-19T06:26:11.7033333+00:00
Hui Liu-MSFT 21,376 Reputation points Microsoft Vendor
2 answers

ComboBox Control how to define MaxLength of input Text

Hi, a client asked me a change. I have an app with several STANDARD ComboBoxes Control. Until this morning they were all defined with IsEditable="False". Now I have to give the possibility to the user to input a value even if it is not in the…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
2,018 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,474 questions
asked 2023-09-08T12:51:39.2933333+00:00
Dimitri Garmaise 291 Reputation points
commented 2023-09-19T05:46:40.28+00:00
Hui Liu-MSFT 21,376 Reputation points Microsoft Vendor
0 answers

I want to install the HEVC Video Extensions on mutiple PC's

I have a requirement of playing HEVC MP4 Video files in Windows PC through my WPF Application which uses hevc video extension. So, I want into install the hevc video extension on mutiple PC's where ever my application runs. So, How can i do a bulk…

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.
3,030 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
2,018 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,474 questions
asked 2023-09-16T09:46:12.7066667+00:00
shaik kareemulla 0 Reputation points
commented 2023-09-19T02:42:42.0266667+00:00
Hui Liu-MSFT 21,376 Reputation points Microsoft Vendor
3 answers

How to bind from XAML to ModelView with IOC and not using static datacontext in Modelview

Hello How to bind from XAML to ModelView with IOC and not using static datacontext in Modelview

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,474 questions
asked 2023-09-05T16:59:10.33+00:00
PharmaSoft 1 Reputation point
commented 2023-09-18T08:36:57.5533333+00:00
Hui Liu-MSFT 21,376 Reputation points Microsoft Vendor
1 answer

WPF <Control> tag

Hi, I am following some example code from a Book that creates the following control template : <Canvas.Resources> <ControlTemplate x:Key="ClockHandTemplate"> <Polygon…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
2,018 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,474 questions
asked 2023-09-11T17:55:30.1066667+00:00
Daniel Santos 0 Reputation points
commented 2023-09-18T08:35:29.08+00:00
Hui Liu-MSFT 21,376 Reputation points Microsoft Vendor
0 answers

xaml mvvm efcore IOC

Hello In IOC, I have this exemple in the modelview public ReqCaisse(IDataContext database) { dataBase = database; } and from the view, it creates a new modelview <b:Interaction.Triggers> <b:EventTrigger EventName="Loaded"> …

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
583 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,474 questions
asked 2023-09-06T09:24:07.0733333+00:00
PharmaSoft 1 Reputation point
commented 2023-09-18T08:31:40.1966667+00:00
Hui Liu-MSFT 21,376 Reputation points Microsoft Vendor
2 answers One of the answers was accepted by the question author.

Disconnect RDP

There are methods to shut down Windows. If I am in an RDP session, how can I disconnect?

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,474 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,219 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.
8,953 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,170 questions
asked 2023-09-07T15:44:22.88+00:00
Heiko 1,051 Reputation points
accepted 2023-09-15T14:25:55.54+00:00
Heiko 1,051 Reputation points
1 answer One of the answers was accepted by the question author.

Datagrid combobox Itemssource not updating

Hi All, I have a datagrid in WPF page which is bound to data. In this datagrid I have a combobox column which displays a selected item and list initially for every record. I need to filter the combobox Itemssource whenever user selects it 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,474 questions
asked 2023-09-11T11:29:13.27+00:00
Pratham Jain 161 Reputation points
accepted 2023-09-14T09:59:06.8666667+00:00
Pratham Jain 161 Reputation points
0 answers

Text Getting Cut Off From Animated Label in WPF VB.NET Application

Hello, I have an application that has a text crawl in it. I am having some trouble getting the text crawl to go without chopping of the text. I want the crawl to scroll across the screen without reducing the width of the label. The animation works fine,…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
2,018 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,474 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,304 questions
asked 2023-09-09T17:43:34.66+00:00
Austin Althouse 26 Reputation points
commented 2023-09-14T08:13:46.9266667+00:00
Hui Liu-MSFT 21,376 Reputation points Microsoft Vendor
2 answers

Why Textbox Can't Accept Chinese Input

hi there. i use a textbox in WPF to display data, adn set it's IsReadOnly = true so that users can't modidy the data. then i attached a eventhandle to it's MouseDoubleClick. In this eventhandle, i set the textbox 's IsReadOnly = false, so that…

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,474 questions
asked 2022-07-04T15:55:33.667+00:00
卓凡 1 Reputation point
edited a comment 2023-09-14T06:46:40.65+00:00
sanshi2018 0 Reputation points
1 answer

bulleted/number list format in *.rtf file in WPF RichTextBox is disordered

See below format in *.rft file, after load the *.rft file into WPF RichTextBox, the formats are disordered. string 1 AAA string 2 AB BB After load into RichTextBox, or using TextRange.Save to a new *.rtf again. The source codes: var file =…

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,474 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.
8,953 questions
asked 2023-09-08T02:15:14.3+00:00
Scott Q-0525 121 Reputation points
commented 2023-09-12T02:57:18.16+00:00
Scott Q-0525 121 Reputation points