Small Bug w/ Syntax Editor + Themes

SyntaxEditor for WPF Forum

Posted 14 years ago by SledgeHammer01
Version: 9.2.0515
Platform: .NET 4.0
Environment: Windows XP (32-bit)
Avatar
I have a pop up window which utilizes the syntax editor. Its a ribbon window with a syntax editor. Naturally, I want the syntax editor style to match the ribbon window, so I used the scroll bar ribbon style.

One small glitch, this style doesn't cover the lower right hand filler rectangle. That remains gray and sticks out like a sore thumb.

Any chance of sneaking this into 2010.1? :)

EDIT: The ScrollViewerStyle hits the intersection rectangle, but that doesn't work with the SyntaxEditor. Just every other control.

<ribbon:RibbonWindow x:Class="ScriptEditorWindow"
                     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                     xmlns:ribbon="http://schemas.actiprosoftware.com/winfx/xaml/ribbon"
                     xmlns:themes="http://schemas.actiprosoftware.com/winfx/xaml/themes"
                     xmlns:editor="http://schemas.actiprosoftware.com/winfx/xaml/syntaxeditor"
                     themes:ThemeManager.Theme="Office2007Blue"
                     FocusManager.FocusedElement="{Binding ElementName=scriptText}"
                     x:Name="scriptWindow"
                     Height="560" Width="560">

    <DockPanel>

        <ribbon:Ribbon x:Name="ribbon" DockPanel.Dock="Top" QuickAccessToolBarLocation="None">

            <ribbon:Ribbon.Tabs>
            </ribbon:Ribbon.Tabs>

        </ribbon:Ribbon>

        <editor:SyntaxEditor x:Name="scriptText" Text="{Binding ElementName=scriptWindow, Path=Script.Text}" CanCutCopyBlankLineWhenNoSelection="False"
                             CanSplitHorizontally="False" CanSplitVertically="False" CanCutCopyDragWithRtf="False" IsMouseWheelZoomEnabled="False">

            <editor:SyntaxEditor.Resources>
                <Style TargetType="ScrollBar" BasedOn="{StaticResource {x:Static ribbon:RibbonStyles.ScrollBarAlternateKey}}" />
            </editor:SyntaxEditor.Resources>

        </editor:SyntaxEditor>

    </DockPanel>

</ribbon:RibbonWindow>
[Modified at 04/09/2010 04:48 PM]

Comments (2)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
That is a ScrollBarBlock control that is a SyntaxEditor primitive. You can easily change its background color by altering this brush in your app resources:
<SolidColorBrush x:Key="{x:Static themes:SyntaxEditorCommonDictionary.ScrollBarBlockBackgroundBrushKey}" Color="{StaticResource {x:Static SystemColors.ControlColorKey}}" />


Actipro Software Support

Posted 14 years ago by SledgeHammer01
Avatar
Ah, thanks.
The latest build of this product (v24.1.2) was released 25 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.