• 大小: 578KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-10
  • 语言: C#
  • 标签: WPF  

资源简介

资源中包括自己写的控件和修改别人的集成到自己的控件。主要有:温度计控件、Win8转圈等待控件、车速仪表控件、微信圆球摆动控件、加载等待转圈控件等包括源码,欢迎下载

资源截图

代码片段和文件信息

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;
using System.Windows.Threading;

namespace CircleProcessBar
{
    /// 
    /// Follow steps 1a or 1b and then 2 to use this custom control in a XAML file.
    ///
    /// Step 1a) Using this custom control in a XAML file that exists in the current project.
    /// Add this xmlNamespace attribute to the root element of the markup file where it is 
    /// to be used:
    ///
    ///     xmlns:MyNamespace=“clr-namespace:CircleProcessBar“
    ///
    ///
    /// Step 1b) Using this custom control in a XAML file that exists in a different project.
    /// Add this xmlNamespace attribute to the root element of the markup file where it is 
    /// to be used:
    ///
    ///     xmlns:MyNamespace=“clr-namespace:CircleProcessBar;assembly=CircleProcessBar“
    ///
    /// You will also need to add a project reference from the project where the XAML file lives
    /// to this project and Rebuild to avoid compilation errors:
    ///
    ///     Right click on the target project in the Solution Explorer and
    ///     “Add Reference“->“Projects“->[Select this project]
    ///
    ///
    /// Step 2)
    /// Go ahead and use your control in the XAML file.
    ///
    ///     
    ///
    /// 

    public class CircularProcessBarControl : UserControl INotifyPropertyChanged
    {

        private DispatcherTimer timer;
        private int currentRate = 0;
        public CircularProcessBarControl()
        {
            this.DataContext = this;

            //timer = new DispatcherTimer();
            //timer.Interval = new TimeSpan(0 0 0 0 50);
            //timer.Tick += timer_Tick;
            //timer.Start();
        }

        #region Properties

        private int successRate = 100;
        public int SuccessRate
        {
            get
            {
                return successRate;
            }
            set
            {
                if (value != successRate)
                {
                    successRate = value;
                    onpropertychanged(“SuccessRate“);
                }
            }
        }

        #endregion

        private void timer_Tick(object sender EventArgs e)
        {
            currentRate++;
            SuccessRate = currentRate * 100 / 100;
            if (SuccessRate == 100)
            {
                timer.Stop();
            }
        }

        #region INotifyPropertyChanged

        public event PropertyChangedEventHandler PropertyChanged;

        public void onpropertychange

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

     文件      14336  2017-05-18 15:59  MyControls\CircleProcessBar\bin\Debug\CircleProcessBar.dll

     文件      32256  2017-05-18 15:59  MyControls\CircleProcessBar\bin\Debug\CircleProcessBar.pdb

     文件       3999  2017-05-17 19:03  MyControls\CircleProcessBar\CircleProcessBar.csproj

     文件       3464  2017-05-18 09:16  MyControls\CircleProcessBar\CircularProcessBarControl.cs

     文件       2030  2017-05-18 15:46  MyControls\CircleProcessBar\obj\Debug\CircleProcessBar.csproj.FileListAbsolute.txt

     文件        919  2017-05-18 15:46  MyControls\CircleProcessBar\obj\Debug\CircleProcessBar.csproj.GenerateResource.Cache

     文件      14336  2017-05-18 15:59  MyControls\CircleProcessBar\obj\Debug\CircleProcessBar.dll

     文件       1663  2017-05-18 15:59  MyControls\CircleProcessBar\obj\Debug\CircleProcessBar.g.resources

     文件      32256  2017-05-18 15:59  MyControls\CircleProcessBar\obj\Debug\CircleProcessBar.pdb

     文件        180  2017-05-18 15:46  MyControls\CircleProcessBar\obj\Debug\CircleProcessBar.Properties.Resources.resources

     文件        226  2017-05-18 15:59  MyControls\CircleProcessBar\obj\Debug\CircleProcessBar_MarkupCompile.cache

     文件        224  2017-05-18 15:48  MyControls\CircleProcessBar\obj\Debug\CircleProcessBar_MarkupCompile.i.cache

     文件         82  2017-05-18 15:59  MyControls\CircleProcessBar\obj\Debug\CircleProcessBar_MarkupCompile.lref

     文件       6934  2017-05-18 15:48  MyControls\CircleProcessBar\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件       3015  2017-05-18 15:59  MyControls\CircleProcessBar\obj\Debug\GeneratedInternalTypeHelper.g.cs

     文件       3015  2017-05-18 15:59  MyControls\CircleProcessBar\obj\Debug\GeneratedInternalTypeHelper.g.i.cs

     文件       1427  2017-05-18 15:59  MyControls\CircleProcessBar\obj\Debug\Themes\Generic.baml

     文件       2431  2017-05-17 18:57  MyControls\CircleProcessBar\Properties\AssemblyInfo.cs

     文件       2821  2017-05-17 18:57  MyControls\CircleProcessBar\Properties\Resources.Designer.cs

     文件       5612  2013-07-23 06:00  MyControls\CircleProcessBar\Properties\Resources.resx

     文件       1127  2017-05-17 18:57  MyControls\CircleProcessBar\Properties\Settings.Designer.cs

     文件        201  2013-07-23 06:00  MyControls\CircleProcessBar\Properties\Settings.settings

     文件       1274  2017-05-18 15:59  MyControls\CircleProcessBar\Themes\Generic.xaml

     文件       8720  2017-05-17 19:03  MyControls\CircleProcessBar\ValueToProcessConverter.cs

     文件      36352  2017-05-18 15:10  MyControls\CircularGauge\bin\Debug\CircularGauge.dll

     文件      73216  2017-05-18 15:10  MyControls\CircularGauge\bin\Debug\CircularGauge.pdb

     文件       5628  2016-03-25 16:01  MyControls\CircularGauge\CircularGauge.csproj

     文件        440  2016-03-25 16:01  MyControls\CircularGauge\CircularGauge.csproj.user

     文件      56211  2016-03-25 16:01  MyControls\CircularGauge\CircularGaugeControl.cs

     文件       2720  2017-05-18 15:10  MyControls\CircularGauge\obj\Debug\CircularGauge.csproj.FileListAbsolute.txt

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

评论

共有 条评论