《微软官方的visual studio 控件命名规范》由会员分享,可在线阅读,更多相关《微软官方的visual studio 控件命名规范(10页珍藏版)》请在金锄头文库上搜索。
1、微软官方的 Visual Studio 控件命名规范一、Data Control类型 前缀 示例AccessDataSource ads adsPubsDataList dlst dlstTitlesDetailView dvw dvwTitlesFormView fvw fvwFontsGridView gvw gvwCityObjectDataSource ods odsMenusRepeater rpt rptQueryResultsReportViewer rvw rvwRecordSiteMapDataSource smds smdsSiteSqlDataSource sds sds
2、BooksXmlDataSource xds xdsTitles二、Validation Control类型 前缀 示例CompareValidator valc valcValidAgeCustomValidator valx valxDBCheckRangeValidator valg valgAgeRegularExpressionValidator vale valeEmailRequiredFieldValidator valr valrFirstNameValidationSummary vals valsFormErrors三、Navigation Control类型 前缀 示例
3、Menu mnu mnuUser1SiteMapPath smp smpSite1TreeView trvw trvwMenu四、Login Control类型 前缀 示例ChangePassword cpwd cpwdUser1CreateUserWizard cuw cuwLoginLogin log logCenterLoginName logn lognUserLoginStatus logs logsUserLoginView logv logvUserPasswordRecovery pwdr pwdrUser五、WebParts Control类型 前缀 示例Appearance
4、EditorPart paed paedPart1BehaviorEditorPart pbed pbedPart2CatalogZone zca zcatCityConnectionsZone zcon zconDataBaseDeclarativeCatalogPart pdca pdcaPart1EditorZone zed zedNewsImportCatalogPart pica picaPartLayoutEditorPart pled pledNewsPageCatalogPart ppca ppcaMailPropertyGridEditorPart ppge ppgeServ
5、erProxyWebPartManager mpwp mpwpWebWebPartManager mwp mwpSite1六、基本数据类型数据类型 数据类型简写 标准命名举例Array arr arrShoppingListBoolean bln blnIsPostBackByte byt bytPixelValueChar chr chrDelimiterDateTime dtm dtmStartDateDecimal dec decAverageHeightDouble dbl dblSizeofUniverseInteger int intRowCounterLong lng lngBi
6、llGatesIncomeObject obj objReturnValueShort shr shrAverageSingle sng sngMaximumString str strFirstName七、ADO.NET 命名规范 数据类型 数据类型简写 标准命名举例Connection con conNorthwindCommand cmd cmdReturnProductsParameter parm parmProductIDDataAdapter dad dadProductsDataReader dtr dtrProductsDataSet dst dstNorthWindData
7、Table dtbl dtblProductDataRow drow drowRow98DataColumn dcol dcolProductIDDataRelation drel drelMasterDetailDataView dvw dvwFilteredProducts八、WinForm Control 命名规范数据类型 数据类型简写 标准命名举例Label lbl lblMessageLinkLabel llbl llblTodayButton btn btnSaveTextBox txt txtNameMainMenu mmnu mmnuFileCheckBox chk chkSt
8、ockRadioButton rbtn rbtnSelectedGroupBox gbx gbxMainPictureBox pic picImagePanel pnl pnlBodyDataGrid dgrd dgrdViewListBox lst lstProductsCheckedListBox clst clstCheckedComboBox cbo cboMenuListView lvw lvwBrowserTreeView tvw tvwTypeTabControl tctl tctlSelectedDateTimePicker dtp dtpStartDateHscrollBar
9、 hsb hsbImageVscrollBar vsb vsbImageTimer tmr tmrCountImageList ilst ilstImageToolBar tlb tlbManageStatusBar stb stbFootPrintOpenFileDialog odlg odlgFileSaveFileDialog sdlg sdlgSaveFoldBrowserDialog fbdlg fgdlgBrowserFontDialog fdlg fdlgFootColorDialog cdlg cdlgColorPrintDialog pdlg pdlgPrint九、WebCo
10、ntrol 命名规范类型 前缀 示例Adrotator adrt adrtTopAdBulletedList blst blstCityButton btn btnSubmitCalendar cal calMettingDatesCheckBox chk chkBlueCheckBoxList chkl chklFavColorsCompareValidator valc valcValidAgeCustomValidator valx valxDBCheckDropDownList drop dropCountriesDataGrid dgrd dgrdTitlesDataList dls
11、t dlstTitlesRangeValidator valg valgAgeFileUpLoad fup fupImageHiddenField hfld hfldNameHyperLink hlk hlkDetailsImage img imgAuntBettyImageButton ibtn ibtnSubmitImageMap imap imapSiteLabel lbl lblResultsLinkButton lbtn lbtnSubmitListBox lst lstCountriesLiteral ltl ltlTitleLocalize loc locChinaMultiVi
12、ew mvw mvwForm1Panel pnl pnlForm2PlaceHolder plh plhFormContentsRadioButton rad radFemaleRadioButtonList radl radlGenderRegularExpression vale valeEmail_ValidatorRepeater rpt rptQueryResultsRequiredFieldValidator valr valrFirstNameSubStitution subs subsTimeTextBox txt txtFirstNameTable tbl tblCountryCodesTableCell tblc tblcGermanyTableRow tblr tblrCountryValidationSummary vals valsFormErrorsView vw vwCityWizard wiz wizRegister