1.退出当前页面

  private void imgExit_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{
if (MessageBox.Show("确定要退出当前页面?", "提示", MessageBoxButton.OKCancel) == MessageBoxResult.OK)
{
//Silverlight调用JS
ScriptObject Show = HtmlPage.Window.GetProperty("closeWin") as ScriptObject;
Show.InvokeSelf();
}
}

2.跳转到主页面

 private void imgExit_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{
if (MessageBox.Show("确定要退出当前页面?", "提示", MessageBoxButton.OKCancel) == MessageBoxResult.OK)
{
HtmlWindow window = HtmlPage.Window;
window.Navigate(new Uri("Default.aspx", UriKind.Relative)); }
}

silverlight 退出当前页面、跳转到主页面的更多相关文章

  1. 解决iframe作为子窗口,刷新后iframe页面跳转到其它页面的问题

    转载请在页首注明作者与出处 http://www.cnblogs.com/zhuxiaojie/p/5990262.html 前言: 在开发网站时,尤其是管理后台,我们经常会使用iframe作为内容窗 ...

  2. js页面用定时任务通过AJAX获取后台数据,但是从这个页面跳转到其他页面后,定时任务仍然在定时请求后台

    setInterval(function(){//ajax 请求后台数据},1000);这个是A页面的定时器然后我在A页面通过其他请求跳转到其他页面之后后台发现A页面的定时器的那个请求仍然在执行为什么 ...

  3. 使用iframe框架后的页面跳转时目标页面变为iframe的子页面的问题

    <frameset rows="4,200,10,*,120" cols="*" framespacing="0" framebord ...

  4. Controller中页面跳转完后页面的样式全消失的解决办法

    问题的原因应该是在controller中进行页面跳转时当前文件的路径变了 解决办法: 1.在jsp页面中<%@ page language="java" contentTyp ...

  5. SpringMVC如何从默认的index.jsp页面跳转到其他页面

    最近学习SpringMVC时,想要做一个登录页面Login.jsp,发现Tomcat服务器默认进入的页面是WEB-INF/index.jsp,查询资料发现如果修改默认页面,还需要修改Tomcat文件目 ...

  6. Android Studio计时跳转或点击跳转至主页面

    这个总体来说是比较简单的,计时跳转一般调用Android Studio中的Handler方法. 一.发生点击事件跳转页面 mBtnTextView = (Button) findViewById(R. ...

  7. viewpager在最后一页滑动之后,跳转到主页面

    [TOC] viewpager在最后一页滑动之后,跳转到主页面 思路 主要有是两个监听, 一是addOnPageChangeListener();二是setOnTouchListener(): add ...

  8. android引导页的实现 及跳转到主页面

    第一个activity package com.qualitypicture.activity; import java.util.ArrayList; import java.util.List; ...

  9. Android Studio实现页面跳转(新页面或者网站)

    一,跳转到另一个页面 百度了好久,好像好多种方法,从中挑选了一中比较方便的一中方法 利用Intent类进行实现 1,首先在firstActivity中添加相应的跳转命令代码 例如一下示例代码 if ( ...

随机推荐

  1. [Flex] ButtonBar系列——简单布局

    <?xml version="1.0" encoding="utf-8"?> <!--通过layout属性,设置ButtonBar布局--&g ...

  2. Centos 7配置LAMP

    因为安装zabbix需要LAMP环境,特记录如下. LAMP指的Linux(操作系统).Apache HTTP 服务器,MySQL(有时也指MariaDB,数据库软件)和PHP(有时也是指Perl或P ...

  3. mysql设置定时任务

    –查看时间调度器是否开启 SHOW VARIABLES LIKE 'event_scheduler'; SELECT @@event_scheduler; –开启时间调度器 SET GLOBAL ev ...

  4. 在开发板Linux上挂载"驱动"挂载不成功,出现提示server 172.27.52.100 not responding, still trying

    1.在开发板具体操作步骤如下:   1.1 :设置IP ifconfig eth0 172.27.52.200   1.2 :ping通 虚拟机Linux 主机Linux ping XXX.XXX.X ...

  5. Caught exception while loading file struts-default.xml 错误

    严重: Exception starting filter struts2 Caught exception while loading file struts-default.xml - [unkn ...

  6. 部门子部门表结构,递归指定部门的所有子部门SQL函数

  7. Linux学习小结(转)

    linux目录架构 / 根目录/bin    常用的命令 binary file 的目錄/boot   存放系统启动时必须读取的档案,包括核心 (kernel) 在内/boot/grub/menu.l ...

  8. 【LeetCode】84. Largest Rectangle in Histogram

    Largest Rectangle in Histogram Given n non-negative integers representing the histogram's bar height ...

  9. SQO (标准查询运算符)方法 & Linq To Object

    #region SQO (标准查询运算符) 方法 #region Where() Find() FindAll() FirstOrDefault()等方法 static void c01where() ...

  10. 部署Ossim

    650) this.width=650;" title="29-1.jpg" alt="095310750.jpg" src="http:/ ...