• WPF实现TextBlock呼吸灯效果


    实现代码

                                <TextBlock Text="录像中" FontSize="48" Foreground="#ED4646" HorizontalAlignment="Center" FontWeight="Medium" x:Name="TextBlockRecording">
                                    <TextBlock.Triggers>
                                        <EventTrigger RoutedEvent="FrameworkElement.Loaded">
                                            <BeginStoryboard>
                                                <Storyboard BeginTime="0:0:0" Duration="0:0:4" AutoReverse="True" RepeatBehavior="Forever">
                                                    <ColorAnimation From="#ED4646" To="#F0F2F7" Duration="0:0:2" RepeatBehavior="Forever" Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="TextBlockRecording">
                                                    </ColorAnimation>
                                                </Storyboard>
                                            </BeginStoryboard>
                                        </EventTrigger>
                                    </TextBlock.Triggers>
                                </TextBlock>
    

    TextBox关闭中文输入法:

    引用:xmlns:input="clr-namespace:System.Windows.Input;assembly=PresentationCore"

    <TextBox x:Name="TextBoxSctm" Style="{StaticResource TextBoxExtend}" controls:InfoElement.Placeholder="扫码" HorizontalAlignment="Right" Height="35" Width="100" VerticalAlignment="Center" Margin="10,0,0,0" KeyDown="TextBoxSctm_OnKeyDown" input:InputMethod.IsInputMethodEnabled="False"></TextBox>
    

    不解压Zip压缩包获得文件列表

    using (var ZipFile = new ICSharpCode.SharpZipLib.Zip.ZipFile("e:\111.zip"))
                {
                    var ZipFiles = ZipFile.Cast<ICSharpCode.SharpZipLib.Zip.ZipEntry>();
    
                    foreach (var zipEntry in ZipFiles)
                    {
                        Console.WriteLine(zipEntry.Name);
                    }
                }
  • 相关阅读:
    VS2012打开项目——已停止工作
    使用copydata实现进程之间数据传递
    WPF Demo20 模板
    WPF Demo19 命令、UC
    WPF Demo18 路由事件
    WPF Demo17 数据绑定
    Spark2.3.0 报 io.netty.buffer.PooledByteBufAllocator.metric
    Impala与Hive的优缺点和异同
    Hive 报错信息及解决方法
    hive表多种存储格式的文件大小差异,无重复数据
  • 原文地址:https://www.cnblogs.com/wdw984/p/12382385.html
Copyright © 2020-2023  润新知