当前位置: 首页 > news >正文

网站怎么做的有创意泉州seo排名

网站怎么做的有创意,泉州seo排名,保定软件开发网站制作,做网站ps分辨率给多少钱今天看到群里一个小页面挺有意思的#xff0c;就是这个#xff1a;https://ac.yunyoujun.cn/于是想着用wpf也模仿一下嘿嘿#xff0c;为了方便#xff0c;也顾不上什么代码结构了。。。看看效果吧#xff1a;代码不多#xff0c;只有一个窗口#xff0c;下面就直接看看代… 今天看到群里一个小页面挺有意思的就是这个https://ac.yunyoujun.cn/于是想着用wpf也模仿一下嘿嘿为了方便也顾不上什么代码结构了。。。看看效果吧代码不多只有一个窗口下面就直接看看代码窗体xaml:Window x:ClassAirCond.MainWindowxmlnshttp://schemas.microsoft.com/winfx/2006/xaml/presentationxmlns:xhttp://schemas.microsoft.com/winfx/2006/xamlxmlns:dhttp://schemas.microsoft.com/expression/blend/2008xmlns:mchttp://schemas.openxmlformats.org/markup-compatibility/2006xmlns:localclr-namespace:AirCondResizeModeNoResizeWindowStyleNoneTopmostTrueAllowsTransparencyTrueBackgroundTransparentWidth300SizeToContentHeightmc:IgnorabledTitleMainWindowStackPanelBorder Height120 MouseDownBorder_MouseDown VerticalAlignmentTop Background#F8F8F8 Margin10 CornerRadius15 15 30 30Border.EffectDropShadowEffect ShadowDepth0 BlurRadius10 Color#66ffffff//Border.EffectGridlocal:IconFontButton x:NameshutDownButton ClickShutDownClick Geometry{StaticResource ShutDownIcon} HorizontalAlignmentRight VerticalAlignmentTop IconWidth16 IconHeight16 Margin3 ForegroundRed/Image Width40 Height70 Source/info.png Margin10 HorizontalAlignmentLeft VerticalAlignmentTop/Image x:Namesnow Width26 Height32 Source/snow.png HorizontalAlignmentRight VerticalAlignmentTop Margin0 15 66 0/TextBlock x:NametempText Text{Binding Temp,StringFormat{}{0}°C} HorizontalAlignmentRight Margin0 40 30 0 FontSize33 FontWeightBold FontFamily{StaticResource Digital} ForegroundRed/Border Height1 BackgroundGray Margin0 56 0 0 /TextBlock TextPowered by WPF Foreground{StaticResource LinearBrush} FontFamily微软雅黑 FontSize10 VerticalAlignmentBottom HorizontalAlignmentCenter Margin0 0 0 35/TextBlock Text新能源空调靠爱发电 Foreground{StaticResource LinearBrush} Opacity0.5 Padding6 FontSize14 TextAlignmentCenter FontFamily微软雅黑 HorizontalAlignmentStretch VerticalAlignmentBottom/TextBlock/Grid/BorderGrid x:NamewindGrid Height60 Width200 VisibilityVisibleGrid.ColumnDefinitionsColumnDefinition/ColumnDefinition/ColumnDefinition//Grid.ColumnDefinitionsBorder Grid.Column0 Width6 Height50 RenderTransformOrigin0.5,0.5 Background#0BE8EBBorder.RenderTransformRotateTransform Angle15//Border.RenderTransform/BorderBorder Grid.Column1 Width6 Height50 Background#0BE8EB/Border Grid.Column2 Width6 Height50 RenderTransformOrigin0.5,0.5 Background#0BE8EBBorder.RenderTransformRotateTransform Angle-15//Border.RenderTransform/Border/Grid/StackPanel /Window窗体后台代码using System; using System.ComponentModel; using System.Threading.Tasks; using System.Windows; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Animation;namespace AirCond {public partial class MainWindow : Window,INotifyPropertyChanged{public MainWindow(){InitializeComponent();DataContext this;MouseWheel MainWindow_MouseWheel;}private void MainWindow_MouseWheel(object sender, MouseWheelEventArgs e){Temp (e.Delta 0 ? 1 : -1);}private int _temp16;public int Temp{get { return _temp; }set { _temp value;_temp Math.Min(31, _temp);_temp Math.Max(16, _temp);OnPropertyChanged(nameof(Temp)); }}private bool _isOpentrue;public bool IsOpen{get { return _isOpen; }set { _isOpen value;OnPropertyChanged(nameof(IsOpen));SetUI();}}private void SetUI(){shutDownButton.Foreground _isOpen ? Brushes.Red : Brushes.Gray;if (_isOpen){StartAnimationIn(snow);StartAnimationIn(windGrid);StartAnimationIn(tempText);}else{StartAnimationOut(snow);StartAnimationOut(windGrid);StartAnimationOut(tempText);}}private async void StartAnimationIn(FrameworkElement element, float seconds0.5f){var sb new Storyboard();var fadeIn new DoubleAnimation{Duration new Duration(TimeSpan.FromSeconds(seconds)),To 1,};Storyboard.SetTargetProperty(fadeIn, new PropertyPath(Opacity));sb.Children.Add(fadeIn);sb.Begin(element);await Task.Delay((int)(seconds * 1000));}private async void StartAnimationOut(FrameworkElement element, float seconds 0.5f){var sb new Storyboard();var fadeIn new DoubleAnimation{Duration new Duration(TimeSpan.FromSeconds(seconds)),To 0,};Storyboard.SetTargetProperty(fadeIn, new PropertyPath(Opacity));sb.Children.Add(fadeIn);sb.Begin(element);await Task.Delay((int)(seconds * 1000));}public event PropertyChangedEventHandler PropertyChanged;public void OnPropertyChanged(string name){PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));}private void Border_MouseDown(object sender, MouseButtonEventArgs e){if(e.LeftButtonMouseButtonState.Pressed)this.DragMove();}private void ShutDownClick(object sender, RoutedEventArgs e){IsOpen !IsOpen;}} } 在App.xaml里面定义资源Application x:ClassAirCond.Appxmlnshttp://schemas.microsoft.com/winfx/2006/xaml/presentationxmlns:xhttp://schemas.microsoft.com/winfx/2006/xamlxmlns:localclr-namespace:AirCondStartupUriMainWindow.xamlApplication.ResourcesFontFamily x:KeyDigitalpack://application;,,,/Fonts/#Digital-7 Mono/FontFamilyPathGeometry x:KeyShutDownIcon FiguresM209.664 813.696a426.666667 426.666667 0 0 1 0-603.392 42.666667 42.666667 0 0 1 60.330667 60.330667 341.333333 341.333333 0 1 0 482.474666 0 42.666667 42.666667 0 0 1 60.330667-60.330667A426.666667 426.666667 0 0 1 209.664 813.696zM511.36 85.333333a42.666667 42.666667 0 0 1 42.666667 42.666667v384a42.666667 42.666667 0 0 1-85.333334 0V128a42.666667 42.666667 0 0 1 42.666667-42.666667z/LinearGradientBrush x:KeyLinearBrushGradientStop Offset0 ColorRed/GradientStop Offset0.5 ColorBlue/GradientStop Offset1 ColorGreen//LinearGradientBrushStyle TargetTypelocal:IconFontButtonSetter PropertyCornerRadius Value0/Setter PropertyPadding Value5/Setter PropertyBackground ValueTransparent/Setter PropertyForeground ValueGray/Setter PropertyBorderBrush ValueTransparent/Setter PropertyFocusVisualStyle Value{x:Null}/Setter PropertyTemplateSetter.ValueControlTemplate TargetTypelocal:IconFontButtonBorder CornerRadius{TemplateBinding CornerRadius} Background{TemplateBinding Background} BorderThickness0Path x:Namepath Data{TemplateBinding Geometry} Fill{TemplateBinding Foreground}Width{TemplateBinding IconWidth}Height{TemplateBinding IconHeight}SnapsToDevicePixelsTrueStretchUniformRenderTransformOrigin0.5,0.5Margin{TemplateBinding Padding}Path.RenderTransformTransformGroupScaleTransform ScaleX1 ScaleY1 //TransformGroup/Path.RenderTransform/Path/BorderControlTemplate.TriggersEventTrigger RoutedEventUIElement.MouseEnterBeginStoryboard StoryboardDoubleAnimation Storyboard.TargetNamepath Storyboard.TargetProperty(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX) To1.2 Duration0:0:0.1 AutoReverseFalse /DoubleAnimation Storyboard.TargetNamepath Storyboard.TargetProperty(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY) To1.2 Duration0:0:0.1 AutoReverseFalse //Storyboard/BeginStoryboard/EventTriggerEventTrigger RoutedEventUIElement.MouseLeaveBeginStoryboardStoryboardDoubleAnimation Storyboard.TargetNamepath Storyboard.TargetProperty(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX) To1 Duration0:0:0.1 AutoReverseFalse /DoubleAnimation Storyboard.TargetNamepath Storyboard.TargetProperty(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY) To1 Duration0:0:0.1 AutoReverseFalse //Storyboard/BeginStoryboard/EventTrigger/ControlTemplate.Triggers/ControlTemplate/Setter.Value/Setter /Style/Application.Resources /Application创建一个IconFontButton类using System.Windows; using System.Windows.Controls; using System.Windows.Media;namespace AirCond {public class IconFontButton : Button{public Geometry Geometry{get { return (Geometry)GetValue(GeometryProperty); }set { SetValue(GeometryProperty, value); }}public static readonly DependencyProperty GeometryProperty DependencyProperty.Register(Geometry, typeof(Geometry), typeof(IconFontButton), new PropertyMetadata(default(Geometry)));public CornerRadius CornerRadius{get { return (CornerRadius)GetValue(CornerRadiusProperty); }set { SetValue(CornerRadiusProperty, value); }}public static readonly DependencyProperty CornerRadiusProperty DependencyProperty.Register(CornerRadius, typeof(CornerRadius), typeof(IconFontButton), new PropertyMetadata(default(CornerRadius)));public double IconWidth{get { return (double)GetValue(IconWidthProperty); }set { SetValue(IconWidthProperty, value); }}public static readonly DependencyProperty IconWidthProperty DependencyProperty.Register(IconWidth, typeof(double), typeof(IconFontButton), new PropertyMetadata(32.0));public double IconHeight{get { return (double)GetValue(IconHeightProperty); }set { SetValue(IconHeightProperty, value); }}public static readonly DependencyProperty IconHeightProperty DependencyProperty.Register(IconHeight, typeof(double), typeof(IconFontButton), new PropertyMetadata(32.0));} } 图片和字体来源于网络仅用于学习用途如有侵权请联系我删除。如需图片和字体资源请下载项目代码百度云链接给白嫖怪的惊喜链接https://pan.baidu.com/s/1R1lxv-rcQI3rytn3epJP6Q提取码s5hl效果图:如果喜欢点个赞呗~
http://www.yutouwan.com/news/339488/

相关文章:

  • 智慧团建网站登陆平台wordpress 标题字号
  • 南京有名的网站建设公司天河网站建设公司排名
  • 华东建设发展设计有限公司网站上海seo网站推广
  • 网站仿静态和静态的区别网站备案拍照背景幕布
  • 老鹰主机做的网站南通网站建设策划书
  • 站酷设计网站官网入口免费个人海报网站开发 旅游
  • 网站开发算互联网公司吗江苏百度推广代理商
  • 做网站要多少钱一个沧州有没有做网站的
  • 建e网官方网站求个网站没封的
  • 淄博高端网站建设乐达郑州做营销型网站公司
  • 公司网站建设详细方案从化公司网站建设
  • 带空间二字的韩国视频网站内蒙旅游
  • 17网站一起做网店池尾房地产中介网站
  • 上海备案证查询网站查询网站查询系统廉洁文化手册页面设计模板
  • 怎样在自己的网站上家程序公司官网如何制作
  • 建设网站的目的服装类一个空间能否做两个网站
  • 惠州企业网站建设公司网站排名下降了怎么办
  • 做o2o网站需要多少钱Wordpress有趣的小工具
  • 网站开发字体的引用网页设计大赛主题
  • 淘宝网站建设方案建设网站的功能及目的是什么
  • 自己的服务器做网站做公司网站需要多长时间
  • 辽阳做网站重庆网站备案系统
  • 开发者模式要不要开淘宝标题优化工具推荐
  • 前端手机网站青岛栈桥
  • 农业展示网站模板下载青岛建设企业网站
  • 沈阳网站网页wordpress编辑界面
  • 网站建设毕业设计评价985短链接生成
  • 网站公司怎么做运营商怎样提高百度推广排名
  • 北京住房建设部网站东莞市疾控中心24小时咨询电话
  • 一起做网店的类似网站网站推广优化公司