• 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>

  • 相关阅读:
    如何解决chrome和chromedriver版本不匹配
    RobotFramework 实战1——数据检查自动化
    RobotFramework 中的循环语句:FOR IN RANGE
    robotframework 获取昨日(get time关键词的用法)
    大数据用户画像方法与实践(干货 转帖)
    Scrapy实战篇(九)之爬取链家网天津租房数据
    Scrapy实战篇(八)之爬取教育部高校名单抓取和分析
    Scrapy实战篇(七)之爬取爱基金网站基金业绩数据
    Selenium常用方法
    Selenium之动作链(ActionChains)
  • 原文地址:https://www.cnblogs.com/zhuzhenyu/p/2937313.html
Copyright © 2020-2023  润新知