• 大小: 0.35M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2020-12-14
  • 语言: C#
  • 标签: wpf    wp    5  

资源简介

5个关于wpf事件路由的例子

资源截图

代码片段和文件信息

using System;
using System.Windows;
using System.Windows.Controls;

namespace SDKSample
{
    public class MyButtonSimple : Button
    {
        // Step1. Create a custom routed event by first registering a RoutedEventID
        // This event uses the bubbling routing strategy
        public static readonly RoutedEvent TapEvent =
            EventManager.RegisterRoutedEvent(“Tap“ RoutingStrategy.Bubble typeof(RoutedEventHandler) typeof(MyButtonSimple));

        // Step2. Provide CLR accessors for the event
        public event RoutedEventHandler Tap
        {
            add
            {
                AddHandler(TapEvent value);
            }
            remove
            {
                RemoveHandler(TapEvent value);
            }
        }

        /

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件       74234  2014-06-06 09:29  description.html
     文件        1670  2014-06-06 09:29  description\offline.js
     文件           0  2014-06-06 09:29  description\Combined.css
     文件           0  2014-06-06 09:29  description\b79636be-b088-48b5-8a8d-c21645d26d2fCombined.css
     文件       10457  2014-06-06 09:29  description\Galleries.css
     文件        1727  2014-06-06 09:29  description\Layout.css
     文件       71647  2014-06-06 09:29  description\Brand.css
     文件        3369  2014-06-06 09:29  description\iframedescription.css
     文件        1597  2014-06-06 09:29  description\1.gif
     文件       18078  2014-06-06 09:29  description\3.png
     文件        5452  2014-06-06 09:29  description\1.png
     文件       25213  2014-06-06 09:29  description\2.png
     文件        9059  2014-06-06 09:29  description\3e2aa8c0-f974-4b7e-a784-1bd882ff83813.png
     文件       64699  2014-06-06 09:29  description\4.png
     文件       19307  2014-06-06 09:29  description\2c663476-a361-4192-98b3-59bea2f10f614.png
     文件        7669  2014-06-06 09:29  description\5.png
     文件         374  2014-06-06 09:29  description\Ratings.png
     文件       14808  2014-06-06 09:29  license.rtf
     目录           0  2014-06-06 09:29  C#\bin\
     目录           0  2014-06-06 09:29  C#\bin\Debug\
     文件        4608  2014-06-06 09:29  C#\bin\Debug\SDKSampleLibrary.dll
     文件       13824  2014-06-06 09:29  C#\bin\Debug\SDKSampleLibrary.pdb
     文件       74752  2014-06-06 09:29  C#\EventsRoutedEventSource.suo
     文件       40960  2014-06-06 09:29  C#\routedeventsource.suo
     目录           0  2014-06-06 09:29  C#\SDKSampleLibrary\
     文件        1227  2014-06-06 09:29  C#\SDKSampleLibrary\Demo5CustomEventHandler.cs
     目录           0  2014-06-06 09:29  C#\SDKSampleLibrary\obj\
     目录           0  2014-06-06 09:29  C#\SDKSampleLibrary\obj\Debug\
     文件        5790  2014-06-06 09:29  C#\SDKSampleLibrary\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
     文件        2081  2014-06-06 09:29  C#\SDKSampleLibrary\obj\Debug\sdksamplelibrary.csproj.FileListAbsolute.txt
     文件        4608  2014-06-06 09:29  C#\SDKSampleLibrary\obj\Debug\SDKSampleLibrary.dll
............此处省略100个文件信息

评论

共有 条评论