Nov 13, 2015 at 3:54 PM
Edited Nov 28, 2015 at 11:47 AM
here a new question of me.
I have a application that open a popup via controler
Public Function MonthlyReportEntry() As ActionResult
Return ViewModal(New MonthlyReportEntryViewModel, ViewLevel.Popup)
I want on some Fields on the Formular the possibilty to open a calculator window.
Public Function Calculator() As ActionResult
Return ViewModal(New CalculatorViewModel, ViewLevel.Popup)
The user press F4 and the popup come up. The user do the calculation and close the view. Now the problem is, that the ViewClosed-Event will not be fired. I have implementet like
Private Sub FinishCalculation()
UserSelectCancelAction = False
The View is closed but in the ViewModel that initated the View with follwoing command
''' Öffnet einen Taschenrechner um etwas zu berechnen und dann anschließend zu übernehmen
Public Sub ExecuteTextBoxF4Command(param As Object)
CalculatorField = CType(param, String)
_Context = Controller.Action("Calculator", "Calculator")
AddHandler DirectCast(_Context.Result, ViewResult).ViewClosed, AddressOf CalculatorViewClosing
The CalculatorViewClosing-Methode is not running.
Is that a Problem that I open a ModalView over the ModalView? How can I do it on the right way?
Thanks for Tipps and helping answers ;-)
The problem was a combination of two misstakes.
1.) I missunderstood the eventhandling of views and viewsmodal. viewsmodal have no ViewClosed-Events.
2.) WPF Binding of child properties in a View. I must create Properties in the view with Notify-Event that write to/read from the child property of an entity.
I found it out, while i debug the source code of code framework and understand the mechanism ;-)