windows phone浏览器(1)
程序员文章站
2024-01-04 22:15: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浏览器(1)
-
Windows下全新安装Apache2,PHP5,MYSQL5,Zend(1)_PHP教程
-
Windows Phone 点击按钮退出当前应用
-
超多看点!Windows 10 20H1新版特性速览
-
windows中PHP5.2.14以及apache2.2.16安装配置方法第1/2页_PHP教程
-
Windows 配置Apache以便在浏览器中运行Python script的CGI模式
-
Windows Phone 实用开发技巧(29):动态绑定Pivot
-
Windows Phone实用开发技巧(32):照片角度处理
-
Windows Phone开发之String与StringBuilder
-
设计windows phone页面主题