I am starting with WPF and have a question,...how do i make this:
if i click on an item TreeView that different items would be displayed in ListView, depended on what is selected in TreeView.
for example, in a mail application, if i click on inbox (TreeView), inbox messages should be listed in ListView, same for Sent,... etc..
If anyone could link me a good example that explains this, i googled but wasnt successful too much,...
Okay, thanks i have a question though, with the OpenFileDialog,... for now we have to just add it to the menu so it shows up and add a filter to it (doesnt have to do stuff yet), but if i press cancel the whole application closes instead of just the OpenFileDialog,...
how can i fix that?
You don't need a 3rd party lib for that. Simply implement MVVM and done.
I'd suggest you to stop by at microsofts virtual academy, they have amazing stuff
Of course you don't need it but it would be advisable, though. Implementing the MVVM boiler plate code really isn't that great. I'd advise to only do that when learning how things work. Otherwise you really should work with frameworks that do handle much things easier and keep away the boiler plate.
By the way: How'd you do that if you seperate both ViewModels from each other? The ViewModel for the current inbox item needs to be parented to the ListView which actually doesn't make much sense. Event piping comes in really handy here because no composition is required.
Quote:
Originally Posted by Hikarim
what would be a good overall book to learn WPF? feel like i dont learn all that much in school :S
Schools teach WPF? Guess that's out of my scope, I've never had teachers that have done more than the absolute basics of the basics.
Quote:
Originally Posted by Hikarim
Okay, thanks i have a question though, with the OpenFileDialog,... for now we have to just add it to the menu so it shows up and add a filter to it (doesnt have to do stuff yet), but if i press cancel the whole application closes instead of just the OpenFileDialog,...
how can i fix that?
Where do you run that code? This code can't be the cause for this problem, except it is run in a cancel event or anything other that automatically closes the application after executing the function code.
the OpenFileDialog,... we just have to add it to the mebu in our app,... just so its tehre, no real use yet,...but when i run the app, and go to File->Open .. and then the OpenFIleDialog appears,... and if i click on ok or cancel, the whole application closes,...instread of just the OpenFileDialog
the OpenFileDialog,... we just have to add it to the mebu in our app,... just so its tehre, no real use yet,...but when i run the app, and go to File->Open .. and then the OpenFIleDialog appears,... and if i click on ok or cancel, the whole application closes,...instread of just the OpenFileDialog
the OpenFileDialog,... we just have to add it to the mebu in our app,... just so its tehre, no real use yet,...but when i run the app, and go to File->Open .. and then the OpenFIleDialog appears,... and if i click on ok or cancel, the whole application closes,...instread of just the OpenFileDialog
As I've said before, this code is not causing this behavior. There must be something other that closes/terminates the application if this event occurs. You should verify that by testing the OFD in another (blank) WPF project.