I write simple Validation code for wpf . There is text box . If I enter invalid value or textbox is empty then Validation Error Temple appears on windows. This is okay. It works very well.
But I use this code another project. I use ribbon menu. When I clicked ribbon button in ribbon menu, My page is navigated in frame but Validation Error temple does not seem at page. If a enter a value and then delete then Temple appears. I don't Understand. What does same code behave
Your validation code is getting triggered when property text of your text box get changed. Some how on frame navigation property changed event is not firing on page load event. I will be able to help more if you provide your validation logic and the way you are binding the text box.
Related
I need help regarding dhtmlX form and combo list controls. I am getting a problem with the dhtmlx combo that created using dhtmlx control. The list of options appears and disappears immediately when clicked on the combo list. The same problem getting with an input box when I click on the input box the mouse focus is removed outside the input box
Unfortuanetly the porblem cannot be reconstructed in the default samples:
https://snippet.dhtmlx.com/wla7u1xq
Please, check if your events are not blocking or closing the combo operating with the input focus.
If the problem still occurs for you please, provide a sample or a code snippet, to check the deatils of your problem.
I have a form designed with the GUI designer with input textfields and buttons. I have attached actions to the buttons. When I call up the form with showForm(Form,null), the textfields are not accepting input and the buttons are not triggering the action. This is happening only for this form. Initially, there was the problem solved here Unable to call a specific form from a button in codenameone and then the problem solved here Simulator keeps defaulting to old Main form. What could be the issue now?
As far as I know there may be some issues as you say, but first need to see code
In the form after you added the text fields did you select the text field component and press action event?
Assuming you did that you should get a callback method in the Statemachine class.
This call will be invoked only when the user changes the content of the text field. You can run in the debugger and set breakpoints/step into code to see what is going on.
I am following the 'Stock Trader RI' example by the Prism team,
but it does not address this exactly :
I have a Shell with a Main Region in it.
In this shell I have some filter fields and a grid.
When I press on a button - I would like to load a screen that allows me to change the filters,
and then press 'Save'. This would then call a service to update the fields, and close the pop-up.
Here is an illustration of the 'Shell' before pressing the button (left) and after (right) :
Problems are :
The 'Stock Trader RI' sample app only uses a modaless dialog popup. I need a MODAL pop-up (background will continue to refresh, but user will not have access to it as long as pop-up is active).
Need to have Silverlight-like effect when pop-up shows, meaning - 'Shell' needs to appear 'disabled' (like a gray mask over it).
Pop-up window should have no 'X' button and no 'minimize' or 'maximize' buttons. The pop-up window should be simply a rectangle with curved-corners.
I don't think I can use a 'Notification Window' or a 'Confirmation Window' because I cannot put inside them whatever I want. This is an example with 2 fields, but the pop-up might be much more complex with tabs, and a lot of information shown to the user.
So how do I show a modal pop-up from my "WPF+PRISM" Shell-View-Model once the 'Edit' button is pressed ? (Meaning, once the 'EditCommand' is executed...)
I have found a solution here.
Basically it uses InteractionRequest and it allows me to open a window (that I can style however I want, without the 'Maximize' 'Minimize buttons), and also - I can choose for it to be Modal.
Great thing about this solution is - that I can use custom pop-ups and not only Notification or Confirmation pop-ups.
Also - I can pass information back to the class the invoked the 'InteractionRequest'.
Only thing that it doesn't solve - is that I cannot make the calling view look disabled by adding a gray semi-transparent over it ... haven't figured out yet how to do that...
I finally got validation working with MVVM in my Silverlight app. Now I'm wondering if there is a way to show the validation message that pops up to the right automatically without having to first click inside the textbox. The red border shows up, but it would be nice if the message was there as well. Any ideas?
You can edit the textbox's template to change how / where validation errors are shown. The default textbox template has them in a tooltip, you could, for instance move that to a label or textblock.
For an example of how to conveniently show it in a tooltip, check my blog post: Taking data binding, validation and MVVM to the next level - part 1
I want to show an error message when the text box is empty on button click. I don't want to display error in tool tip. Show error message in a separate text block.
This link should help you out
Implementing IDataErrorInfo is the most appropriate solution for error handling in WPF imho :)