Forum Events for the OK and Apply Buttons
-
Tuesday, June 26, 2012 6:52 PM
What events do I need to subscribe to have the forum perform some code when the OK and Apply buttons are checked.
Thanks
Nick
All Replies
-
Wednesday, June 27, 2012 7:48 PMModerator
Navigate the WPF visual and/or logical trees to find the buttons and then access their click events.
See my blog for more info:
http://scsmnz.net/service-manager-2012-how-to-disable-form-controls-for-a-resolved-or-closed-incident-part-1/
Rob Ford scsmnz.net
- Edited by Rob.FordMVP, Moderator Wednesday, June 27, 2012 7:49 PM
-
Thursday, June 28, 2012 2:45 AM
What I would like to do is add functionality to the Apply and OK buttons. When these two buttons are pressed does it trigger a datacontextchanged event on the form. I can add my code the event there.
Nick
-
Thursday, June 28, 2012 3:04 AMModeratorWhat's wrong with the "Click" event?
Rob Ford scsmnz.net
-
Thursday, June 28, 2012 3:10 AM
Hi Rob,
I do not have the Apply and OK Buttons in Visual Studio. They are part of the Wrapper that SCSM adds to the forms. I am unsure how to add a click event to a control that I don't have in the xaml file.
Nick
-
Thursday, June 28, 2012 3:13 AMModeratorCheck the link to my blog that I posted. You need to "walk" the WPF logical or visual tree from your form to the container in the console and then to the "OK" and "Apply" buttons. Once you have a reference to them, you can += your own event handler as normal.
Rob Ford scsmnz.net
-
Thursday, June 28, 2012 8:51 AMModeratorThe right way to do that is add event handler to PreviewSubmit event.
http://www.scsmsolutions.com/ freemanru (at) gmail (dot) com
- Edited by Anton Gritsenko - FreemanRUMVP, Moderator Thursday, June 28, 2012 8:58 AM

