I don't generally use code regions, except in one specific case - dependency properties. Although dependecy properties are a pleasure to work with in most respects, their declaraions are an eyesore and they quickly clutter your code. (As if managing GUI code was not already enough of a challenge...)
I like to give the region the same exact name as the CLR property declaration (copy/paste it in there). That way you can see the scope, type and name when it's collapsed - which is really all you care about 95% of the time.
#region public int ObjectDepthThreshold
public int ObjectDepthThreshold
{
get { return (int)GetValue(ObjectDepthThresholdProperty); }
set { SetValue(ObjectDepthThresholdProperty, value); }
}
public static readonly DependencyProperty ObjectDepthThresholdProperty = DependencyProperty.Register(
"ObjectDepthThreshold",
typeof(int),
typeof(GotoXControls),
new FrameworkPropertyMetadata((int)GotoXServiceState.OBJECT_DEPTH_THRESHOLD_DEFAULT,
FrameworkPropertyMetadataOptions.AffectsRender,
new PropertyChangedCallback(OnControlValueChanged)
)
);
#endregion
When it's collapsed you just see
public int ObjectDepthThreshold
If I have more than one dependency property, I like to start the next #region on the very next line. That way you end up with all of them grouped together in your class, and the code is compact and readable.
BTW if you just want to peek at the declaration, mouse hover over it.