23,942 questions
0
votes
1
answer
34
views
How to dynamically create and data-bind ComboBox in code?
In my Avalonia app using the MVVM Community Toolkit, I need to dynamically create a ComboBox from code-behind, having it data-bound to a collection of a subclass of a class that encapsulates ...
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
{
...
1
vote
1
answer
124
views
How can I resolve issue about BindingExpression in WPF c#?
I am working on a configuration editor and I was having issues binding ObservableCollection to combobox items in XAML.
My setup:
I am using Prism
I am also using MaterialDesignThemes in the project
...
0
votes
1
answer
103
views
VB.NET DataGridView not showing label row with EmpId and EmpName before attendance rows
What are you trying to do?
I'm building an attendance summary grid in VB.NET (Windows Forms). For each employee, I want to insert a label row before their daily attendance rows. This label row should ...
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="...
2
votes
3
answers
112
views
Trouble binding data to an IDrawable
I'm trying to put together an app, but I've run into problems trying to get data into an IDrawable graph display. The app is just supposed to show a plot of random data from a float[] which is then ...
0
votes
1
answer
127
views
User Control with binding showing in Designer but not in runtime
I have a main Window that opens a second Window. In this second Window I have many custom UserControls generated in runtime that work just fine. But a group of custom UserControls are declared in the ...
0
votes
0
answers
45
views
Angular - how to display the selected's label of dropdown on the md-table when data is bind
The md-table is bind to data assets where application_id is an integer.
The dropdown is populated with possible values with:
Value = application_id, Label = application_name
The table is editable ...
0
votes
1
answer
162
views
Property not updating view when getting changed from another VM
I am using Avalonia with CommunityToolkit MVVM. When I change the Property (integer) within the original VM, where it is defined, it does update the view. When I change the Property from a child class,...
0
votes
2
answers
73
views
What is the way to dynamically bind a language resource to a text property in WPF?
I know about DynamicResource and it works well. But in my program I have a TreeView and several DataTemplates (for categories and for items). And the element has its own name key(of resource). So ...
1
vote
0
answers
30
views
Blazor form model binding fails on nested route like "/System/Authentication/login" but works on simple route "/login"
I'm using Blazor Server and have this page directive:
@page "/login"
My form model binds correctly here. But when I change it to:
@page "/System/Authentication/login"
the model ...
0
votes
2
answers
107
views
Leaflet.js Tooltip Rendering Issue When Binding Dynamic Data to Station Markers in Loop
I'm working on a route visualization tool using Leaflet.js to map Amtrak train routes. I'm loading station coordinates from a JSON array and creating markers with custom tooltips showing station names,...
1
vote
2
answers
112
views
Programmatically bind values to a CollectionView in .net Maui
I am trying to create a simple CollectionView in Maui programmatically. The ItemSource is just a list of int.
var intValues = new List<int>() { 1, 2, 3, 4, 5, 6 };
var pointsCV = new ...
-1
votes
1
answer
71
views
Pass current element of ItemsControl to viewmodel of child UserControl
I have a component Parent with the ViewModel ParentViewModel, which contains
public ObservableCollection<string> FileNames { get; set; } = new();
I want to pass the current element of this ...
0
votes
1
answer
97
views
WPF C# Data bindings on custom controls
I want to create a custom control that will act as a draggable control (drag and drop), and use it in a window.
my problem is that I cant get the binding to work.
Data context is being set in window....
0
votes
1
answer
50
views
Binding input in a child component in Blazor WASM app
I'm working on my version of an auto complete component in a Blazor WASM (Standalone) app targeting .NET 9.
I'm able to bind an input to a string variable and take action as user types in his/her ...
0
votes
1
answer
67
views
Why does my radio button binding not work properly?
I have trouble with the binding of radio buttons in Blazor. I created a blazor fiddle. Please test the following:
Open the fiddle.
Click some radio buttons and see that the text input is updated ...
0
votes
0
answers
45
views
Castor support w.r.t Jakarta migration
We are using Castor-xml-1.3.2 version in our project and in near future we would be migrating to Jakarta specs. from Java EE specs. We would like to know if any plans to support Jakarta specs in ...
0
votes
0
answers
65
views
How to bind .NET 9 Winforms controls to object
I am trying to bind 2 textboxes to a class with Email and Password properties. I using INotifyPropertyChanged on the class. I set the values of the class in my form load event to test that the ...
1
vote
1
answer
94
views
Trying to make a tooltip's visibility change based on its text (hide if empty) and a boolean [duplicate]
This has been marked as a duplicate of this question, which solves a different problem and does not mention anywhere how to solve the Binding problems I had. They were trying to bind ToolTip to ...
0
votes
1
answer
109
views
Does BindingList<T> benefit from BindingSource or INotifyPropertyChanged?
I have a WinForms form that defines a BindingList<Item>. And this list is assigned to the DataSource property of a ListBox.
This works pretty well. Any changes made to the list are also ...
0
votes
2
answers
473
views
In .NET MAUI with MVVM, How do you implement a SwipeView in a CollectionView
I have been at this for several days. Please show me my dumb error.
I have even dumbed down my code to just about match the example in this article with no luck.
(https://learn.microsoft.com/en-us/...
0
votes
1
answer
55
views
WPF Databinding inside <Usercontrol> header not working
I have a problem where if I databind the visibility of my usercontrol inside the definition of my <Usercontrol> I get an error. However, if I copy/paste the exact same binding definition into ...
0
votes
1
answer
73
views
ObservableCollection of Doubles in WPF is Showing Only First Item
In my WPF project, I have a ListView's data binding set to an ObservableCollection of my model DashboardSample as follows:
public ObservableCollection<DashboardSample> SampleOutput { get; set; } ...
0
votes
0
answers
32
views
C# WPF: How to change a cell's FontWeight and Background based on its new value?
I'm defining a DataGrid in my xaml, where each row represents a book, and each column a field associated to this book (similarly to a SQL table). I want the cell to appear a with a yellow background ...