当前位置:网站首页>WPF效果第一百九十三篇之登录实现
WPF效果第一百九十三篇之登录实现
2022-08-02 12:56:00 【dotNET跨平台】
前面一直在玩耍ListBox(最爱),大周末的就适合在家吹着风扇撸着代码
;今天来分享一个很简单实用的登录,来看看最终实现的效果:
1、关于软件启动后焦点实现:
<Style TargetType="Border">
<Style.Triggers>
<DataTrigger Binding="{Binding IsEmptyAccount,Mode=TwoWay}" Value="true">
<Setter Property="FocusManager.FocusedElement" Value="{Binding ElementName=UserNameTxb}"/>
</DataTrigger>
</Style.Triggers>
</Style>2、关于启动窗口动画:
<Storyboard x:Key="LoadStoryboard">
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="LoginWindow">
<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.6" Value="1"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="LoginWindow"
Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
<SplineDoubleKeyFrame KeyTime="00:00:0" Value="0"/>
<SplineDoubleKeyFrame KeyTime="00:00:0.6" Value="1"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="LoginWindow"
Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
<SplineDoubleKeyFrame KeyTime="00:00:0" Value="0"/>
<SplineDoubleKeyFrame KeyTime="00:00:0.6" Value="1"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>3、关于窗口抖动动画:
<Storyboard x:Key="ShakeStoryboard" Completed="ShakeStoryboard_Completed">
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="LayoutRoot"
Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
<SplineDoubleKeyFrame KeyTime="00:00:0" Value="1"/>
<SplineDoubleKeyFrame KeyTime="00:00:0.2" Value="0.7"/>
<SplineDoubleKeyFrame KeyTime="00:00:0.4" Value="0.8"/>
<SplineDoubleKeyFrame KeyTime="00:00:0.5" Value="0.9"/>
<SplineDoubleKeyFrame KeyTime="00:00:0.6" Value="1"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="LayoutRoot"
Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
<SplineDoubleKeyFrame KeyTime="00:00:0" Value="1"/>
<SplineDoubleKeyFrame KeyTime="00:00:0.2" Value="0.7"/>
<SplineDoubleKeyFrame KeyTime="00:00:0.4" Value="0.8"/>
<SplineDoubleKeyFrame KeyTime="00:00:0.5" Value="0.9"/>
<SplineDoubleKeyFrame KeyTime="00:00:0.6" Value="1"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00.6" Storyboard.TargetName="LayoutRoot"
Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
<SplineDoubleKeyFrame KeyTime="00:00:0.2" Value="10"/>
<SplineDoubleKeyFrame KeyTime="00:00:0.3" Value="-20"/>
<SplineDoubleKeyFrame KeyTime="00:00:0.4" Value="10"/>
<SplineDoubleKeyFrame KeyTime="00:00:0.5" Value="-16"/>
<SplineDoubleKeyFrame KeyTime="00:00:0.6" Value="10"/>
<SplineDoubleKeyFrame KeyTime="00:00:0.7" Value="0"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>最终简单的效果先这样吧
;以后有时间的话,可以再去摸索一下更复杂的效果
;编程不息、Bug不止、无Bug、无生活
;改bug的冷静、编码的激情、完成后的喜悦、挖坑的激动 、填坑的兴奋;这也许就是屌丝程序员的乐趣吧;今天就到这里吧;希望自己有动力一步一步坚持下去;生命不息,代码不止;大家抽空可以看看今天分享的效果,有好的意见和想法,可以在留言板随意留言;我看到后会第一时间回复大家,多谢大家的一直默默的关注和支持!如果觉得不错,那就伸出您的小手点个赞并关注一下!
边栏推荐
- Intouch Historian历史曲线配置导入导出
- js九宫格样式抽奖插件
- There are several ways to jump to js source code, jump on the current page, jump on the blank page
- 设置代理服务器(谷歌+IE)「建议收藏」
- Basic operations of openGauss database (super detailed)
- Object.entries()
- 消除气泡解救蘑菇h5小游戏源码
- pytorch模型转tensorflow模型
- #Summer Challenge#[FFH] OpenHarmony Device Development Foundation (3) Compilation Dependencies
- kvm部署
猜你喜欢

1.3 Rapid Spanning Tree Protocol RSTP

Intouch System Platform IDE-1

不错的射击类js小游戏源码

Software component analysis: 5 major capabilities to protect software supply chain security

To eliminate air bubbles to save the mushroom h5 small game source code

路由-Tab切换页面

Object.entries()

Openlayers 快速上手教程

GCC版本升级到指定版本

WeChat applet getPhoneNumber interface code=40013
随机推荐
SQL Server修改数据
This binding to detailed answers
this的绑定指向详细解答
Pod Scheduling Strategy: Affinity, Stain and Stain Tolerance
FreeRTOS experiment -- delete task
pytorch model to tensorflow model
js stopwatch countdown plugin
String concatenation in SQL
photo-sphere-viewer中文文档
你知道图论的spfa吗?
RISC-V 指令格式和6种基本整数指令
svg气球升起爆炸js特效
设置代理服务器(谷歌+IE)「建议收藏」
php——三篇夯实根基第一篇
uniapp/小程序 onload方法每次打开页面都执行解读
How to better assess credit risk?Just watch this scorecard model live
package.json与package-lock.json
RestTemplate use: set request header, request body
Set proxy server (Google+IE) "Recommended Collection"
路由-嵌套路由