Commit Graph

15 Commits

Author SHA1 Message Date
Antony Male fdfaefa94e Implement another mechanism of backup ActionTarget, using IRootObjectProvider 2015-10-06 12:57:08 +01:00
Antony Male 54cd9cf18f Revert the BindingProxy stuff
Trying to do this properly turns out to just be unworkable
2015-10-06 11:54:33 +01:00
Antony Male 447f68f1f0 Only throw on click if action not found
It turns out there was a lovely little race with View.ActionTarget, where
either the View.ActionTarget or the corresponding {s:Action} could be
evaluated first. This meant setting View.ActionTarget was risky.

It happened to work in previous releases because the bootstrapper accessed
View.ViewManager, which caused its class ctor to run and somehow caused
View.ActionTarget to be evaluated earlier.

I don't think there's a decent way of getting around this: we can't
guarentee the order in which things in Xaml are going to be evaluated.
That's not the WPF way.

Therefore, only throw exceptions if someone actually clicks the button.
2015-10-03 15:50:55 +01:00
Antony Male b378027018 Introduce proper testing 2015-09-24 13:02:54 +01:00
Antony Male 4d767f0364 Refactor to add {s:ViewModel}, and use that for actions 2015-09-24 12:12:37 +01:00
Antony Male f4bf876c6b Mucking about with an integration test for BindingProxy
See also SetResourceReference and
BindingOperations.SetBinding(inputBinding, CommandProperty, new Binding("."))
2015-09-24 12:12:35 +01:00
Antony Male 509d428dc8 Move back to lots of separate arguments for ShowMessageBox - consistent with MessageBox.Show 2014-12-02 16:16:32 +00:00
Antony Male 83557fa29b Move ShowMessageBox onto the IWindowManager
Having it as an extension method is good architecturally, but make it harder
to change its behaviour. This way, users can override it easily if they wish.

This also means that the WindowManager does not depend on the IoC service
locator, insteady accepting a Func<IMessageBoxViewModel>
2014-11-29 20:50:21 +00:00
Antony Male 1beb6dc4d2 Cover a little more code 2014-05-21 12:27:01 +01:00
Antony Male 719653079a Use MessageBox in the integration tests and samples 2014-05-21 11:32:51 +01:00
Antony Male fc4a7fb61c Push coverage up to 99.7% 2014-05-10 20:11:02 +01:00
Antony Male 5ca2508fc0 More test stuff 2014-05-09 15:43:55 +01:00
Antony Male 4a527c75d6 Push code coverage up to 98.7%, including integration tests 2014-05-09 14:40:40 +01:00
Antony Male 7391bd6a14 Add integration tests for ActionEvents and CommandEvents 2014-04-09 12:35:59 +01:00
Antony Male b3ec49f567 Start on the integration test suite 2014-04-04 13:04:53 +01:00