Content
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…
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…
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…
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.…
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…
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…
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…
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…
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 ?…

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…
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…
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…
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
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…
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"> …
Disconnect RDP
There are methods to shut down Windows. If I am in an RDP session, how can I disconnect?
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…
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,…
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…
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 =…