Questions tagged [data-binding]

A general technique that binds two data/information sources together and maintains them in sync.

Data binding is a general technique that binds two data/information sources together and maintains them in sync. This is usually done with two data/information sources with different types as in data binding. However, in UI data binding, data and information objects of the same type are bound together (e.g. objects to Java UI elements).

If the binding has been made in the proper manner, then, each data change is reflected automatically by the elements that are bound to the data. The term data binding is also used in case where an outer representation of data in an element changes, and the underlying data is automatically updated to reflect this change. As an example, a change in a TextBox element could modify the underlying data value.

Ref:

WPF DataBinding: Windows Presentation Foundation () data binding provides a simple and consistent way for applications to present and interact with data. Elements can be bound to data from a variety of data sources in the form of common language runtime () objects and XML.

23688 questions
6
votes
4 answers

DataStateBehavior for Enum instead of bool? String?

Is there an easy way in WPF to bind VisualStates to enum values? Kinda like DataStateBehavior, but for an Enum?
Firoso
  • 6,647
  • 10
  • 45
  • 91
6
votes
2 answers

IDL-like parser that turns a document definition into powerful classes?

I am looking for an IDL-like (or whatever) translator which turns a DOM- or JSON-like document definition into classes which are accessible from both C++ and Python, within the same application expose document properties as ints, floats, strings,…
paniq
  • 1,109
  • 1
  • 11
  • 19
6
votes
2 answers

How can I selectively set the "Visibility" of a TabItem via DataBinding/Triggers

I have a tab page that should be hidden if a property (BlahType) is set to 1 and shown if set to 0. This is what I WANT to do:
Timothy Khouri
  • 31,315
  • 21
  • 88
  • 128
6
votes
4 answers

dotnet: ListChangedType.ItemDeleted is useless?

The ListChanged event for an IBindingList fires a type ListChangedType.ItemDeleted when items are deleted, perhaps by a user deleting a row in a datagrid control bound to the list. The problem is that the NewIndex into the list is invalid in this…
P a u l
  • 7,805
  • 15
  • 59
  • 92
6
votes
2 answers

angularjs databinding for uploadcare.com doesnt work

I'm trying to integrate an upload script into my page. Im using uploadcare.com. They provided a simple directive but I just can't get it to work: https://github.com/uploadcare/angular-uploadcare/blob/master/angular-uploadcare.js I'm setting…
Matthias Scholz
  • 1,015
  • 1
  • 13
  • 25
6
votes
1 answer

How does data binding avoid recursive update in WPF?

I am studying binding in WPF, then I have this question: let's say a dependency property is binded to a property of an object which implements INotifyPropertyChanged interface. when the binding target update the source, then the source's property…
Benny
  • 8,547
  • 9
  • 60
  • 93
6
votes
1 answer

Data binding of CSS class attribute in XML view

How can I bind the value of the CSS class attribute of a XML fragment to a model property within another XML view? The following snipped works fine and should be…
z00bs
  • 7,518
  • 4
  • 34
  • 53
6
votes
3 answers

DataItem=null on binding, can't find out why?

I am trying to reproduce what is suggested in Sheridan's answer to this question to navigate trough my views when using WPF with the MVVM pattern. Unfortunately, I am getting a binding error when I do so. Here is the exact error: System.Windows.Data…
Choub890
  • 1,163
  • 1
  • 13
  • 27
6
votes
3 answers

AngularJS : use a variable into

i have a controller named "HomeCtrl" which calculates the total number of user's into the {{total}} binding variable, like this: .controller('HomeCtrl', function($scope, $http){ $scope.total = 0; }); In my view, I am trying to display my total…
Alaa-GI
  • 410
  • 1
  • 5
  • 19
6
votes
2 answers

Explicit "Mode=Twoway" is required for Toggleswitch

Today I update a Windows Store app according to UI design change. One of the changes is replacing a CheckBox with a ToggleSwitch. So the code is updated from
kennyzx
  • 12,845
  • 6
  • 39
  • 83
6
votes
1 answer

Data Binding: multiple sources for one property

I want to bind one property to multiple sources. My reason for this are things like this: midpoint=point2.X - point1.X; //depends on two sources! How could this be realised? As far as I know it's not directly possible out-of-the-box?
stefan.at.kotlin
  • 15,347
  • 38
  • 147
  • 270
6
votes
2 answers

jQuery data binding library or plugin recommendation

Stopping short of full blown frameworks such as Angular, Knockout etc, could anyone recommend a jQuery plugin to simple data binding? It's needed for a shopping cart one page app that needs to update certain elements on the page after an ajax…
Simon
  • 2,484
  • 6
  • 35
  • 54
6
votes
2 answers

Databinding an enum to a ComboBox in WPF + MVVM

I've read this very related question here on SO, and it was extremely helpful because of the link in the answer. I'm just having a problem now going the extra step and making it all work with the MVVM pattern. Let's say I have my ViewModel, and it…
Dave
  • 14,618
  • 13
  • 91
  • 145
6
votes
2 answers

How to set the RelativeSource in a DataTemplate that is nested in a HierarchicalDataTemplate?

I have the following XAML, that does all that it is supposed to, except that the MultiBinding on the FontSize fails on retrieving the Users (I see DependencyProperty.UnsetData when I set a breakpoint in the converter). As you can see Users is an…
Dabblernl
  • 15,831
  • 18
  • 96
  • 148
6
votes
3 answers

Drawing a WPF UserControl with DataBinding to an Image

So I'm trying to use a WPF User Control to generate a ton of images from a dataset where each item in the dataset would produce an image... I'm hoping I can set it up in such a way that I can use WPF databinding, and for each item in the dataset,…
LorenVS
  • 12,597
  • 10
  • 47
  • 54
1 2 3
99
100