Silverlight FX looks like it will cover my MV开发者_如何学JAVAVM needs, however I'm struggling to find good documentation on the behaviors system (or any good doco) beyond some blog posts which are from previously released versions.
Specifically, I am trying to figure out how I can capture a RowCommit event from my view and have it invoke a method/event on my view model? I am trying to capture this event from the ComponentOne datagrid, but there is nothing in the framework than indicates it wont work with third party controls.
Any ideas?
I do really need to write up some docs... partly hoping a reference sample will help just as well. Do look at the sample apps - they're all compiled/working, and demonstrate a variety of scenarios.
Your specific question... note I haven't seen/used that particular vendor's control... but some educated guess:
<componentOne:DataGrid>
<fxui:Interaction.Triggers>
<fxui:EventTrigger EventName="RowCommit" Action="$model.SomeMethodOnViewModel()" />
</fxui:Interaction.Triggers>
</componentOne:DataGrid>
You can pass in data from eventargs - for example, if EventArgs contains a reference to the Row which contains a reference to a model item just committed, you might be able to refer to it with $eventArgs.Row.DataContext and pass that in into the SomeMethodOnViewModel.
Hope that helps.
There is no documentation available that I am aware of. I was able to learn the most by looking at the C# source files provided in the download and the various articles that the author wrote on his blog. Looking at the source code of the samples that the author provides also helped.
精彩评论