1

Just a simple question really, might be to simple really but hey here goes.

What makes WPF binding so powerful vs say Winforms databinding?

What are you likes and dislikes about it?

Any code example that show it's power would be cool.

4
  • Data binding isn't really powerful at all. It's easy to use, but very limited. Commented Jul 26, 2009 at 10:25
  • What limitations are you talking about in WPF Guffa? Commented Jul 26, 2009 at 10:27
  • 1
    The fact that it can be done on any DependencyProperty? Commented Jul 26, 2009 at 10:28
  • 1
    target should be DependencyProperty, I think it is not limitation, source can implement INotifyPropertyChanged and it works powerful Commented Jul 26, 2009 at 10:47

2 Answers 2

3

One of the powerful features of WPF data binding is that it can be two way, that changing target property in code change the value in binded control if property is dependency or implements INotifyPropertyChanged the other powerful feature is converters see WPF Two way databinding explained,Properties and data binding and the tired one that I think should be mentioned is that you can use WPF databinding with Animation classes

EDIT

So WPF databinding has this and many other features that is difficult to implement in winforms

  1. Can be two way
  2. Can be used in templates
  3. Can load data Async
  4. Can have Converter
  5. Can be binded directly to XML
  6. Can be used in Animation
Sign up to request clarification or add additional context in comments.

Comments

0

The power of WPF binding comes when you bind it to something other than a property on a POCO object.

For example, you can bind one controls enabled state to another controls checked state, like so:

<StackPanel> <CheckBox x:Name="cb" Content="Enable next section" /> <Grid IsEnabled="{Binding ElementName=cb, Path=IsChecked}"> <Button Content="Click Me!" /> </Grid> </StackPanel> 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.