windows phone浏览器(1)
程序员文章站
2022-04-11 15:04:21
windows phone 主要用的控件是phone:webbrowser,该控件就是windows phone中的ie,在grid控件嵌套的grid控件中添加如下代码:
1...
windows phone 主要用的控件是phone:webbrowser,该控件就是windows phone中的ie,在grid控件嵌套的grid控件中添加如下代码:
1 <grid x:name="contentpanel" grid.row="1" margin="12,0,12,0">
2 <textbox height="auto" horizontalalignment="stretch" margin="0,0,120,0" name="textbox1" text="" verticalalignment="top" />
3 <button content="搜索" height="auto" horizontalalignment="right" name="button1" verticalalignment="top" width="auto" click="button1_click" />
4 <phone:webbrowser horizontalalignment="stretch" margin="0,84,0,0" name="webbrowser1" verticalalignment="stretch" height="auto" width="auto" />
5 </grid>
相关的效果会在显示呈现:
并在button事件中如下代码
1 private void button1_click(object sender, routedeventargs e)
2 {
3 string site;
4 site = textbox1.text;
5 webbrowser1.navigate(new uri(site, urikind.absolute));
6
7 }
整体运行效果:
新浪:
摘自 shenzhoulong的专栏
1 <grid x:name="contentpanel" grid.row="1" margin="12,0,12,0">
2 <textbox height="auto" horizontalalignment="stretch" margin="0,0,120,0" name="textbox1" text="" verticalalignment="top" />
3 <button content="搜索" height="auto" horizontalalignment="right" name="button1" verticalalignment="top" width="auto" click="button1_click" />
4 <phone:webbrowser horizontalalignment="stretch" margin="0,84,0,0" name="webbrowser1" verticalalignment="stretch" height="auto" width="auto" />
5 </grid>
相关的效果会在显示呈现:
并在button事件中如下代码
1 private void button1_click(object sender, routedeventargs e)
2 {
3 string site;
4 site = textbox1.text;
5 webbrowser1.navigate(new uri(site, urikind.absolute));
6
7 }
整体运行效果:
新浪:
摘自 shenzhoulong的专栏
下一篇: 艾灸减肥的原理是什么?
推荐阅读
-
Windows Phone开发之String与StringBuilder
-
设计windows phone页面主题
-
微软从明年1月12日起停止对IE6-IE8浏览器提供技术支持
-
C#基于Windows服务的聊天程序(1)
-
Windows 10全新浏览器终于有名字了:Microsoft Edge
-
Windows 10全新浏览器终于有名字了:Microsoft Edge
-
Windows10的份额创新低 Edge浏览器遭遇滑铁卢
-
QQ浏览器特权中心活动 新增用50积分免费兑换QQ黄钻1个月
-
微软接招!Mozilla将开发Windows 10版的火狐浏览器
-
怎么在windows7系统中用internet 9浏览器收藏网页实现图解