zoukankan      html  css  js  c++  java
  • WPF PlacementTarget技巧

    <Window x:Class="WpfApplication1.Window1"
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            Title="Window1" Height="300" Width="300">
        <Grid>
            <Button x:Name="btn1"  Content="Button" HorizontalAlignment="Left" Margin="42,77,0,0" VerticalAlignment="Top" Width="75" Click="btn1_Click"/>
    
            <!--AllowsTransparency="True"
               PopupAnimation="Fade"
               HorizontalOffset="5"
               VerticalOffset="-120"-->
            
            <Popup x:Name="popusBottom2"   PlacementTarget="{Binding ElementName=btn1}"  StaysOpen="False" >
                <Border Height="200" Width="200" Background="AliceBlue"></Border>
            </Popup>
        </Grid>
    </Window>
    private void btn1_Click(object sender, RoutedEventArgs e)
            {
                popusBottom2.IsOpen = false;
                popusBottom2.IsOpen = true;
                popusBottom2.PopupAnimation = System.Windows.Controls.Primitives.PopupAnimation.Scroll;
    
                if (popusBottom2.IsOpen == false)
                {
                    popusBottom2.IsOpen = true;
                }
            }
  • 相关阅读:
    线程状态
    JVM的运行
    HBase与Protobuf
    HBase Java API
    HBase全分布式部署
    HBase 伪分布式搭建
    HBase架构
    mysql存储引擎中InnoDB与Myisam的区别及应用场景
    mysql5.6 主从配置
    Mongodb3.4安装
  • 原文地址:https://www.cnblogs.com/xcj26/p/4873697.html
Copyright © 2011-2022 走看看