zoukankan      html  css  js  c++  java
  • Popup 控件

    Popup:在一个单独的窗口中显示内容,该窗口浮动在当前应用程序窗口之上。

    <Window x:Class="MaterialStorage.MainWindow"
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            Title="MainWindow" Height="350" Width="525">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="20"></RowDefinition>
                <RowDefinition Height="*"></RowDefinition>
                <RowDefinition Height="20"></RowDefinition>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" ></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <DockPanel Grid.Row="0" Grid.Column="1" Height="20" HorizontalAlignment="Stretch" Name="dockPanel1" Margin="0" VerticalAlignment="Top">
                <Menu Name="menu1" Width="Auto" DockPanel.Dock="Top"
    VerticalAlignment="Center"  >
                    <MenuItem Header="文件">
                        <MenuItem Header="报表导出" Name="newMember" />
                        <MenuItem Header="数据备份" Name="saveMember" />
                        <Separator/>
                        <MenuItem Header="关闭" Name="exit" />
                    </MenuItem>
                    <MenuItem Header="关于"  />
                </Menu>
            </DockPanel>
            <Grid Grid.Row="1" Grid.Column="1" Background="Beige">
                <Image Name="image1" Source="http://i.ssimg.cn/ssupload/2013/02/28/c92380f19fbb4127861c8ec3c836eb48.jpg" Height="200" Width="200"/>
                <Popup IsOpen="False" PlacementTarget="{Binding ElementName=image1}" Placement="Bottom">
                    <TextBlock FontSize="14" Background="LightGreen">Placement=Bottom</TextBlock>
                </Popup>
                <Popup IsOpen="True" PlacementTarget="{Binding ElementName=image1}" Placement="Top">
                    <TextBlock FontSize="14" Background="LightGreen">Placement=Top</TextBlock>
                </Popup>
                <Popup IsOpen="True" PlacementTarget="{Binding ElementName=image1}" Placement="Left">
                    <TextBlock FontSize="14" Background="LightGreen">Placement=Left</TextBlock>
                </Popup>
                <Popup IsOpen="True" PlacementTarget="{Binding ElementName=image1}" Placement="Right">
                    <TextBlock FontSize="14" Background="LightGreen">Placement=Right</TextBlock>
                </Popup>
            </Grid>
            <DockPanel Grid.Row="2" Grid.Column="1"  Height="20" HorizontalAlignment="Stretch" Name="dockPanel2" Margin="0" VerticalAlignment="Bottom">
                <StatusBar Height="20" Name="statusBar1" Width="Auto" DockPanel.Dock="Top" VerticalAlignment="Center"   >
                    <TextBlock Name="statusValue">fff</TextBlock>
                </StatusBar>
            </DockPanel>
        </Grid>
    </Window>

  • 相关阅读:
    ASP.NET 4.0尚未在 Web 服务器上注册 解决方法
    Node.js
    AC多模式匹配算法
    红黑树的实现原理
    OAuth2.0 用户验证授权标准 理解
    SNMP 和 NetBios协议理解
    使用RSA非对称密钥算法实现硬件设备授权
    常用
    目录列表
    Memcache的 简介
  • 原文地址:https://www.cnblogs.com/zhuzhenyu/p/2937313.html
Copyright © 2011-2022 走看看