WPF 常用代码片段CodeSnippet
CodeSnippet
- 路由事件
<CodeSnippet Format="1.0.0" xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"><Header><Title>路由事件代码段Title><Author>衆尋Author><Shortcut>roueShortcut><Description>生成默认的路由事件Description><SnippetTypes><SnippetType>SurroundsWithSnippetType><SnippetType>ExpansionSnippetType>SnippetTypes>Header><Snippet><Declarations><Literal><ID>typeID><ToolTip>属性类型ToolTip><Default>EventHandlerDefault>Literal><Literal><ID>RoutedEventNameID><ToolTip>属性名ToolTip><Default>MyEventDefault>Literal>Declarations><Code Language="XML">Code>Snippet>
CodeSnippet>
代码效果
RoutedEventArgs routedEvent = new RoutedEventArgs(OutPutChangedEvent);RaiseEvent(routedEvent);
- Devexpress 通知属性
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"><CodeSnippet Format="1.0.0"><Header><Title>propdxTitle><Shortcut>propdxShortcut><Description>属性和支持字段的代码片段Description><Author>Microsoft CorporationAuthor><SnippetTypes><SnippetType>ExpansionSnippetType>SnippetTypes>Header><Snippet><Declarations><Literal><ID>typeID><ToolTip>属性类型ToolTip><Default>intDefault>Literal><Literal><ID>propertyID><ToolTip>属性名ToolTip><Default>MyPropertyDefault>Literal><Literal><ID>fieldID><ToolTip>支持此属性的变量ToolTip><Default>myVarDefault>Literal>Declarations><Code Language="csharp"> $property$);}set { SetProperty(() => $property$, value); }}$end$]]>Code>Snippet>CodeSnippet>
CodeSnippets>
本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!
