zoukankan      html  css  js  c++  java
  • wpf 路由事件 代码片段

    <?xml version="1.0" encoding="utf-8" ?>
    <CodeSnippets  xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
        <CodeSnippet Format="1.0.0">
            <Header>
                <Title>Define a RoutedEvent</Title>
                <Shortcut>revent</Shortcut>
                <Description>Code snippet for a event using RoutedEvent</Description>
                <Author>Nathan Zaugg</Author>
                <SnippetTypes>
                    <SnippetType>Expansion</SnippetType>
                </SnippetTypes>
            </Header>
            <Snippet>
                <Declarations>
                    <Literal>
                        <ID>eventhandlertype</ID>
                        <ToolTip>Event Handler Type Type</ToolTip>
                        <Default>RoutedEventHandler</Default>
                    </Literal>
                    <Literal>
                        <ID>name</ID>
                        <ToolTip>Event Name</ToolTip>
                        <Default>MyEvent</Default>
                    </Literal>
                    <Literal>
                        <ID>ownerclass</ID>
                        <ToolTip>The owning class of this Property.  
    Typically the class that it is declared in.</ToolTip> <Default>ownerclass</Default> </Literal> <Literal> <ID>routingstratigy</ID> <ToolTip>The routing stratigy for this event.</ToolTip> <Default>Bubble</Default> </Literal> </Declarations> <Code Language="csharp"> <![CDATA[ // Provide CLR accessors for the event public event RoutedEventHandler $name$ { add { AddHandler($name$Event, value); } remove { RemoveHandler($name$Event, value); } } // Using a RoutedEvent public static readonly RoutedEvent $name$Event = EventManager.RegisterRoutedEvent( "$name$", RoutingStrategy.$routingstratigy$, typeof($eventhandlertype$), typeof($ownerclass$)); $end$]]> </Code> </Snippet> </CodeSnippet> </CodeSnippets>
  • 相关阅读:
    MyEclipse Tern was unable to complete your request in time
    12.5.2 访问被覆盖的方法
    猎头、培训与咨询的价值(2)【补1】——北漂18年(93)
    12.5.1 通过 @ISA 继承
    从柯洁对战AlphaGo,看商业智能
    jquery ajax POST 例子详解
    利用组合索引优化
    Oracle range 分区表
    Perl 面向对象上
    JSON导出CSV中文乱码解决方案
  • 原文地址:https://www.cnblogs.com/nocanstillbb/p/9718684.html
Copyright © 2011-2022 走看看