One of the great features of Visual Studio, that’s been around for a while is snippets. Frankly, I should build more of these because I use them *so* often. I find them so useful I thought I’d share them here, either for you to use or to template into ones of your own. Firs t,when building templated controls I write this a lot: [TemplatePart(Name = ElementContent, Type = typeof (FrameworkElement))] And it’s not just that, I then have to create a constant to define “ElementContent” and then usually load that value into a member variable as part of OnApplyTemplate. So I built a snippet that builds this stuff out for me, resulting in this: [TemplatePart(Name = ElementContent, Type = typeof (FrameworkElement))] //private...(read more) ...
Go to the complete details ...