Tag: windows phone 7

“post的链接必须指向应用程序的连接或canvasURL”?

我正在使用Facebook C#SDK为WP7构建应用程序。 当我尝试将消息发布到用户墙(只是一条简单的消息)时,一切正常。 但是,当我尝试将链接发布到用户墙时,我收到此exception消息: (OAuthException)(#100)post的链接必须指向应用程序的连接或canvasURL。 有谁知道如何解决这一问题? 我听说过canvas应用程序,但我认为这不适用于手机应用程序。 也许这是Facebook上的一个设置? 任何反馈都表示赞赏。 这是我用来发布到Facebook的代码: private void button1_Click(object sender, RoutedEventArgs e) { _fbClient.PostCompleted += (o, er) => { if (er.Error == null) { MessageBox.Show(“Success”); } else { MessageBox.Show(er.Error.Message); } }; var args = new Dictionary(); args[“name”] = “Hello World!!”; args[“link”] = “http://www.nfl.com”; args[“caption”] = “”; args[“description”] = “”; args[“picture”] = […]

WCF + Windows Phone 7

是否可以使用Windows Phone 7应用程序的WCF服务? 任何链接都会非常有用。 谢谢

如何将枚举绑定到列表框?

我有一个Silverlight(WP7)项目,并希望将枚举绑定到列表框。 这是一个包含自定义值的枚举,位于类库中。 我该怎么做呢?

为什么我的事件处理程序触发两次?

嘿家伙我有一个艰难的时间试图解决这个问题我已经在3小时仍然无法找出为什么它这样做…这里是代码 private void Catagory_SelectionChanged(object sender, SelectionChangedEventArgs e) { int selectedCategoryId = categoryIdList[categoryListBox.SelectedIndex]; client.GetItemsAsync(selectedCategoryId); client.GetItemsCompleted += new EventHandler(client_GetItemsCompleted); } void client_GetItemsCompleted(object sender, GetItemsCompletedEventArgs e) { itemIdList.Clear(); itemNameList.Clear(); itemNumberList.Clear(); itemDisplayList.Clear(); //Clears the Display List Items if (e.Error == null) { itemIdList = e.ItemIDList; itemNumberList = e.itemNumber; itemNameList = e.Result; for (int i = 0; i < itemIdList.Count; […]

如何在Windows Mobile 7上的C#中获取操作系统名称和版本详细信息?

如何找到使用Windows Phone os的手机中安装的操作系统名称和操作系统版本。

如何解析C#中的JSON数组值(Windows Phone 7)?

我在WP7工作。 我需要将JSON数组值解析为列表框。 有人说,使用Serializer和Deserializer,但我不知道如何使用serilizer和反序列化器将这些值解析为combobox或列表框?

如何将System.IO.Stream转换为图像?

如何将图像Stream (我使用MediaLibrary的Album.GetArt方法检索到)转换为应用程序中的可用Image ?

如何使用.Net阅读公共Twitter提要(在Windows Phone上)

我正在尝试阅读用户的公共推特状态,以便我可以在我的Windows Phone应用程序中显示它。 我正在使用Scott Gu的例子: http : //weblogs.asp.net/scottgu/archive/2010/03/18/building-a-windows-phone-7-twitter-application-using-silverlight.aspx 当我的代码从异步调用返回时,一旦我尝试使用e.Result,我就会收到“System.Security.SecurityException”。 我知道我的uri是正确的,因为我可以在浏览器中填充它并获得良好的结果。 这是我的相关代码: public void LoadNewsLine() { WebClient twitter = new WebClient(); twitter.DownloadStringCompleted += new DownloadStringCompletedEventHandler(twitter_DownloadStringCompleted); twitter.DownloadStringAsync(new Uri(“http://api.twitter.com/1/statuses/user_timeline.xml?screen_name=krashlander”)); } void twitter_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e) { XElement xmlTweets = XElement.Parse(e.Result); //exception thrown here! var message = from tweet in xmlTweets.Descendants(“status”) select tweet.Element(“text”).Value; //Set message and tell UI to update. […]

在Windows Phone 7的MVVM应用程序中使用REST Web服务的良好架构?

我在确定从Web服务到UI获取数据的最佳方法时遇到了一些麻烦。 鉴于WebClient的异步性质,您将如何构建它? Model使用WebClient与webservice通信 ViewModel向模型询问数据 View是数据绑定到ViewModel 在Async完成事件中,我需要将数据从模型中取回ViewModel,这些是我想到的。 我可以在模型中触发ViewModel订阅的事件。 我或许可以做一些传递回调的事情? 或者我应该在ViewModel和Model之间进行第二级的INotifyPropertyChanged事件? 或者我非常困惑并完全误解MVVM?

Windows Phone 7 – 捕获屏幕

我试图在我的Windows移动应用程序运行时捕获屏幕。 到目前为止我有这个,但我一直得到一个参数The parameter is incorrect的ArgumentException。 我究竟做错了什么? WriteableBitmap wb = new WriteableBitmap((int)this.ActualWidth, (int)this.ActualHeight); wb.Render(this, null); wb.Invalidate(); MemoryStream ms = new MemoryStream(); int h = 212; int w = 444; wb.SaveJpeg(ms, w, h, 0, 100); // The parameter is incorrect BitmapImage bitmapImage = new BitmapImage(); bitmapImage.SetSource(ms); image1.Source = bitmapImage; 以上是在我的MainPage构造函数中。 更新 我设法使用了Matt建议的精彩教程。 但是,它似乎没有捕获WebBrowser任何内容。 1)有没有人知道本机电子邮件应用程序如何呈现HTML电子邮件 – 它使用什么组件? 2)用于在Windows […]