• 大小: 103KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-06-15
  • 语言: C#
  • 标签: Loading  

资源简介

WPF 用户控件 Loading 效果

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Loading
{
    /// 
    /// UserControl1.xaml 的交互逻辑
    /// 

    public partial class LoadingPage : UserControl
    {
        public LoadingPage()
        {
            InitializeComponent();
        }

        #region 加载圆圈的margin
        [DescriptionAttribute(“加载圆圈的margin“) CategoryAttribute(“扩展“) DefaultValueAttribute(0)]
        public string LoadCirclesMargin
        {
            get { return (string)GetValue(LoadCirclesMarginProperty); }
            set { SetValue(LoadCirclesMarginProperty value); }
        }


        public static readonly DependencyProperty LoadCirclesMarginProperty =
            DependencyProperty.Register(“LoadCirclesMargin“ typeof(string) typeof(LoadingPage)
            new frameworkPropertymetadata(“50“));
        #endregion

        #region 加载中的提示
        [DescriptionAttribute(“加载中的提示“) CategoryAttribute(“扩展“) DefaultValueAttribute(0)]
        public string LoadingText
        {
            get { return (string)GetValue(LoadingTextProperty); }
            set { SetValue(LoadingTextProperty value); }
        }


        public static readonly DependencyProperty LoadingTextProperty =
            DependencyProperty.Register(“LoadingText“ typeof(string) typeof(LoadingPage)
            new frameworkPropertymetadata(“加载中“));
        #endregion

        #region 加载中的提示的字体大小
        [DescriptionAttribute(“加载中的提示的字体大小“) CategoryAttribute(“扩展“) DefaultValueAttribute(0)]
        public int LoadingTextFontSize
        {
            get { return (int)GetValue(LoadingTextFontSizeProperty); }
            set { SetValue(LoadingTextFontSizeProperty value); }
        }


        public static readonly DependencyProperty LoadingTextFontSizeProperty =
            DependencyProperty.Register(“LoadingTextFontSize“ typeof(int) typeof(LoadingPage)
            new frameworkPropertymetadata(12));
        #endregion

        #region 圆圈的颜色
        [DescriptionAttribute(“圆圈的颜色“) CategoryAttribute(“扩展“) DefaultValueAttribute(0)]
        public Brush CirclesBrush
        {
            get { return (Brush)GetValue(CirclesBrushProperty); }
            set { SetValue(CirclesBrushProperty value); }
        }


        public static readonly DependencyProperty CirclesBrushProperty =
            DependencyProperty.Register(“CirclesBrush“ typeof(Brush) typeof(LoadingPage)
            new frameworkPropertymetadata(Brushes.Black));
        #endregion

        #region 加载中的提示的字体颜色
        [DescriptionAttribute(“加载中的提示的字体颜色“) CategoryAttribute(“扩展“)

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      13824  2015-03-05 16:05  Loading\Loading\bin\Debug\Loading.dll

     文件      26112  2015-03-05 16:05  Loading\Loading\bin\Debug\Loading.pdb

     文件       3970  2015-03-05 12:01  Loading\Loading\Loading.csproj

     文件       6407  2015-03-05 16:04  Loading\Loading\LoadingPage.xaml

     文件       3717  2015-03-05 16:05  Loading\Loading\LoadingPage.xaml.cs

     文件       6844  2015-03-05 16:29  Loading\Loading\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件        787  2015-03-05 16:03  Loading\Loading\obj\Debug\Loading.csproj.FileListAbsolute.txt

     文件        919  2015-03-05 15:51  Loading\Loading\obj\Debug\Loading.csproj.GenerateResource.Cache

     文件      13824  2015-03-05 16:05  Loading\Loading\obj\Debug\Loading.dll

     文件       4445  2015-03-05 16:05  Loading\Loading\obj\Debug\Loading.g.resources

     文件      26112  2015-03-05 16:05  Loading\Loading\obj\Debug\Loading.pdb

     文件        180  2015-03-05 15:51  Loading\Loading\obj\Debug\Loading.Properties.Resources.resources

     文件       4215  2015-03-05 16:05  Loading\Loading\obj\Debug\LoadingPage.baml

     文件       9297  2015-03-05 16:05  Loading\Loading\obj\Debug\LoadingPage.g.cs

     文件       9297  2015-03-05 16:05  Loading\Loading\obj\Debug\LoadingPage.g.i.cs

     文件        203  2015-03-05 16:05  Loading\Loading\obj\Debug\Loading_MarkupCompile.cache

     文件        202  2015-03-05 16:29  Loading\Loading\obj\Debug\Loading_MarkupCompile.i.cache

     文件       3032  2015-03-05 12:01  Loading\Loading\obj\Debug\UserControl1.g.i.cs

     文件       2305  2015-03-05 12:01  Loading\Loading\Properties\AssemblyInfo.cs

     文件       2825  2015-03-05 12:01  Loading\Loading\Properties\Resources.Designer.cs

     文件       5612  2013-09-25 00:00  Loading\Loading\Properties\Resources.resx

     文件       1118  2015-03-05 12:01  Loading\Loading\Properties\Settings.Designer.cs

     文件        201  2013-09-25 00:00  Loading\Loading\Properties\Settings.settings

     文件       1489  2015-03-05 12:02  Loading\Loading.sln

    ..A..H.     76288  2015-03-05 16:34  Loading\Loading.v12.suo

     文件        326  2015-03-05 12:01  Loading\WpfApplication1\App.xaml

     文件        311  2015-03-05 12:01  Loading\WpfApplication1\App.xaml.cs

     文件      13824  2015-03-05 16:05  Loading\WpfApplication1\bin\Debug\Loading.dll

     文件      26112  2015-03-05 16:05  Loading\WpfApplication1\bin\Debug\Loading.pdb

     文件       9728  2015-03-05 16:32  Loading\WpfApplication1\bin\Debug\WpfApplication1.exe

............此处省略45个文件信息

评论

共有 条评论