Questions tagged [wpf-controls]
WPF controls include UserControls, which are composite collections of other controls, and CustomControls, which are controls built with WPF styles and templates.
5,702
questions
0
votes
0
answers
25
views
WPF Control no connection to class
I would like to create a control in WPF for a button that lies beneath a border, as I prefer the buttons to have rounded corners. I have created a ResourceDictionary with the necessary code and then ...
0
votes
0
answers
58
views
Visual Studio Broken, Error XAML in WPF, The Name <property> Does Not Exist in The Namespace
Suddenly my WPF project had many errors in the XAML section this morning. The user controls stated not exist although it's in my project folder (ProjectFolder\UserControls). I'm currently using VS ...
-1
votes
0
answers
27
views
How do I color text in a RichTextBox from WPF? [duplicate]
I recently started with WPF and I wanted to make a RichTextBox function that takes a RichTextBox and then colors each occurrence of text from a Dictionary<string, SolidColorBrush> in the ...
0
votes
1
answer
44
views
WPF - stretch image to fit area
I'm trying to show the following, depending on the shape of the image (the blue block):
I'm having a few problems:
The image stretch should be constrained to its available area, determined by the ...
0
votes
1
answer
38
views
Slightly different behavior than ScreenSpaceGroup3D
I am using a ScreenSpceGroup3D class in sharpDX for my model because I need independent from zoom always the same size. Independent from change the camera position the model is always visible (...
0
votes
1
answer
39
views
How do I link/relate two children of a Syncfusion-DockingManager?
I use a Syncfusion-DockingManager to display a UserControl as content of a ContentControl. A property UserControl (also as content of a ContentControl) can be opened which displays data related to the ...
0
votes
1
answer
29
views
C# WPF Label background filled according to a percentage property
I would like to make a CustomControl Label, which could have a property called Percentage and the background would be filled according to that percentage. example: label.Percentage = 70 then the ...
0
votes
1
answer
48
views
Slider Control Update Label Based on Value Error on Slider_ValueChanged
Trying to do something super simple and I am not getting it. New to this programming stuff a bit. I have a slider control. I have two labels. One I have bound to the value of the slider to show ...
1
vote
1
answer
25
views
Trying to add a filter to a GridViewDataColumn from a derived class
So I have the following scenario
A RadGridView with the bingding for a List
This is My XAML
<telerik:RadGridView
x:Name="grid"
Grid.Row="0"
ItemsSource="{Binding ...
1
vote
1
answer
80
views
Main Window won't take up right half of screen in minimal WPF app
I would like to have my main application window occupy half of my monitor when launching my WPF app. In case I am using several monitors, I would like for the window to occupy the last of those ...
0
votes
1
answer
135
views
Is there a way to sort strings according to Excel's string sorting logic in Ascending order without writing custom code?
I am having a Infragistics XamComboEditor which needs its values to be sorted according to Excel's ascending sorting logic. It is bound to an ObservableDictionary<int, string> with ...
-2
votes
1
answer
78
views
Cannot Input Accented Characters Into WPF TextBox
I'm writing a WPF app to do Italian Vocabulary Drills.
When I try to enter an accented char using the Windows keyboard shortcuts it's only appearing in the text box as the underlying char.
For ...
0
votes
0
answers
18
views
Why the binding error occurred in nested TabControl
I am learning WPF TabControl and writing the test code below
XAML:
<Window x:Class="TabControlTest.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/...
0
votes
0
answers
29
views
Button that will move up/down when the upper line is created/deleted and the button will create a new line with CreationDate, Done and Todo
I need a button that will move up/down when the upper line with "CreationDate, Done, Todo" will be deleted or added. And this button should create line above itself with CreationDate, Done ...
0
votes
0
answers
21
views
VirtualizingStackPanel error due to changing screen resolution and scale
I'm writing a WPF net 5.0 application, interface have a VirtualizingStackPanel for view many and many elements in GridView and of course their virtualization.
It's all okey, but ever I change the ...
0
votes
1
answer
92
views
WPF - Flat Tree View Control
I'm trying to build a flat tree view like this:
I have deeply nested hierarchical data:
- A1
- B1
- ...
- X1
- Y1
- ...
- AJ1
- X2
- Y2
...
0
votes
1
answer
73
views
WPF Flicker Popup Window Near MouseCursor
I try to show a popup window in WPF next to the mouse cursor. The window position will be updated during the mouse move event. The main window is like this:
<Grid x:Name="_layoutGrid" ...
0
votes
1
answer
62
views
Example of Android style toggle button implementation in WPF
<Style x:Key="AndroidToggleBtnStyle" TargetType="ToggleButton">
<Setter Property="Height" Value="30" />
<Setter Property="Width"...
0
votes
0
answers
13
views
Extending ComboBox ItemsSource Collection in LostFocus Event of the ComboBox
I am using a ComboBox in an WPF application. The ComboBox displays items from the ItemsSource which is a ObservableCollection of Type SourceItem. The ComboBox has IsEditable enabled, so the user may ...
0
votes
0
answers
45
views
I am running an Infinite For loop in Windows form app, which is causing UI to not loading a form properly
I Have a Windows form app, i am running a infinite loop(For lopp) which is causing a form to not loading properly, cant get all the objects in the form. I am a newbee to this PC language, can anyone ...
0
votes
1
answer
46
views
Why does the text inside an element budge when I get the dropshadow effect by hovering the mouse over it?
I have a custom UserControl, a grid containing a single large button with a few elements inside of it. I added a dropshadow effect when the mouse is over it, it all works but the text inside the ...
2
votes
1
answer
51
views
How can I control wrapanel so if I removed an item the order doesn't change
In a listview, I am using Wrappanel as ItemsPanelTemplate
<ListView ItemsSource="{Binding TodoItemViewModels}"
ScrollViewer.VerticalScrollBarVisibility="Disabled"
Drop=&...
0
votes
0
answers
36
views
Problem In Storing The User's Data/Settings In The JSON File In WPF
I have one WPF application. There is one dropdown for the language in it. By default, The user will get the English language as selected.
But when the user will change the language to German and then ...
0
votes
1
answer
38
views
How to bind control position to scrolled position of datagrid
I want to group DataGrid columns by adding a descriptive header (Label) above:
("Header 1" above first two columns)
When resizing the columns the Label respones as it should:
("...
0
votes
0
answers
32
views
Progamatically Open The WPF Application From The System Tray [duplicate]
I have one application in the WPF that's by default running in the system tray.
I have one scenario in which the user can be confused.
The application is running in the system tray
Now, User tries to ...
0
votes
0
answers
31
views
Searching an exemple of C# code to display a panoramic 360 picture in WPF UserControl
I'd like to be able to display a panoramic 360 equirectangular image in a WPF Application.
Like this http://norikdavtian.github.io/ThreeJS-360-Panorama/
In this link, Three.js is used but I'd like to ...
0
votes
1
answer
141
views
WPF - WPFUI Library - Icons doesn't render on the Navigation bar C#
I am using a demo template from WPFUI for developing a WPF App while editing new items to the list for the navigation bar the icons don't render properly until you hover with the mouse like in the ...
1
vote
1
answer
55
views
Trying to make a WPF CRUD app and it is showing me a Static Resource error for some unknown reason
So I'm trying to make my own CRUD app based from what I've learned and I do know that I did not do anything wrong but for some reason this program keeps throwing an error about Static Resource ...
-1
votes
1
answer
34
views
WPF Setting property to its default value
In WPF, Does setting a default value to the property have performance impact?
For example :
SolidColorBrush x:Key="ButtonRed" Color="#FFEF0137" Opacity="1"
As default ...
0
votes
1
answer
45
views
Serializing and Deserializing multiple custom UserControls to a Canvas with WPF?
As stated in the title, I am attempting to serialize and deserialize the contents of a canvas within WPF. I have been using this link as my guide. In this case, the contents of the canvas are custom ...
0
votes
0
answers
21
views
Custom Tree View in WPF with Disappearing Icons and Virtualization Issues
I am working a WPF desktop application where I have implemented Tree View using ListBox control.
My ListBox has two StackPanels - one for content and the other for auto-display icons. It has ...
0
votes
0
answers
58
views
Access the canvas name in WPF in code-behind
I am new to WPF and are following tutorials online. I was trying to use the canvas name in the code-behind as it was in the tutorial but it's saying "the name doesn't exist in current context&...
0
votes
0
answers
122
views
How to set C# WPF ToggleSwitch control colors? (ModernWpf)
I am using the ToggleSwitch control, which is part of the ModernWpf toolkit within my WPF C# application.
I would like to be able override the colours of the control switch but am not sure which ...
0
votes
0
answers
47
views
C# WPF: FrameworkElementFactory add ComboBox Event Handler for DropDownClosed
I'm struggling to add the event "DropDownClosed" to my ComboBox template similar to how you can do for other events like:
ComboBox_Template.AddHandler(GotFocusEvent, new RoutedEventHandler(...
0
votes
0
answers
91
views
Navigate from loginUC UserControl to dashboard page in C# WPF using 'frame' after success log in
when the app start up it loads 'MainWindow.xaml'. The mainWindow have a frame
<!--MainWindow.xaml-->
<StackPanel Grid.Column="1">
<Frame x:Name="Mainframe&...
0
votes
1
answer
68
views
How can I access/set/get a textbox string, or a public string declared in MainWindow from a UserControl?
Context: My main window has a developer console that is hard coded into the main window to make it easier to bind the keystroke event to the main window - as such:
<Grid KeyDown="Grid_KeyDown&...
0
votes
1
answer
34
views
SelectionChanged Event Not Firing When Clicking on Empty Space Inside a Custom Border in a DataGrid Row
Here is my DataGridSamplePage.xaml
<Page x:Class="SampleWpf.DataGridSamplePage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://...
0
votes
0
answers
20
views
Style.Triggers in TimeSpanEditBox actipro doesn't work as expected
I'm using actipro version 22, I am trying to set the background color to green when mouseOver event occurs, but nothing happens.
<Window.Resources>
<Style x:Key="...
0
votes
1
answer
21
views
How to set button position proportional to the border of grid cell border in WPF
I am rearranging the elements in a window in WPF.
I have divided the page into a 3*3 grid and I want to put a button in one of the grid cell and control its size depending on the distance proportion ...
0
votes
0
answers
29
views
WPF layout control which would arrange its children using a down-then-across flow
I am looking for a WPF layout control which would arrange its children using a down-then-across flow as illustrated below:
The above example uses 2 columns. The number of rows results from rows = ...
0
votes
0
answers
36
views
Two way binding isn't working in a custom control (WPF)
I've created a custom control, combining a label and a textbox.
I would like to bind the Text property to a property of a viewmodel so that property can be changed by the user.
The controls are ...
0
votes
0
answers
55
views
How to trigger an animation with a routed event on a custom control in xaml-WPF C#
I am trying to build a WPF custom control to act as a toggle switch using the ToggleButton as base class. I have set up the ResourceDictionary for the style and added to it EventTriggers using the ...
0
votes
0
answers
160
views
How to set custom user agent and browser info in WebView2 in WPF
I am creating a WPF app which utilizes the WebView2 Component in C#.
At the moment the default info sent by WebView2 to websites, in regards to user agent information is:
"Mozilla/5.0 (Windows ...
0
votes
0
answers
25
views
WPF binding - Updating Viewmodel property not updating abstract usercontrol view's property [duplicate]
I have a viewmodel and an abstract usercontrol view. However, updating the viewmodel doesn't update the view.
In short, updating IsSelecting in the viewmodel doesn't update IsSelecting in the view.
...
0
votes
1
answer
21
views
WPF TextBox resize to tabcontrol width height
Hi all hopefully a simple answer on this one that I am missing, at the bottom of the application I would like to have the tabcontrol > tab items contents re-size. I am only so far having an issue ...
0
votes
1
answer
66
views
In C# WPF, how would I programmatically set a group of RadioButtons to have the characteristics of a ToggleButton?
In the Window designer, I would make a group of RadioButtons to have the characteristics of a ToggleButton like this:
<StackPanel x:Name="ToolPanel" Orientation="Horizontal" ...
0
votes
1
answer
49
views
WPF buttons not responding
I'm trying to use WPF to display a window for user to enter a password in my PowerShell script, the window works but buttons do not respond...
The main window (which also use WPF) works fine, I only ...
0
votes
0
answers
56
views
MahApps Progress Ring not showing up when Refreshing data
I'm trying to show a progress spinner when I hit a refresh to get new data in a table. The spinner appears for like a second but the task takes about like a solid 10 seconds. I want the spinner to ...
0
votes
0
answers
73
views
Patagames.Pdf assembly error in pdfium and Navisworks API using WPF
Working on an initial plugin for Autodesk Navisworks using WPF and I am trying to load a PDF file to that viewer window. I use PDFium package, installed it as instructed in patagames website with ...
1
vote
1
answer
214
views
How can I add tables to a WPF RichTextBox programmatically?
I'm trying to make a RichTextBox that has some common word processing features, namely tables. It doesn't seem like there is direct support for it, but documentation seems to point to the idea that ...