170,050 questions
0 votes
0 answers
41 views
.NET Framework SDK project: Launch arguments duplicated for x64 platform
I'm working on a C# .NET Framework 4.8 SDK-style project (WPF, Sdk=Microsoft.NET.Sdk). I want to pass command-line arguments to my project when running from Visual Studio. I created a launchSettings....
-1 votes
1 answer
42 views
Is there a way to prevent part of a control template from triggering an event?
I have a ControlTemplate for a ToggleButton. What I would like to have happen is that part of the Template can be clicked to check and uncheck the ToggleButton, and part, when clicked, does not ...
1 vote
1 answer
41 views
Velopack is not updating version of WPF application
My WPF app is Windows only. I cleared my */Releases folder and build my project: dotnet publish --self-contained -r win-x64 -o .\publish Then I created a release: vpk pack --packId MyApp --...
0 votes
0 answers
30 views
InjectSyntheticPointerInput not properly working although NUnitTest Passes
Im trying to simulate stylus properties like x, y coordinates, tilt, pressure which I have dumped in a json file. In NUnitTest im trying to simulate exactly the same json with WinAppDriver in ...
0 votes
1 answer
49 views
WPF returns UnsetValue on RelativeSource to Ancestor
I was able to create a neat context menu that controls visibility of columns and wanted to show values of hidden ones in a tooltip, but I'm unable to, because somehow the very same binding is ...
Advice
0 votes
0 replies
23 views
Ever struggled with emissive materials in WPF Viewport3D with RenderTargetBitmap? I may have discovered the answer
This is just a PSA regarding an extremely annoying issue I've solved for myself. In WPF, if you have a Viewport3D and want to export it as an image, you'll probably want to use RenderTargetBitmap. If ...
0 votes
1 answer
100 views
Get System.Timers.Timer to fire on a WPF Window's thread using the Timer's SynchronizingObject
I tried setting the SynchronizingObject like this: timer.SynchronizingObject = this;//The Window but VS told me I need an explicit cast. So I did that and the error went away. timer....
0 votes
1 answer
86 views
WPF MVVM: View XAML throws runtime exception when instantiating inventory management window
I'm creating a WPF application to manage inventory, but I'm having trouble creating the views. I'm using the MVVM pattern, and I'm getting an error when instantiating the Views XAML file. It would be ...
Best practices
0 votes
1 replies
23 views
Dockable panel height issue revit api - wpf
I have an issue with setting the height of a Dockable Panel in Revit. I created a panel that should appear at the bottom of Revit with a fixed height (for example, 50 px). However, every time I start ...
0 votes
2 answers
107 views
method to show notification in WPF project causes an "unexpected token error"
According to the documentation available from Microsoft, the code that should show a Notification toast on Desktop looks like this //correctly imported the Notifications library using Microsoft....
0 votes
0 answers
67 views
WPF "View Source" in Live Visual Tree stopped working - can't open XAML or code-behind
I'm learning how the back end and front end work together by reviewing WPF (Window Presentation Foundation) code. The project runs locally on my machine. I copied it from my team's shared folder. My ...
0 votes
0 answers
60 views
How can I place the WPF-UI TitleBar TrailingContent on the left side?
I am using the WPF-UI (Lepo) library, and I want to move all buttons in the TitleBar.TrailingContent area to the left side, as shown in the screenshot. Here is my current TitleBar XAML: <ui:...
0 votes
1 answer
115 views
How to display Openstreetmap map on C# & WPF ? I only get black screen
In mainwindow.xaml.cs, I added a toggle button event to switch from current mode view to the interactive Open Google Streetmap view. At the top I added: using Microsoft.Web.WebView2.Core; and then in ...
-3 votes
0 answers
53 views
WPF Flyout Positioning Issue with FlowDirection="RightToLeft" [closed]
Problem Description I'm developing a custom WPF Flyout component that uses Popup with CustomPopupPlacementCallback. The Flyout positions correctly when the Window has FlowDirection="LeftToRight&...
-3 votes
3 answers
126 views
WPF UserControl displaying a form with collection of UIElements
I need guidance on how to make a user control with one or more UI controls defined when the user control is used. Let's say the user control is named MyControl. Here is the use of this control: <...