Ah, I have no time to study at work. I 'd like to talk about some tips.
A problem was encountered during the recent review, which was solved for a long time. It turned out to be a small problem: MessageBox
The original code is as follows. When no IP address is entered, the system prompts the user and jumps to the configuration page.
The code is as follows: |
Copy code |
MessageBox. Show ("set the receiver IP address before use "); GoToConfig (); // jump to the configuration page |
If you write such code in WPF, there is no major problem, but the problem occurs in WP7.
When the MessageBox modal window is opened, pressing the "Start Menu" Win key will lead to unexpected situations.
The MessageBox module window is closed and MessageBoxResult. None is returned.
Then continue to execute GoToConfig (); but now the interface and switch to the Start screen,
Directly throw the "This operation is not supported on a relative URI." exception.
Solution:
The code is as follows: |
Copy code |
Var result = MessageBox. Show ("set the receiver IP address before use "); If (result = MessageBoxResult. OK) GoToConfig (); // jump to the configuration page |
This story tells me how to use MessageBox in WP7. Pay attention to the returned information of MessageBox caused by the Deactivated event.