private Popup p;
private void Button_Click(object sender, RoutedEventArgs e)
{
p=new Popup();
DengluDemo dl=new DengluDemo();
dl.Width = ;
dl.Height = ;
dl.Margin = new Thickness(, , , );
//if (p != null || p.IsOpen == true)
//{
// return;
//}
MessageDialog md = new MessageDialog("是否退出登陆");
md.Commands.Add(new UICommand("确定", (a) =>
{ }, ));
md.Commands.Add(new UICommand("取消", (a) =>
{ }, ));
md.DefaultCommandIndex = ;
md.CancelCommandIndex = ;
var cmd = md.ShowAsync();
dl.eh = (a, b) =>
{
p.Child = dl;
p.IsOpen = true;
};
p.Child = dl;
p.IsOpen = true; }
}
 <UserControl
x:Class="vs2013win8._1.DengluDemo"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:vs2013win8._1"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignHeight="260"
d:DesignWidth="1360"> <Grid>
<Grid.Background>
<SolidColorBrush Color="Black" Opacity="0.7"></SolidColorBrush>
</Grid.Background>
<StackPanel Background="LightSeaGreen" Orientation="Vertical" > <StackPanel Orientation="Horizontal" Margin="428,40,0,0">
<TextBlock Text="用户名:" FontSize="25" Width="80"></TextBlock>
<TextBox x:Name="txt_Name" Width="273" Margin="20,0,0,0"></TextBox>
</StackPanel> <StackPanel Orientation="Horizontal" Margin="428,40,0,0">
<TextBlock Text="密 码:" FontSize="25" Width="80"></TextBlock>
<PasswordBox x:Name="txt_Password" Width="273" Margin="20,0,0,0"></PasswordBox>
</StackPanel> <StackPanel Orientation="Horizontal" Margin="428,30,0,0">
<HyperlinkButton Tapped="Button_Tapped_3" FontSize="18" Foreground="White">还没有账号 点击去注册</HyperlinkButton>
<Button Tapped="Button_Tapped_1" Content="登录" FontSize="20" Foreground="White" Background="LightSeaGreen" Width="150" Height="49" Margin="180,0,0,0"/>
<Button Tapped="Button_Tapped_2" Content="取消" FontSize="20" Foreground="White" Background="LightSeaGreen" Width="153" Height="49" Margin="20,0,0,0"/>
</StackPanel>
</StackPanel>
</Grid>
</UserControl>
   public EventHandler eh;
private void Button_Tapped_1(object sender, TappedRoutedEventArgs e)
{
if (eh != null)
{
eh(this,null);
}
}

windows 8.1 MessageDialog的更多相关文章

  1. MessageDialog

    var messageDialog = new Windows.UI.Popups.MessageDialog("Media player components unavailable&qu ...

  2. xamarin UWP中MessageDialog与ContentDialog的区别

    MessageDialog与ContentDialog的异同点解析: 相同点一:都是uwp应用上的一个弹窗控件.都能做为弹出应用. 相异点一:所在命名空间不同,MessageDialog在Window ...

  3. Windows Phone 二十、陀螺仪

    API 示例 // 获取陀螺仪传感器监听对象 Gyrometer gyrometer = Gyrometer.GetDefault(); if (gyrometer == null) { await ...

  4. Windows Phone 十四、磁贴通知

    磁贴(Tile) Windows Phone 磁贴种类: 小尺寸 SmallLogo:71x71: Square71x71 中等 Logo:150x150: Square150x150 宽 WideL ...

  5. Windows Phone 十三、吐司通知

    弹出通知对话框 <Grid> <Button Content="弹出通知" Click="Button_Click"/> </Gr ...

  6. Windows Store 开发总结——文件操作

    1.读取Isolated Storage 每个Metro程序都有三个文件夹:Local,Roaming,Temp.每个文件夹的访问方法都是相同的. Local用于将数据存储在本地,这是程序特定的文件夹 ...

  7. 重新想象 Windows 8 Store Apps (36) - 通知: Tile 详解

    [源码下载] 重新想象 Windows 8 Store Apps (36) - 通知: Tile 详解 作者:webabcd 介绍重新想象 Windows 8 Store Apps 之 通知 Tile ...

  8. Devlop Win 8 and Windows Phone App for Microsoft Dynamics CRM

    Microsoft Dynamics CRM App for Windows Phone http://www.windowsphone.com/en-us/store/app/dynamics-cr ...

  9. Windows 8 动手实验系列教程 实验8:Windows应用商店API

    动手实验 实验 8: Windows应用商店API 2012年9月 简介 编写Windows应用商店应用最令人瞩目的理由之一是您可以方便地将它们发布到Windows应用商店.考虑到世界范围内目前有超过 ...

随机推荐

  1. 格式化日期的js(正则魅力)

      /** * 时间对象的格式化; */ Date.prototype.format = function(format) { // ◆ 使用prototype定义原型方法 /* * eg:forma ...

  2. js监听浏览器关闭事件

    html : <HTML>  <HEAD>  <title>test</title>  </HEAD>  <body onbefore ...

  3. [ActionScript 3.0] AS3 获取函数参数个数

    function createFunction(param1:String,param2:String,param3:int=0):void { trace(arguments.length);//a ...

  4. SecureCRT的背景和文字颜色的修改

    options->;session options->;emulation->;terminal选择linux(相应的服务器系统)ansi color 打上钩options-> ...

  5. Mingyang.net:格式化Hibernate的SQL输出语句

    在sping与hibernate整合中可以这样的设置 <property name="hibernateProperties"> <props> <p ...

  6. [POJ 2443] Set Operation (bitset)

    题目链接:http://poj.org/problem?id=2443 题目大意:给你N个集合,每个集合里有若干个数.M个查询,每个查询有a,b两个数.问是否存在一个集合同时包含a,b这两个数.若存在 ...

  7. [ZOJ 3662] Math Magic (动态规划+状态压缩)

    题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3662 之前写过这道题,结果被康神吐槽说代码写的挫. 的确,那时候 ...

  8. Webservice测试从头来

    一.写WebService 建立java project 建立数据类包 com.parameters.zz 新建Person类 package com.parameters.zz; public cl ...

  9. IOS开发-jqeurey mobile

    有一阵子没写东西了,最近打算重新拾起开发,做点手机上的东东,选中了phonegap.jquery mobile,phonegap的部署网上非常多,有空了再班门弄斧,这里先记下jquery mobile ...

  10. JavaScript 变量克隆和判断变量类型

    一.变量克隆 在js中经常会遇到将一个变量赋值给一个新的变量这种情况,这对于基本类型很容易去实现,直接通过等号赋值就可以了,对于引用类型就不能这样了.(注:像函数,正则也可以直接通过等号赋值) 这里我 ...