views:

11

answers:

1

Hi,

I'm developing an application using the Surface Toolkit for Windows 7 beta and stumbled upon this problem:

I'm having a ScatterView which should show all files in a folder. Therefore I use a FileSystemWatcher that recognizes adding, deleting and renaming files. For presenting the files I define the ItemTemplate. So far so good.

I'm new to C# and WPF but as far as I know, the best way to do this is to bind the ItemsSource property of the ScatterView to a Collection which is managed by my FSW routine. But I just can't get it to work!

Am I on the right way? Does anyone have some examples that could help me?

+1  A: 

i think the best way is to use view models to represent the files and bind the view models to the items in the scatterview instead

nathan_hc
I think that's what I've don (like I said, I'm kinda new to this ^^)I implemented the a class called FileItem which receives a FileInfo.I finally got it working. All I had to do is store the FileInfo instances in an ObservableCollection and set the ScatterViews DataContext to its instance.Thanks nathan!
ap030