Tuesday, November 18, 2008 6:37 PM
lynnGasch
Changing the background color
A reader asked,
How do I change the default background color?
I have successfully changed keyword foreground/background colors by modifying the ClassificationFormats.xcml file, but I don't see how I change the white background for the entire buffer view.
While we have an open item to make this configurable in the same way, for now this can be done by adding a custom command, as in this example:
# Add the following to commands.py, reload using Ctrl+Alt+F5, and the next time you hit Ctrl+Shift+F2,
# the background will change to black.
@Metadata.CommandExecuted('{Microsoft.Intellipad}BufferView', '{Microsoft.Intellipad}SetBlackBackground', 'Ctrl+Shift+F2')
def SetBlackBackground(target, bufferView, args):
bufferView.TextEditor.TextView.Background = System.Windows.Media.Brushes.Black