0

I'm developing a Windows desktop app in VB.NET Visual Studio 2010.

I'm trying to implement data binding for a collection of objects and it seems I need some XAML to do this:

How to: Make Data Available for Binding in XAML http://msdn.microsoft.com/en-us/library/ms748857(v=vs.100).aspx

My question is: where do I put the xaml mentioned in this article? I think it goes in the my form's resx file, but I'm not sure. Is so, why can I open the resx files for some of my forms in Visual Studio, but not all of them? I can open the file for frmMain.resx but not frmTest.resx--i have no idea why. I deleted and recredted frmtest but still, their is no View Code option when I right-click on it, but there is for frmMain.

Also, IF i'm suppose to put it in frmTest.resx, does it matter where I put it? Maybe just before ?

Sorry for the lowly noob nature of this question but I've never had to deal with this issue before.

EDIT It seems there may be two kinds of forms in Visual Studio "Windows Form" and "WPF Form"? Can I only do this kind of custom data binding with a different form type?

ChatGPT
  • 5,334
  • 12
  • 50
  • 69

1 Answers1

0

You will have to create a WPF application to use XAML. XAML is used in WPF to design the form as well as doing the bindings same as html in web. Even in the link you have shared, take a look at the root of the topics, it says Data Binding (WPF).

So, I believe you need do get hands on with WPF and XAML to do the binding.

The link below shows how to create a WPF application in Visual Studio 2010. http://wpftutorial.net/HelloWPF.html

Hope this helps.

Harsh
  • 3,683
  • 2
  • 25
  • 41
  • thanks! yeah I noticed the WPF (and edited my question). So is there then no alternative way to bind collections to ListView in regular Windows Form (not WPF) applications? – ChatGPT Sep 21 '12 at 09:51
  • Check this link http://stackoverflow.com/questions/2799017/is-it-possible-to-bind-a-list-to-a-listview-in-winforms – Harsh Sep 21 '12 at 10:30