data-binding Questions

5

Solved

is it possible to bind an itemscontrol with canvas as template to multiple DataTemplates? I have 2 collections and depending on the type I would like to display a different control on my canvas. ...
Barstow asked 29/3, 2011 at 13:8

10

Solved

I am using android's data binding library for views in a library project i have added the following line in my root gradle file classpath 'com.android.databinding:dataBinder:1.0-rc1' and have e...
Lillia asked 30/11, 2016 at 7:6

5

Solved

I have this DataTable with the following structure: ID | VALUE ---------------- 1 | Item 1 2 | Item 2 3 | Item 3 And I display the values from the DataTable into a CheckedListBox control by addi...
Thong asked 27/9, 2010 at 5:20

10

Solved

I have a class which give me this error public class Item { public string Name; public int Id public Item(string name, int id) { Name = name; Id = id; } } Here is my function var l...
Garling asked 10/9, 2014 at 9:26

3

I have tried everything and got nowhere so I'm hoping someone can give me the aha moment. I simply cannot get the binding to pull the data in the datagrid successfully. I have a DataTable that con...
Wardle asked 20/4, 2010 at 17:55

0

I wanted to have data validation at once in WPF binding so I used PropertyChanged at UpdateSourceTrigger. At the same time I wanted to detect LostFocus, this is the time I modify the DB. Moreover, ...
Decor asked 6/5, 2024 at 15:13

7

Solved

So I've been searching around and cannot find out exactly how to do this. I'm creating a user control using MVVM and would like to run a command on the 'Loaded' event. I realize this requires a lit...
Julietjulieta asked 12/4, 2012 at 15:37

9

Solved

I have an error with a combobox My code: SqlConnection conn = new SqlConnection(); try { conn = new SqlConnection(@"Data Source=SHARKAWY;Initial Catalog=Booking;Persist Security Info=True;User ...
Roubaix asked 19/9, 2012 at 12:24

3

I have an abstract BaseActivity in my library module: @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); //Normal method to inflate th...

2

I am using .net Maui MVVM source generators to create properties as observable properties. I am using System.Text.Json.Serialization to serialize the properties of a class to JSON. When I use [Json...

5

Solved

I'm trying to bound a DataGridViewComboBoxColumn to an instance of Foo, but when i set a value on the grid i got a ArgumentException telling me that i can not convert from String to Foo. var data ...
Overcoat asked 10/3, 2009 at 16:34

6

Solved

I am trying to do this as asked earlier. The only difference that I found is additional List item that was included in above code. I tried to use AppendDataBoundItems=true but it is still not work...
Narcose asked 13/8, 2010 at 7:54

12

Solved

I am trying to format a textblock which is bound to a TimeSpan property. It works if the property is of type DateTime but it fails if it is a TimeSpan. I can get it done using a converter. But I am...
Angloirish asked 30/12, 2010 at 13:47

4

I have an ObservableCollection<SolarSystemViewModel> where SolarSystemViewModel derives from the ViewModelBase. The ViewModelBase exposes IsInDesignMode and IsInDesignModeStatic that are show...
Isoprene asked 12/2, 2013 at 21:27

4

Solved

I'm trying to bind a TextBlock to a specific element in an ObservableCollection. This is what I do right now: private ObservableCollection<double> arr = new ObservableCollection<double&gt...
Leighannleighland asked 24/3, 2011 at 7:9

7

I want to bind Listbox selectedItems to array. But .NET throws exception at runtime. d.SetBinding(ListBox.SelectedItemsProperty, new Binding { Source = SomeArray }); Where d is some ListBox from...
Atropos asked 29/4, 2010 at 10:30

11

Solved

I am having problems with asp.net binding to a dropdownlist and I have no clue on how to debug. I checked out the other questions about this on stack but nothing has helped. As far as I can see the...
Snoop asked 1/2, 2013 at 20:11

6

Solved

I have a WPF application that uses MVVM data bindings. I am adding items to an ObservableCollection<...> and quite many of them indeed. Now I am wondering that every time I add one to the co...
Taxiway asked 13/5, 2012 at 14:27

7

Solved

Are there any known issues when databinding to a control's visible property? The control is always NOT visible regardless of what my property is. Public ReadOnly Property IsRibbonCategory() As Bool...
Whitney asked 8/4, 2009 at 16:21

11

Solved

I have some problems when I try to bind the height and width of a window to properties in my view model. Here is a small sample app to illustrate the problem. This is the code in app.xaml.xs publi...
Grape asked 20/4, 2010 at 8:20

2

Solved

I'd like to reference a parent viewmodel as a command binding. I was expecting the MAUI syntax would work like the Xamarin does but I get the following errors: '}' expected '�' expected Here is t...
Depolymerize asked 3/12, 2021 at 8:52

3

Solved

I wonder if anyone can help. I have been banging my head against this problem for half a day now, I must be doing something wrong. I have a custom control with a number of dependency properties. [...
Delphadelphi asked 23/5, 2011 at 16:37

11

Solved

I am trying to load an image using glide but somehow I can not load the image using glide. As it shows following error: Failed to find GeneratedAppGlideModule. You should include an annotationPr...
Historied asked 18/4, 2018 at 13:57

36

Solved

I am using Data Binding in my project, when using <layout> and <data> in my xml binding class is not generated. For example i have activity_main.xml <?xml version="1.0" encoding="...
Syrinx asked 14/9, 2016 at 5:33

5

Solved

I'm currently using winforms databinding to wire up a data editing form. I'm using the netTiers framework through CodeSmith to generate my data objects. For database fields that allow nulls it crea...
Libretto asked 17/12, 2008 at 22:55

© 2022 - 2025 — McMap. All rights reserved.