microsoft / WPF-Samples
File Size

The distribution of size of files (measured in lines of code).

Intro
  • File size measurements show the distribution of size of files.
  • Files are classified in four categories based on their size (lines of code): 1-100 (very small files), 101-200 (small files), 201-500 (medium size files), 501-1000 (long files), 1001+(very long files).
  • It is a good practice to keep files small. Long files may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
File Size Overall
  • There are 1,934 files with 125,864 lines of code.
    • 7 very long files (10,347 lines of code)
    • 22 long files (14,269 lines of code)
    • 102 medium size files (30,242 lines of codeclsfd_ftr_w_mp_ins)
    • 208 small files (29,782 lines of code)
    • 1,595 very small files (41,224 lines of code)
8% | 11% | 24% | 23% | 32%
Legend:
1001+
501-1000
201-500
101-200
1-100


explore: zoomable circles | sunburst | 3D view
File Size per Extension
1001+
501-1000
201-500
101-200
1-100
cs10% | 13% | 20% | 21% | 34%
xaml6% | 8% | 26% | 26% | 32%
cpp0% | 30% | 48% | 16% | 4%
vcxproj0% | 0% | 80% | 19% | 0%
ps10% | 0% | 66% | 28% | 4%
h0% | 0% | 26% | 8% | 64%
frag0% | 0% | 0% | 100% | 0%
yml0% | 0% | 0% | 100% | 0%
html0% | 0% | 0% | 100% | 0%
filters0% | 0% | 0% | 0% | 100%
htm0% | 0% | 0% | 0% | 100%
vb0% | 0% | 0% | 0% | 100%
hpp0% | 0% | 0% | 0% | 100%
TXT0% | 0% | 0% | 0% | 100%
props0% | 0% | 0% | 0% | 100%
cmd0% | 0% | 0% | 0% | 100%
lex0% | 0% | 0% | 0% | 100%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
Sample Applications23% | 13% | 24% | 16% | 22%
Getting Started15% | 4% | 26% | 44% | 9%
Documents10% | 33% | 22% | 14% | 18%
Tools0% | 32% | 36% | 17% | 13%
Graphics0% | 5% | 35% | 24% | 34%
Accessibility0% | 18% | 33% | 24% | 22%
Animation0% | 6% | 18% | 33% | 41%
Clipboard0% | 48% | 28% | 10% | 12%
Migration and Interoperability0% | 0% | 29% | 29% | 40%
PerMonitorDPI0% | 0% | 32% | 10% | 56%
Input and Commands0% | 0% | 10% | 34% | 54%
eng0% | 0% | 66% | 28% | 5%
Globalization and Localization0% | 0% | 23% | 0% | 76%
Data Binding0% | 0% | 4% | 4% | 90%
Compatibility0% | 0% | 82% | 0% | 17%
Speech and Media0% | 0% | 0% | 35% | 64%
Threading0% | 0% | 0% | 47% | 52%
Drag and Drop0% | 0% | 0% | 26% | 73%
Visual Layer0% | 0% | 0% | 35% | 64%
Windows0% | 0% | 0% | 6% | 93%
ROOT0% | 0% | 0% | 91% | 8%
Styles & Templates0% | 0% | 0% | 13% | 86%
Elements0% | 0% | 0% | 9% | 90%
Application Management0% | 0% | 0% | 0% | 100%
Properties0% | 0% | 0% | 0% | 100%
Events0% | 0% | 0% | 0% | 100%
Resources0% | 0% | 0% | 0% | 100%
Element Tree0% | 0% | 0% | 0% | 100%
Longest Files (Top 50)
File# lines# units
xaml
brushtypes_samp.xaml
in Getting Started/Concepts/samps
1856 -
HtmlToXamlConverter.cs
in Sample Applications/HtmlToXamlDemo
1713 44
htmltoxamlconverter.cs
in Documents/Fixed Documents/DocumentSerialization/HtmlXmlConverter
1580 44
FontChooser.cs
in Sample Applications/FontDialog
1428 59
MainWindow.cs
in Sample Applications/GeometryDesignerDemo
1350 51
MainWindow.cs
in Sample Applications/GraphingCalculatorDemo
1248 90
xaml
gradientspread_samp.xaml
in Getting Started/Concepts/samps
1172 -
xaml
geometryusage_samp.xaml
in Getting Started/Concepts/samps
911 -
ThumbViewer.xaml.cs
in Documents/Fixed Documents/DocumentSerialization
883 44
Util.cs
in Documents/Fixed Documents/DocumentSerialization
835 19
KnownElements.cs
in Tools/BamlReflector/BamlTools
797 2
SearchWindow.cs
in Accessibility/FindText/FindTextClient
791 19
MainWindow.cs
in Documents/Flow Content/FlowDocumentProperties
785 134
htmlcssparser.cs
in Documents/Fixed Documents/DocumentSerialization/HtmlXmlConverter
727 31
ReflectionUtils.cs
in Sample Applications/EditingExaminerDemo
665 20
OldBamlDisassembler.cs
in Tools/BamlReflector/BamlTools
664 26
xaml
MainWindow.xaml
in Documents/Flow Content/FlowDocumentProperties
644 -
xaml
MainWindow.xaml
in Sample Applications/PhotoStoreDemo
603 -
xaml
ThumbViewer.xaml
in Documents/Fixed Documents/DocumentSerialization
588 -
HtmlCSSParser.cs
in Sample Applications/HtmlToXamlDemo
586 24
xaml
App.xaml
in Animation/AnimationExamples
571 -
baseencoder.cpp
in Graphics/AITCodec/cpp
548 24
MainWindow.cs
in Clipboard/ClipboardViewer
538 23
aitdecoder.cpp
in Graphics/AITCodec/cpp
538 17
xaml
MainWindow.xaml
in Sample Applications/GraphingCalculatorDemo
530 -
Dialog.cs
in Sample Applications/StickyNotesDemo
530 13
htmlschema.cs
in Documents/Fixed Documents/DocumentSerialization/HtmlXmlConverter
526 11
BamlRecords.cs
in Tools/BamlReflector/BamlTools
508 4
HtmlSchema.cs
in Sample Applications/HtmlToXamlDemo
501 11
xaml
PredefinedBrushes.xaml
in Graphics/Brushes
500 -
win32hostingwpfpage.cpp
in Migration and Interoperability/Win32HostingWPFPage/cpp
492 9
xaml
contextmenu_samp.xaml
in Getting Started/Concepts/samps
486 -
wordxmlreader.cs
in Documents/Fixed Documents/DocumentSerialization/WordXmlSerialize
461 19
MainWindow.cs
in Sample Applications/StickyNotesDemo
458 14
basedecoder.cpp
in Graphics/AITCodec/cpp
456 23
MainWindow.cs
in Accessibility/SelectionPattern/SelectionPatternSample
453 12
xaml
menus_samp.xaml
in Getting Started/Concepts/samps
439 -
MainWindow.cs
in Documents/Fixed Documents/DocumentStructure
434 20
HtmlLexicalAnalyzer.cs
in Sample Applications/HtmlToXamlDemo
421 12
MainWindow.cs
in Graphics/Vector
420 4
htmllexicalanalyzer.cs
in Documents/Fixed Documents/DocumentSerialization/HtmlXmlConverter
418 12
MainWindow.cs
in Sample Applications/EditingExaminerDemo
414 17
xaml
MainWindow.xaml
in Input and Commands/EditingCommands
413 -
xaml
defaultstickynotestyle.xaml
in Documents/Annotations/AnnotationsStyling
400 -
MainWindow.cs
in Graphics/Matrix
398 4
build.ps1
in eng
395 -
xaml
Styles.xaml
in Sample Applications/CustomComboBox
393 -
HtmlFromXamlConverter.cs
in Sample Applications/HtmlToXamlDemo
389 9
LocBaml.cs
in Tools/LocBaml
389 10
MainWindow.cs
in Sample Applications/CalculatorDemo
387 20
Files With Most Units (Top 20)
File# lines# units
MainWindow.cs
in Documents/Flow Content/FlowDocumentProperties
785 134
MainWindow.cs
in Sample Applications/GraphingCalculatorDemo
1248 90
FontChooser.cs
in Sample Applications/FontDialog
1428 59
MainWindow.cs
in Sample Applications/GeometryDesignerDemo
1350 51
htmltoxamlconverter.cs
in Documents/Fixed Documents/DocumentSerialization/HtmlXmlConverter
1580 44
ThumbViewer.xaml.cs
in Documents/Fixed Documents/DocumentSerialization
883 44
HtmlToXamlConverter.cs
in Sample Applications/HtmlToXamlDemo
1713 44
txtserializerwriter.cs
in Documents/Fixed Documents/DocumentSerialization/SerializerWriter
264 39
htmlserializerwriter.cs
in Documents/Fixed Documents/DocumentSerialization/SerializerWriter
175 35
rtfserializerwriter.cs
in Documents/Fixed Documents/DocumentSerialization/SerializerWriter
175 35
xamlserializerwriter.cs
in Documents/Fixed Documents/DocumentSerialization/SerializerWriter
176 35
htmlcssparser.cs
in Documents/Fixed Documents/DocumentSerialization/HtmlXmlConverter
727 31
OldBamlDisassembler.cs
in Tools/BamlReflector/BamlTools
664 26
baseencoder.cpp
in Graphics/AITCodec/cpp
548 24
HtmlCSSParser.cs
in Sample Applications/HtmlToXamlDemo
586 24
MainWindow.cs
in Clipboard/ClipboardViewer
538 23
basedecoder.cpp
in Graphics/AITCodec/cpp
456 23
RollupDocument.cs
in Documents/Fixed Documents/DocumentMerge
195 20
MainWindow.cs
in Documents/Fixed Documents/DocumentStructure
434 20
MainWindow.cs
in Sample Applications/CalculatorDemo
387 20
Files With Long Lines (Top 20)

There are 286 files with lines longer than 120 characters. In total, there are 1762 long lines.

File# lines# units# long lines
htmltoxamlconverter.cs
in Documents/Fixed Documents/DocumentSerialization/HtmlXmlConverter
1580 44 99
xaml
MainWindow.xaml
in Documents/Flow Content/FlowDocumentProperties
644 - 84
xaml
MainWindow.xaml
in Sample Applications/EditingExaminerDemo
206 - 49
htmlcssparser.cs
in Documents/Fixed Documents/DocumentSerialization/HtmlXmlConverter
727 31 45
xaml
Styles.xaml
in Sample Applications/CustomComboBox
393 - 43
xaml
TOC.xaml
in Getting Started/Concepts
205 - 42
xaml
defaultstickynotestyle.xaml
in Documents/Annotations/AnnotationsStyling
400 - 37
xaml
ThumbViewer.xaml
in Documents/Fixed Documents/DocumentSerialization
588 - 37
xaml
btncolor_samp.xaml
in Getting Started/Concepts/samps
380 - 37
xaml
documentviewer_samp.xaml
in Getting Started/Concepts/samps
299 - 32
xaml
MainWindow.xaml
in Graphics/Vector
152 - 31
xaml
CustomAnimationExample.xaml
in Animation/CustomAnimation
329 - 30
xaml
MainWindow.xaml
in Sample Applications/GeometryDesignerDemo
203 - 28
xaml
contextmenu_samp.xaml
in Getting Started/Concepts/samps
486 - 26
xaml
menus_samp.xaml
in Getting Started/Concepts/samps
439 - 26
xaml
HomePage.xaml
in Globalization and Localization/GlobalizationHomepage
319 - 24
xaml
Scene.xaml
in Getting Started/ControlsAndLayout/ControlsAndLayout
133 - 23
xaml
Document1.xaml
in Documents/Flow Content/FlowDocumentNewsClient
88 - 22
xaml
MainWindow.xaml
in Graphics/Matrix
164 - 21
xaml
actualwidth_samp.xaml
in Getting Started/Concepts/samps
244 - 20