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>
  • 相关阅读:
    poj1088 经典dp
    poj2301
    poj1050(nyoj104 zoj1074)dp问题
    hdu1003
    poj1001(高精度)
    图的深度优先遍历DFS
    jquery中attr和prop的区别
    Apache 配置域名入口路径
    关于启动定时器和取消定时器的问题
    Web攻防之XSS,CSRF,SQL注入
  • 原文地址:https://www.cnblogs.com/nocanstillbb/p/9718684.html
Copyright © 2011-2022 走看看