Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

resharper and microsoft naming conventions. How should I adjust? WPF/Silverlight

Started using ReSharper and have some issues along. I got most of the stuff figured out but can't decide what to do with:

  1. VS automatically creates Window_Loaded, Button_OnClick and so on. Resharper says there should be no underscore. How can I fix all those?

  2. How Should I name controls and windows in WPF? I name them as btnSubmit, wndMain, etc but obviously this is not what preferred by ReSharper. Is SubmitButton and MainWindow better?

prefixing worked for me in the past since I can see items sorted in collections but maybe it's wrong? Any suggestions will be helpful. I'm going through tremendous pain with all this StyleCops etc :)

like image 498
katit Avatar asked Jun 09 '11 19:06

katit


1 Answers

Question 1)

Just disable as shown below.

// ReSharper disable InconsistentNaming
        private void btnCreateChannel_Click(object sender, RoutedEventArgs e)
// ReSharper restore InconsistentNaming
        {
            SetupChannel();
        }

Question 2)

Follow Microsoft naming convention -> here

like image 88
dance2die Avatar answered Nov 05 '22 23:11

dance2die