摘要:View Code html脚本如下: <script language="javascript" type="text/javascript"> var control = null; function plugInLoaded(sender, args) { control = sender.getHost(); //获取宿主 } function testClick() { control.Content.abc.getStr(1); } </script>具体项...
阅读全文
摘要:动态加载外部xap silverlight,通过映射和服务View Code private void button1_Click(object sender, RoutedEventArgs e) { //1 •使用WebClient下载SLRandarHitTest.xap文件,进行异步读取。 WebClient Appclient = new WebClient(); Appclient.OpenReadAsync(new Uri("SLRandarHitTest.xap", UriKind.Rela...
阅读全文
摘要:开发者可以在http://www.microsoft.com/maps/developers/web.aspx免费注册,移动地位中国地图具体例子如下或者另外3个:http://down.51cto.com/data/684476
阅读全文
摘要:通过将文本内容以流的形式发送的服务器端,然后再服务器通过web handler进行处理xaml后台代码: private void button1_Click(object sender, RoutedEventArgs e) { WebClient wcWrite = new WebClient(); wcWrite.OpenWriteCompleted += (s, args) => { //将文本内容以流的形式发送的服务器端 using (St...
阅读全文
摘要:mvvm绑定的优先级高于在VM下获取控件后直接赋值
阅读全文
摘要:xaml<TextBlock HorizontalAlignment="Left" Text="竖立显示文本" Name="textBlock1" Width="92" />csstring s = textBlock1.Text; int a = s.Length; textBlock1.Text = ""; for (int i = 0; i < a; i++) { Run run = new Run(); run.Text = s.Substring(i, 1); Lin
阅读全文