XAML File
To add a SolutionView control to your XAML file, do the following:
1.Declare the MobileTogether namespace in your XAML page or control like this:
<Page...
xmlns:mobiletogether="using:MobileTogether">
2.Add the SolutionView control:
<mobiletogether:SolutionView
IsAutoSuspendResumeEnabled="False"
IsBackKeyEnabled="False"
IsEscapeKeyEnabled="False"
IsEnterKeyEnabled="False"
ServerURL="demo.mobiletogether.com"
Port="443"
UseSSL="True"
User=""
Password=""
SolutionURL="/public/MyCollections?Par1=123&Par2=456"
EmbeddedMessage="MyEmbeddedMessage"
SolutionFinished="OnSolutionFinished" />
For an example, see the topic Example UWP App.
Properties of the SolutionView control
The control's properties are listed below:
IsBackKeyEnabled, IsEscapeKeyEnabled, IsEnterKeyEnabled
Since multiple SolutionView controls can run in a single UWP app window, all running solutions would process the same Back, Esc, and Enter keys. To ensure that these keystrokes are not processed for the wrong solution, these three attributes enable these keys to be disabled for any given SolutionView control.
ServerURL, Port, UseSSL
The URL and port of the MobileTogether Server on which the solution has been deployed. The UseSSL attribute specifies whether the server connection uses SSL or not.
User, Password
Specifies the credentials of the user that is accessing the solution. To specify that access is anonymous, use the empty string as the value of both attributes.
SolutionURL
Specifies the path of the solution on MobileTogether Server. In the listing above, notice how SolutionURL can contain a solution's input parameters.
EmbeddedMessage
The embedded message that is sent from the SolutionView control to MobileTogether Server. The data must be sent as a serialized JSON object. (If your data is in XML format, then the XML document must be wrapped inside a JSON object.)
SolutionFinished
When the solution is finished or closed, the SolutionFinished event is fired. You can use this event, for example, to close the UWP app window after the solution finishes.