惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
News and Events Feed by Topic
D
Docker
云风的 BLOG
云风的 BLOG
F
Fortinet All Blogs
F
Full Disclosure
H
Hackread – Cybersecurity News, Data Breaches, AI and More
P
Proofpoint News Feed
Microsoft Azure Blog
Microsoft Azure Blog
WordPress大学
WordPress大学
The GitHub Blog
The GitHub Blog
L
LangChain Blog
H
Help Net Security
B
Blog
T
Tailwind CSS Blog
V
V2EX
博客园_首页
阮一峰的网络日志
阮一峰的网络日志
人人都是产品经理
人人都是产品经理
The Cloudflare Blog
Recent Announcements
Recent Announcements
aimingoo的专栏
aimingoo的专栏
美团技术团队
A
About on SuperTechFans
C
Cybersecurity and Infrastructure Security Agency CISA
K
Kaspersky official blog
I
InfoQ
Project Zero
Project Zero
I
Intezer
Google DeepMind News
Google DeepMind News
博客园 - 【当耐特】
Hugging Face - Blog
Hugging Face - Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
T
Threat Research - Cisco Blogs
Last Week in AI
Last Week in AI
C
Cyber Attacks, Cyber Crime and Cyber Security
G
GRAHAM CLULEY
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
AWS News Blog
AWS News Blog
Spread Privacy
Spread Privacy
S
Securelist
Recorded Future
Recorded Future
D
Darknet – Hacking Tools, Hacker News & Cyber Security
博客园 - 叶小钗
S
Security Affairs
Blog — PlanetScale
Blog — PlanetScale
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
月光博客
月光博客
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
罗磊的独立博客
The Hacker News
The Hacker News

博客园 - 碧血黄沙-java、c#

nginx反向代理tomcat应用,struts2网站程序redirect时导致请求地址错误的解决方法 开源一个最近写的spring与mongodb结合的demo(spring-mongodb-demo) 基于spring框架的apache shiro简单集成 java的struts2项目实现网站首页只显示域名不显示index.do的做法 用WPF开发仿QQ概念版之--------MessageWindow开发以及Demo下载 用WPF开发仿QQ概念版之--------登录界面 纪念一下我在2009年开发的一款网站客户端软件[winform] 参考XNA官方Platformer模版,修改Platformer为横版可以滚动的小游戏 Xna小游戏开发【飞机空间大战】 Airfey Radio网络电台播放器V2.0绿色单文件版本发布(大小仅296KB) 一种开发软件的新思路,给Web页面穿个马甲,用web页面做软件UI,用C#(或者C++等其它语言)代码做功能 Airfey Radio网络电台播放器V2.0版本发布(2010.4.18最新更新) Airfey Radio网络电台播放器V1.0.0.0版本发布(2010.1.29更新)此版本不再更新,转入2.0版本开发 网络电台播放器即将开放下载,敬请期待!!! 在WinForm里面使用多线程修改主线程上的一个Label的值 在几千条记录里,存在着些相同的记录,如何能用SQL语句,删除掉重复的呢? 发布Winform自定义控件snMessageBox,基于系统的MesssageBox实现重绘,需要源码者请留下邮箱 [原创]WinForm中重绘滚动条以及用重绘的滚动条控制ListBox的滚动 高仿QQMusic播放器,浅谈WinForm关于UI的制作
用WPF开发仿QQ概念版之--------Loading预加载界面(闪屏窗体)
碧血黄沙-java、c# · 2011-02-24 · via 博客园 - 碧血黄沙-java、c#

这次要实现的效果如下图,在程序启动时首先显示:

此窗体(闪屏)相当简单,我只是用一副图作为窗体背景,在程序启动时调用,为了模拟加载,用线程延时演示了一下加载百分比。

窗体(SplashScreen.xaml)的XAML代码如下:

<Window
    
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x
="http://schemas.microsoft.com/winfx/2006/xaml"
    x:Class
="WpfQQ.SplashScreen"
     xmlns:local
="clr-namespace:WpfQQ" 
    x:Name
="Window"
    Title
="SplashScreen" Height="97" Width="380" WindowStartupLocation="CenterScreen" WindowStyle="None" 
        Background
="BurlyWood" BorderBrush="BurlyWood" BorderThickness="0" ShowInTaskbar="False" ResizeMode="NoResize">
    
<Grid Margin="0,0,0,0" Height="97" VerticalAlignment="Top" Width="380">
        
<Grid.ColumnDefinitions>
            
<ColumnDefinition/>
            
<ColumnDefinition Width="0*"/>
        
</Grid.ColumnDefinitions>
        
<Image Margin="0,1,0.888,0" Source="loading.png" Stretch="Fill"/>
        
<Label Margin="150,33,31.888,37" x:Name="label2"
               Content
="{Binding Message, Source={x:Static local:MessageListener.Instance}}" Foreground="Black"/>
    
</Grid>
</Window>

其中的label2我们用于显示加载百分比等信息。

在App.xaml.cs中调用:

protected override void OnStartup(StartupEventArgs e)
        {
            Splasher.Splash = new SplashScreen();
            Splasher.ShowSplash();
            for (int i = 0; i < 100; i++)
            {
                MessageListener.Instance.ReceiveMessage(string.Format("Loading {0}%,Please waiting", i+1));
                Thread.Sleep(20);//延时
            }
           
            base.OnStartup(e);
           
        }