170,055 questions
-1
votes
0
answers
24
views
Dockable panel height issue revit api
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
0
answers
44
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
1
answer
99
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
2
answers
109
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:
<...
-4
votes
1
answer
168
views
Display directly on screen. Work on Windows 10 not on Windows 11
A few years ago I wrote a WPF program which displays Google Agenda items (with some transparency) directly on the screen of Windows desktop.
This program works perfectly under Windows 10, by calling ...
-1
votes
0
answers
71
views
Is it possible to dynamically create buttons in WPF based on the number of devices set in an INI file? [duplicate]
Assuming the number of devices is set in the config.ini file as follows:
[Device]
Count = 10
When my WPF program starts, I want to automatically create buttons based on the Count value. For example, ...
-4
votes
0
answers
106
views
Binding textbox to an image in WPF
I'm creating an app for a clinic, they want to add the option of filling a prescription inside the app and printing it from there. I tried to just put some textboxes for the info, and put those over ...
0
votes
0
answers
36
views
Re-registering a Prism region when a pin tab in TabControl
I implemented a tab system using Prism regions and Syncfusion TabControlExt. Briefly about the system: MainTabControlViewModel is the main ViewModel that stores a collection of tabs. The tab objects ...
0
votes
1
answer
99
views
Can't get PNG resource to show up in Visual Studio WPF designer
I created a simple program to replicate the issue.
I've created a custom control holding one generic string dependency property:
using System.Windows;
using System.Windows.Controls;
namespace Test
{
...
0
votes
1
answer
133
views
How to display rounded corners to the DataGrid in WPF?
I have the code to display rounded corners to the DataGrid. My problem is that it is not displaying rounded corners at the bottom of the DataGrid. How to make it rounded?
This is the code I am trying....
0
votes
0
answers
62
views
Drawing a color wheel with fxc shader in a WPF app
I want to achieve something like this with fxc shader in a WPF application.
So far, with the below hlsl (High-Level Shading Language) code, I managed to produced this picture:
The problem is that I ...
-1
votes
0
answers
90
views
How to overlay the tabcontrol on the native windows window in C#? [duplicate]
Hi i just wanted to ask if its possible to put Elements on the native windows windows
Like
Ie11 [https://www.postimg.cc/8kWYZM8z]
and [https://www.postimg.cc/c40nVyz3]
and [https://www.postimg.cc/...
0
votes
2
answers
122
views
How to share values that are split from one property across multiple controls in WPF & C#
I have a case where say I have one property that has a string which contains a separator (e.g. ':'). I have 3 text boxes and I would like to share each separated part value in each textbox and also ...
0
votes
2
answers
107
views
WPF ComboBox equivalent of VB6 ComboBox.Click event
I am migrating an old VB6 application to WPF (.NET 8).
In VB6, the ComboBox control has a Click event that fires only when the user actually selects an item from the drop down list. It does not fire ...
0
votes
1
answer
83
views
How can I Set Focus to an item property in a TreeView
Set Focus to an item property in a TreeView
The TreeView looks like:
<TreeView
Name="Tree"
BorderThickness="0"
ItemsSource="{Binding Items}">
<...
0
votes
1
answer
72
views
How to make animation when mouse over (ignoring clicks) in WPF template
I'm using WPF with DevExpress, and I'm creating a custom template for the DockLayoutManager tab headers. My goal is to have animations that play when (and only when) the mouse enters or exits the ...
1
vote
0
answers
120
views
In case of large number of items Context Menu is slowing down WPF application view rendering
I have following context menu defined as a part of the DataTemplate in xaml:
<DataTemplate DataType="{x:Type viewModel:OverviewAnnotationItemViewModel}">
<views:...
0
votes
3
answers
59
views
Getting selected item of datagrid, which is an element of an observable collection
I've found lots of options for getting the selected item of a datagrid - easy. However, I have a property (DataGridViews) bound to an ItemsControl in xaml, which is an ObservableCollection. ...
0
votes
1
answer
80
views
WPF DataGrid with DataGrid Template Column. Getting Mouse Wheel Scroll to work
I have a datagrid. On of it's columns is a template column containing a further "sub" data grid. This allows me to display hierarchical data and looks pretty good.
<DataGrid Name="...
-1
votes
4
answers
202
views
Is there a way to debug xaml file in Visual Studio?
I'm working on a WPF project targeting .NET 8. I have a breakpoint set on a line 127 in xaml file, but the debugger never hits it, even though I expect the corresponding UI logic to execute.
The ...
2
votes
0
answers
45
views
Can I impersonate a gMSA (managed service account) with LogonUser/WindowsIdentity to test folder write access? [duplicate]
I’m building a Windows installer (WPF, .NET 8) that needs to validate a chosen account (either a domain user or a gMSA) can write to several directories before installation. The simplest way I’ve ...
1
vote
1
answer
106
views
How to get the HWND handle of elements in .Net MAUI [duplicate]
I'm integrating the Dahua CCTV SDK (for live cameras) into a .NET MAUI application. I've successfully implemented this in WPF using HwndHost and in Avalonia using NativeControlHost, but I'm struggling ...
0
votes
0
answers
84
views
How do I create a custom MouseButtonEventArgs in WPF?
I need to pass additional data in a WPF mouse event, so I'm trying to create my own event args inheriting MouseButtonEventArgs. What's the correct way to subclass it? I can't get it working how I want ...
1
vote
0
answers
75
views
Resolving ServiceProvider DI Container and Prism Dialog registration
I currently have a ServiceProvider that registers certain types from the current assembly within one container. I am trying to implement a separate prism dialogservice that would register only ...
0
votes
1
answer
122
views
How to make a WPF program launched by a background process gain focus? [closed]
I have a custom-styled WPF application that is launched by a background process, which in turn is started by a Windows Service. The service runs in Session 0, while the background process and WPF app ...