I am having a trouble with KeyboardPage.mcml and the related files. I copied them from the Microsoft SDK folder.
Here is the code that is used for calling the KeyboardPage.mcml with parameters:
public void GoToKeyboard(EditableText objEditableText)
{
bool password = false;
bool submitWhenDone = false;
if (session == null)
{
Debug.WriteLine("GoToKeyboard: " + objEditableText.Value);
return;
}
Dictionary properties = new Dictionary();
properties["Model"] = objEditableText;
properties["Password"] = password;
properties["SubmitWhenDone"] = submitWhenDone;
properties["Application"] = this;
session.GoToPage("resx://MyMediaCenter/MyMediaCenter.Resources/KeyboardPage", properties);
}
I am getting an error due to my session object. I have never used the session object in my project and it's value is always null. That's why when I wanna call the KeyboardPage.mcml with remarking the "if (session == null)" line I am getting an error: "The object reference is not set of an object".
Because the session is null!!
How can I set the session object as active? What's the role of session? Is there a way to call the KeyboardPage.mcml without using the session object?