WPF遮蔽层的实现
在一些项目中,难免会有耗时的加载,如果加载时没有提示,给人一种假死的感觉,很不友好,那么现在福利来啦,WPF版的模态窗体,先上效果图

实际效果指针是转动的,话不多说,一大批干货来袭
XMAL的代码
Window x:Class="ZhiHeng.IntelligentExpress.WpfUI.Views.CoverForm"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
Title="CoverForm" x:Name="Window"
Style="{StaticResource WindowsStyle}" Opacity="0.5">
<Window.Resources>
<Storyboard x:Key="Storyboard1">
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" RepeatBehavior="Forever" Storyboard.TargetName="ellipse" Storyboard.TargetProperty="(UIElement.Opacity)">
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.Opacity)" RepeatBehavior="Forever" Storyboard.TargetName="ellipse1">
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.Opacity)" RepeatBehavior="Forever" Storyboard.TargetName="ellipse2">
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.Opacity)" RepeatBehavior="Forever" Storyboard.TargetName="ellipse3">
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.Opacity)" RepeatBehavior="Forever" Storyboard.TargetName="ellipse4">
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.Opacity)" RepeatBehavior="Forever" Storyboard.TargetName="ellipse5">
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.Opacity)" RepeatBehavior="Forever" Storyboard.TargetName="ellipse6">
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.Opacity)" RepeatBehavior="Forever" Storyboard.TargetName="ellipse7">
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.Opacity)" RepeatBehavior="Forever" Storyboard.TargetName="ellipse8">
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.Opacity)" RepeatBehavior="Forever" Storyboard.TargetName="ellipse9">
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.Opacity)" RepeatBehavior="Forever" Storyboard.TargetName="ellipse10">
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.Opacity)" RepeatBehavior="Forever" Storyboard.TargetName="ellipse11">
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.Opacity)" RepeatBehavior="Forever" Storyboard.TargetName="ellipse12">
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.Opacity)" RepeatBehavior="Forever" Storyboard.TargetName="ellipse13">
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.Opacity)" RepeatBehavior="Forever" Storyboard.TargetName="ellipse14">
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.Opacity)" RepeatBehavior="Forever" Storyboard.TargetName="ellipse15">
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.Opacity)" RepeatBehavior="Forever" Storyboard.TargetName="ellipse16">
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.Opacity)" RepeatBehavior="Forever" Storyboard.TargetName="ellipse17">
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" RepeatBehavior="Forever" Storyboard.TargetName="border" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" RepeatBehavior="Forever" Storyboard.TargetName="border1" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
<SplineDoubleKeyFrame KeyTime=" />
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</Window.Resources>
<Window.Triggers>
<EventTrigger RoutedEvent="FrameworkElement.Loaded">
<BeginStoryboard Storyboard="{StaticResource Storyboard1}" />
</EventTrigger>
</Window.Triggers>
<Grid x:Name="LayoutRoot">
<Viewbox Width=">
<Grid HorizontalAlignment=" VerticalAlignment="Center" Width="3.333" Height="3.333" Visibility="Visible">
<Ellipse RenderTransformOrigin="0.468,3.443" x:Name="ellipse" Fill="Black" Stroke="{x:Null}" />
<Ellipse RenderTransformOrigin="0.468,3.443" Fill="Black" Stroke="{x:Null}" x:Name="ellipse0" >
<Ellipse.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX=" />
<SkewTransform AngleX=" />
<RotateTransform Angle=" />
<TranslateTransform X=" />
</TransformGroup>
</Ellipse.RenderTransform>
</Ellipse>
<Ellipse RenderTransformOrigin="0.468,3.443" Fill="Black" Stroke="{x:Null}" x:Name="ellipse1" >
<Ellipse.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX=" />
<SkewTransform AngleX=" />
<RotateTransform Angle=" />
<TranslateTransform X=" />
</TransformGroup>
</Ellipse.RenderTransform>
</Ellipse>
<Ellipse RenderTransformOrigin="0.468,3.443" Fill="Black" Stroke="{x:Null}" x:Name="ellipse2" >
<Ellipse.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX=" />
<SkewTransform AngleX=" />
<RotateTransform Angle=" />
<TranslateTransform X=" />
</TransformGroup>
</Ellipse.RenderTransform>
</Ellipse>
<Ellipse RenderTransformOrigin="0.468,3.443" Fill="Black" Stroke="{x:Null}" x:Name="ellipse3">
<Ellipse.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX=" />
<SkewTransform AngleX=" />
<RotateTransform Angle=" />
<TranslateTransform X=" />
</TransformGroup>
</Ellipse.RenderTransform>
</Ellipse>
<Ellipse RenderTransformOrigin="0.468,3.443" Fill="Black" Stroke="{x:Null}" x:Name="ellipse4">
<Ellipse.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX=" />
<SkewTransform AngleX=" />
<RotateTransform Angle=" />
<TranslateTransform X=" />
</TransformGroup>
</Ellipse.RenderTransform>
</Ellipse>
<Ellipse RenderTransformOrigin="0.468,3.443" Fill="Black" Stroke="{x:Null}" x:Name="ellipse5">
<Ellipse.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX=" />
<SkewTransform AngleX=" />
<RotateTransform Angle=" />
<TranslateTransform X=" />
</TransformGroup>
</Ellipse.RenderTransform>
</Ellipse>
<Ellipse RenderTransformOrigin="0.468,3.443" Fill="Black" Stroke="{x:Null}" x:Name="ellipse6" >
<Ellipse.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX=" />
<SkewTransform AngleX=" />
<RotateTransform Angle=" />
<TranslateTransform X=" />
</TransformGroup>
</Ellipse.RenderTransform>
</Ellipse>
<Ellipse RenderTransformOrigin="0.468,3.443" Fill="Black" Stroke="{x:Null}" x:Name="ellipse7" >
<Ellipse.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX=" />
<SkewTransform AngleX=" />
<RotateTransform Angle=" />
<TranslateTransform X=" />
</TransformGroup>
</Ellipse.RenderTransform>
</Ellipse>
<Ellipse RenderTransformOrigin="0.468,3.443" Fill="Black" Stroke="{x:Null}" x:Name="ellipse8" >
<Ellipse.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX=" />
<SkewTransform AngleX=" />
<RotateTransform Angle=" />
<TranslateTransform X=" />
</TransformGroup>
</Ellipse.RenderTransform>
</Ellipse>
<Ellipse RenderTransformOrigin="0.468,3.443" Fill="Black" Stroke="{x:Null}" x:Name="ellipse9" >
<Ellipse.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX=" />
<SkewTransform AngleX=" />
<RotateTransform Angle=" />
<TranslateTransform X=" />
</TransformGroup>
</Ellipse.RenderTransform>
</Ellipse>
<Ellipse RenderTransformOrigin="0.468,3.443" Fill="Black" Stroke="{x:Null}" x:Name="ellipse10" >
<Ellipse.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX=" />
<SkewTransform AngleX=" />
<RotateTransform Angle=" />
<TranslateTransform X=" />
</TransformGroup>
</Ellipse.RenderTransform>
</Ellipse>
<Ellipse RenderTransformOrigin="0.468,3.443" Fill="Black" Stroke="{x:Null}" x:Name="ellipse11" >
<Ellipse.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX=" />
<SkewTransform AngleX=" />
<RotateTransform Angle=" />
<TranslateTransform X=" />
</TransformGroup>
</Ellipse.RenderTransform>
</Ellipse>
<Ellipse RenderTransformOrigin="0.468,3.443" Fill="Black" Stroke="{x:Null}" x:Name="ellipse12" >
<Ellipse.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX=" />
<SkewTransform AngleX=" />
<RotateTransform Angle=" />
<TranslateTransform X=" />
</TransformGroup>
</Ellipse.RenderTransform>
</Ellipse>
<Ellipse RenderTransformOrigin="0.468,3.443" Fill="Black" Stroke="{x:Null}" x:Name="ellipse13" >
<Ellipse.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX=" />
<SkewTransform AngleX=" />
<RotateTransform Angle=" />
<TranslateTransform X=" />
</TransformGroup>
</Ellipse.RenderTransform>
</Ellipse>
<Ellipse RenderTransformOrigin="0.468,3.443" Fill="Black" Stroke="{x:Null}" x:Name="ellipse14" >
<Ellipse.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX=" />
<SkewTransform AngleX=" />
<RotateTransform Angle=" />
<TranslateTransform X=" />
</TransformGroup>
</Ellipse.RenderTransform>
</Ellipse>
<Ellipse RenderTransformOrigin="0.468,3.443" Fill="Black" Stroke="{x:Null}" x:Name="ellipse15" >
<Ellipse.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX=" />
<SkewTransform AngleX=" />
<RotateTransform Angle=" />
<TranslateTransform X=" />
</TransformGroup>
</Ellipse.RenderTransform>
</Ellipse>
<Ellipse RenderTransformOrigin="0.468,3.443" Fill="Black" Stroke="{x:Null}" x:Name="ellipse16" >
<Ellipse.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX=" />
<SkewTransform AngleX=" />
<RotateTransform Angle=" />
<TranslateTransform X=" />
</TransformGroup>
</Ellipse.RenderTransform>
</Ellipse>
<Ellipse RenderTransformOrigin="0.468,3.443" Fill="Black" Stroke="{x:Null}" x:Name="ellipse17" >
<Ellipse.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX=" />
<SkewTransform AngleX=" />
<RotateTransform Angle=" />
<TranslateTransform X=" />
</TransformGroup>
</Ellipse.RenderTransform>
</Ellipse>
<Ellipse RenderTransformOrigin="0.5,0.499" x:Name="ellipse_Copy" Fill="Black" Stroke="{x:Null}" Margin="-0.012,0,0.001,-9.67" VerticalAlignment="Bottom" Height="3.344">
<Ellipse.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX=" />
<SkewTransform AngleX=" />
<RotateTransform Angle=" />
<TranslateTransform X=" />
</TransformGroup>
</Ellipse.RenderTransform>
</Ellipse>
<Border RenderTransformOrigin="0.492,1.006" Margin="1.081,0,1.086,-8.056" x:Name="border" VerticalAlignment="Bottom" Height="8.622" Background="Black" CornerRadius="1,1,0,0">
<Border.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX=" />
<SkewTransform AngleX=" />
<RotateTransform Angle=" />
<TranslateTransform X=" />
</TransformGroup>
</Border.RenderTransform>
</Border>
<Border Height="4.994" Background="Black" CornerRadius="1,1,0,0" RenderTransformOrigin="0.496,1.001" Margin="0.705,0,0.714,-8.058" x:Name="border1" VerticalAlignment="Bottom">
<Border.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX=" />
<SkewTransform AngleX=" />
<RotateTransform Angle=" />
<TranslateTransform X=" />
</TransformGroup>
</Border.RenderTransform>
</Border>
</Grid>
</Viewbox>
<Label Content=" Foreground="Orange" HorizontalAlignment="Left" Margin="396,668,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.274,0.462"/>
</Grid>
</Window>
后台C#代码
public partial class CoverForm : Window
{
public CoverForm(Action workAction)
{
InitializeComponent();
this.workAction = workAction;
System.Threading.Thread t = new System.Threading.Thread(ExecWorkAction);
t.IsBackground = true;
t.Start();
}
private Action workAction = null;
private void ExecWorkAction()
{
try
{
var workTask = new Task(workAction);
workTask.Start();
Task.WaitAll(workTask);
}
finally
{
this.Dispatcher.Invoke(new Action(() => { this.Close(); }));
}
}
}
调用的代码
new CoverForm(() => {耗时的代码 }); }).Show();
有需要的尽管拿去吧,要问我是谁,请叫我是雷锋。
WPF遮蔽层的实现的更多相关文章
- WPF 蒙层罩,正在加载
参考园子里的一篇文章,比较好用.可以直接用,可以自己改. 动画效果: 容器的触发器,旋转容器: 属性配置:使用依赖属性,并且在xaml中写绑定.
- Loading 遮蔽层 简单实现。
<!--背景div--><div id="bg" class="bg" style="display:none;text-align ...
- HTML页面弹出自定义对话框带遮蔽罩(使用JavaScript)
转载:http://blog.sina.com.cn/s/blog_610f47c50100ohe4.html 原理其实很简单:首先绘制弹出的自定义对话框,将其使用display:none隐藏,因为设 ...
- 10、WPF程序集
WPF核心程序集 PresentationCore.dll:这个程序集定义了许多构成WPF GUI层基础的类型.例如包含WPF Ink API(pc笔针输入,手写输入)的支持.几个动画基元以及几个图形 ...
- WPF核心对象模型-类图和解析
DispatcherObject是根基类,通过继承该类,可以得到访问创建该对象的UI线程的Dispatcher对象的能力.通过Dispatcher对象,可以将代码段合并入该UI线程执行. Depend ...
- dotnet 读 WPF 源代码笔记 渲染收集是如何触发
在 WPF 里面,渲染可以从架构上划分为两层.上层是 WPF 框架的 OnRender 之类的函数,作用是收集应用程序渲染的命令.上层将收集到的应用程序绘制渲染的命令传给下层,下层是 WPF 的 GF ...
- HTML+CSS项目开发总结
好几天没更新博客了,刚实战完一个HTML+CSS的简单项目.经过几天的摸索,发现收益良多.之前只是单纯得写demo,看知识点,没有亲自实战项目.但实战过后才会了解,如何才能更好地提升自己的技术.针对这 ...
- easy ui 零散技巧
1.Jquery带上下文查找: 格式:$(selector,context) 例如:$("input",window.document),查找当前文档下的说有input元素,也等价 ...
- html+jquery翻页相册(原创)
呵呵 今天心情大好,再发一篇最进前端实现的相册模仿功能 这个相册是在一个网站的案例展示页面上实现的,没单独写出来,没时间,重用性也很差,以后有时间了再单独提取出来, 写这个玩意前,我在网上找了一些案例 ...
随机推荐
- 利用ScktSrvr打造多功能Socket服务器
Socket服务端编程中最重要的也是最难处理的工作便是客户请求的处理和数据的接收和发送,如果每一个Socket服务器应用程序的开发都要从头到尾处理这些事情的话,人将会很累,也会浪费大量时间.试想,如果 ...
- boost.asio包装类st_asio_wrapper开发教程(2014.5.23更新)(一)-----转
一:什么是st_asio_wrapper它是一个c/s网络编程框架,基于对boost.asio的包装(最低在boost-1.49.0上调试过),目的是快速的构建一个c/s系统: 二:st_asio_w ...
- Swift - 生成各种控件的工厂类(包含标签,按钮,输入框等)
在iOS开发中,页面里有时会大量的用到一些控件,如果要一个个单独创建再设置样式的话就显得很麻烦.我们可以创建一个生成各种控件的工厂类,这样在需要的时候调用下就可以了. 下面以一个自定义的工厂类为例,其 ...
- 【Demo 0003】Java基础-数组
本章学习要点: 1. 了解数组的基本概念: 2. 掌握数组使用方法: 一.数组的基本概念 1. 数组定义: 同一数据类型数据的集合,在 ...
- 微软 自带 AJAX 拓展
<内容有点乱,自己找记忆的~~~> 微软自带AJAX 控件大全:控件简介: ScriptManager 控件 为启用了 AJAX 的 ASP.NET 网页管理客户端脚本. ScriptMa ...
- 多字符集(ANSI)和UNICODE及字符串处理方式准则
在我们编写程序的时候,使用最多的是字符串的处理,而ANSI和UNICODE的相互转换经常搞的我们头晕眼乱. 应该说UNICODE是一种比较好的编码方式,在我们的程序中应该尽量使用UNICODE编码方式 ...
- pptv web前端面试题
今天上午一考完试,就一直等待pptv的电话,结果下午就收到了pptv的通知(pptv的效率还是很不错的,之前面试官和我说在一到两周之内给回复,结果过了7天就给回复了,赞一个)因为我面试的是web前端( ...
- [Android学习笔记]页面布局
线性布局:LinearLayout 1.集成ViewGroup,故可容纳多个View 2.线性布局,可设置水平或者垂直方向 相对布局:RelativeLayout
- vim经常使用命令总结
vim 选择文本,删除,复制,粘贴 文本的选择,对于编辑器来说,是非常主要的东西,也常常被用到,总结例如以下: v 从光标当前位置開始,光标所经过的地方会被选中,再按一下v结束. V ...
- 智能手机的工业控制应用方案——SimpleWiFi在工业控制领域应用
智能手机的工业控制应用方案——SimpleWiFi在工业控制领域应用 先上图: 现在的智能控制都是基于微控制器,随着智能的手持终端的普及,基于智能终端的控制就会越来越普遍. WIFI便是其中的一 ...