5,731 questions
-2 votes
0 answers
75 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, ...
2 votes
0 answers
127 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:...
2 votes
1 answer
77 views
How to prevent popup reopen
I have the below code: <ToggleButton x:Name="toggleBtn" Content="Open Popup" /> <Popup x:Name="pp" Placement="Bottom" StaysOpen="...
0 votes
0 answers
18 views
Setting the WPF ComboBoxItem Background Color when an ObjectDataProvider binding is used to populate ComboBox
I have a ComboBox with an ObjectDataProvider binding to an enum of colors. I have the enum descriptions displaying. I would like to have the ComboBoxItem background color match the designated color. I'...
1 vote
0 answers
66 views
How to create a base style for rounded button in WPF XAML? [duplicate]
I created a WPF Class Library so that it would contain base styles that will be used in WPF application. In that class, I wanted to create like base styles for like buttons, expanders, etc. where say ...
2 votes
0 answers
58 views
WPF Custom Control VisualState affecting other instances when using StaticResource for themed colors
Problem: I've created a custom WPF Button control with a ControlTemplate defined in a ResourceDictionary. This template uses DynamicResource for initial Background and Foreground properties (to ...
0 votes
0 answers
86 views
WPF FlowDocument: how to make Table to size to content and not full page width?
I have FlowDocument containing simple Table with two columns with short content. And I want Table to not size to full page width but to minimal required width, according to content. And I want Table ...
1 vote
1 answer
54 views
WPF .NET app: how to set MenuItem text background style triggered when MouseOver its Parent is True
I've managed to edit the copy of the Menu and MenuItem template to be used as styles for respective Control Elements with the triggers shown in the code snippets below The problem is i couldn't figure ...
0 votes
0 answers
141 views
WinForms Guna UI: Controls with Top-Right Anchor jump during side menu animation(2025)
Issue Summary: I'm working on a WinForms application using the Guna UI 2 library. I have a collapsible left side menu (Panel) that expands/collapses using animation (Timer). The problem: Controls ...
0 votes
0 answers
61 views
Duplicate Points from Scatter Plot are displayed in Live Charts Core
I'm new to C# WPF and Live Charts Core, and I'm trying to build up my knowledge in that field. I have an application that shows every second the output that comes from a random number generator as a ...
0 votes
1 answer
64 views
ImageSource of Image.Tooltip unreachable
In the code behind I cannot seem to access the Image (or any child) control of a Tooltip of an Image. Setup: I have a UserControl with an image that on hover displays a tooltip with a larger version ...
-1 votes
1 answer
103 views
WPF screenshot not saving correct size [closed]
Hey all I am trying to figure out why my output is not looking like I am wanting. Currently my layout looks like this: <Window x:Class="howto_wpf_number_icons.Window1" xmlns="...
0 votes
0 answers
87 views
WPF UI ContentPresenter Dialog Appears Behind WebView Loaded from Navigation
I'm building a WPF application using WPF UI. In my MainWindow, I have a NavigationView that loads pages when menu items are clicked. One of these pages contains a WebView, and that page has a button ...
-1 votes
1 answer
68 views
Custom Control Partial declarations of 'DigitTextBox' must not specify different base classes
I'm building a Custom Control. Added an event to the xaml. Compiler complained, I added an x:Class entry. Then it complained that my class needed a partial verb. And now it's complaining: "...
0 votes
0 answers
33 views
How can I get the WPF ResizeGrip control and the Cursor to sync in position when I move the mouse using ScaleTransform?
I have a WPF desktop app that has a grid control that floats on the screen. With the code below I resize my grid with a ResizeGrip located on the bottom right corner of the grid. I have attached the 3 ...