Weekend Adventures in Coding - Visual Studo Customization - Order of Adornment Layers
Saturday, February 14, 2015Font rendering was helped by re-running the OSes Clear Type configuration and installing Text Sharp. If this sort of thing is important to you, you also want this free gem: MacType. It causes Windows to render fonts in a way that is more similar to a Mac which I find improves readability substantially. Unfortunately, it doesn't work perfectly everywhere, but some of Visual Studio is affected.
I've decided today to see if I can apply the last bit, a white shadow to text. This is a common effect throughout MacOS/iOS and I find it improves readability (particularly for high-contrast backgrounds).
Here's what I'm looking to apply (apologies for formatting, I'll get the code formatter working again, soon).
item.Effect = new DropShadowEffect { Opacity = 0.34, ShadowDepth = 9, Direction = 542, BlurRadius = 9, Color=Colors.White };Finding an efficient way to do this (preferably without having to hack about with Reflection) has been frustrating, but I've managed to apply all kinds of effects elsewhere while I was attempting to fill in the gaps of the documentation with some reverse engineering.
Default order of Adornment Layers
While poking about, I thought it might be helpful to know the order of the default adornment layers. I just started (re-)evaluating OzCode and it was picked up by the "Exp" (temporary debug instance), so some of these belong to that. I'm also on CU4 so any that aren't documented may belong to that (search PredefinedAdornmentLayers or hit F1 for the documented ones).CodeBackgroundTextAdornment
vsMergeHighLightSpaceAdornment
Outlining
DiffernceChanges
Difference Space
BraceCompletion
DeltaFullLineAdornment
DeltaNegativeSpaceAdornment
HtmlProvisionalTextHighlight
CurrentLineHighlighter
VsTextMarker
TextMarker
HighlightCommentAdornment
SelectionAndProvisionalHighlight
Inter Line Adornment
Squiggle
LineSeparator
CollaborationMethodEndorsement
ScriptDebuggerSectionDivider
Text
PinnedLayer
vsMergeHighlightSpaceAdornmentAboveText
SmartTag
DragDropAdornmentLayer
Intra Text Adornment
VisibleWhiteSpace
Caret
SimplifyVisualController
PinnableTips
InitialDifferenceWaitingAdornmetLayers
HtmlChrome
I have no idea what I'll be doing with these, but that's the fun of reverse engineering. If you have to do such a task, OzCode is very helpful. It allows searching the contents of objects through several layers and can surface interesting bits to play with. This is, of course, experimental and likely will break between updates, but they've made extending Visual Studio so easy, it's not that bad to tweak between updates/versions. More to come if I figure this out!
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment