Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/262.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
WP8运行时-如何在C#背后的代码中将内容绑定到电子邮件?_C#_Email_Data Binding_Windows Runtime_Windows Phone 8.1 - Fatal编程技术网

WP8运行时-如何在C#背后的代码中将内容绑定到电子邮件?

WP8运行时-如何在C#背后的代码中将内容绑定到电子邮件?,c#,email,data-binding,windows-runtime,windows-phone-8.1,C#,Email,Data Binding,Windows Runtime,Windows Phone 8.1,到目前为止,我还没有找到答案。我有一个WP8运行时应用程序,在我的详细信息页面上有以下代码,可以从该应用程序发送电子邮件: private async void Email_Click(object sender, RoutedEventArgs e) { // Create your new email message. var em = new EmailMessage(); // Add as much EmailR

到目前为止,我还没有找到答案。我有一个WP8运行时应用程序,在我的详细信息页面上有以下代码,可以从该应用程序发送电子邮件:

        private async void Email_Click(object sender, RoutedEventArgs e)
    {
        // Create your new email message.
        var em = new EmailMessage();

        // Add as much EmailRecipient in it as you need using the following method.
        //em.To.Add(new EmailRecipient("yourname@yourdomain.com"));
        em.Subject = "{Binding Description}";
        em.Body = "Your email body...";
        // You can add an attachment that way.
        //em.Attachments.Add(new EmailAttachment(...);

        // Show the email composer.
        await EmailManager.ShowComposeNewEmailAsync(em);
    }

我的问题是,如何使用我的详细信息页面中的绑定作为主题和正文?这样,来自每个详细信息页面的电子邮件将具有不同的电子邮件内容。

在示例代码的上下文中,您想将
em.Body
em.Subject
绑定到什么?我想绑定到我的数据模型-绑定到每个详细信息页面上显示的内容。如果是代码隐藏,您只需要从页面控件获取文本。。。因此em.Subject=SubjectTextBox.Textem.Subject=SubjectTextBox在WP8运行时对我不起作用