<NME> NetworkEditor.xaml
<BEF> ﻿<UserControl x:Class="WPFToolboxForSiemensPLCs.Controls.NetworkEditor.NetworkEditor"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:ad="clr-namespace:AvalonDock;assembly=AvalonDock"
             xmlns:avalonEdit="clr-namespace:ICSharpCode.AvalonEdit;assembly=ICSharpCode.AvalonEdit"
             xmlns:Controls="clr-namespace:WPFToolboxForSiemensPLCs.Controls"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:Editing="clr-namespace:ICSharpCode.AvalonEdit.Editing;assembly=ICSharpCode.AvalonEdit"
             xmlns:local="clr-namespace:JFKCommonLibrary.WPF.Converters;assembly=JFKCommonLibrary"
             Name="NetworkEditorWindow"
    >
    <UserControl.Resources>
       

        <Style TargetType="{x:Type avalonEdit:TextEditor}">
            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}" />
                          Background="{TemplateBinding Control.Background}"
                          BorderBrush="{TemplateBinding Control.BorderBrush}"
                          BorderThickness="{TemplateBinding Control.BorderThickness}"
                          CanContentScroll="True"
                          Content="{Binding Path=TextArea,
                                            RelativeSource={RelativeSource TemplatedParent}}"
                          Focusable="False"
                          HorizontalScrollBarVisibility="Hidden"
                          Padding="{TemplateBinding Control.Padding}"
                          VerticalScrollBarVisibility="Hidden" />
            <ControlTemplate.Triggers>
                <Trigger Property="avalonEdit:TextEditor.WordWrap" Value="True">
                    <Setter TargetName="PART_ScrollViewer" Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />
                </Trigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>

        <local:BoolToVisibilityConverter x:Key="TrueVisibleConverter"
                                         FalseValue="Collapsed"
                                         TrueValue="Visible" />
        <local:NullToCollapsedConverter x:Key="NullCollapsedConverter" />

        <Style TargetType="{x:Type avalonEdit:TextEditor}">
            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}" />
            <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" />
            <Setter Property="FlowDirection" Value="LeftToRight" />
            <!--  AvalonEdit does not support RTL, so ensure we use LTR by default  -->
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type avalonEdit:TextEditor}">
                        <ContentPresenter Content="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TextArea}" Focusable="False" />
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>


    </UserControl.Resources>
    <Expander Name="myExpander"
              Grid.Row="2"
              HorizontalAlignment="Stretch">
        <Expander.Header>
            <StackPanel Orientation="Horizontal">
                <TextBlock VerticalAlignment="Center" Text="Netzwerk " />
                <TextBlock VerticalAlignment="Center" Text="{Binding NetworkNumber, ElementName=NetworkEditorWindow}" />
                <TextBlock VerticalAlignment="Center" Text=" : " />
                <TextBox VerticalAlignment="Center"
                         BorderThickness="0"
                         Text="{Binding Name}" />
            </StackPanel>
        </Expander.Header>

        <StackPanel>
            <TextBox Margin="25,4,0,3"
                     BorderThickness="0"
                     IsReadOnly="True"
                     Text="{Binding Comment}" />

            <DockPanel LastChildFill="True">
                <Controls:AWLOnlineStatusView Margin="0 -23 0 0"
                                              HorizontalAlignment="Right"
                                              CorespondingTextEditor="{Binding ElementName=textEditor}"
                                              DisplayNetwork="{Binding DisplayNetwork,
                                                                       ElementName=NetworkEditorWindow}"
                                              DockPanel.Dock="Right"
                                              Visibility="{Binding DisplayNetwork.Parent.DiagnosticData,
                                                                   ElementName=NetworkEditorWindow,
                                                                   TargetNullValue=Collapsed,
                                                                   FallbackValue=Collapsed,
                                                                   Converter={StaticResource NullCollapsedConverter}}" />

                <avalonEdit:TextEditor Name="textEditor"
                                       HorizontalAlignment="Stretch"
                                       BorderBrush="DarkGray"
                                       BorderThickness="1"
                                       FontFamily="Consolas"
                                       FontSize="10pt"
                                       HorizontalScrollBarVisibility="Hidden"
                                       IsReadOnly="True"
                                       MouseHover="textEditor_MouseHover"
                                       MouseHoverStopped="textEditor_MouseHoverStopped"
                                       ShowLineNumbers="True"
                                       VerticalScrollBarVisibility="Hidden"
                                       Visibility="Visible" />
            </DockPanel>

        </StackPanel>
    </Expander>
</UserControl>

<MSG> let the tooltips in function block editor work again!


<DFF> @@ -10,7 +10,15 @@
              Name="NetworkEditorWindow"
     >
     <UserControl.Resources>
-       
+
+        <ControlTemplate x:Name="TemplateEditor" x:Key="TemplateEditor" TargetType="avalonEdit:TextEditor">
+            <ScrollViewer Background="{TemplateBinding Control.Background}" BorderBrush="{TemplateBinding Control.BorderBrush}" BorderThickness="{TemplateBinding Control.BorderThickness}" CanContentScroll="True" Content="{Binding Path=TextArea, RelativeSource={RelativeSource TemplatedParent}}" Focusable="False" HorizontalContentAlignment="Left" HorizontalScrollBarVisibility="Hidden" Name="PART_ScrollViewer" Padding="{TemplateBinding Control.Padding}" VerticalContentAlignment="Top" VerticalScrollBarVisibility="Hidden" />
+            <ControlTemplate.Triggers>
+                <Trigger Property="avalonEdit:TextEditor.WordWrap" Value="True">
+                    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" TargetName="PART_ScrollViewer" Value="Disabled" />
+                </Trigger>
+            </ControlTemplate.Triggers>
+        </ControlTemplate>
 
         <Style TargetType="{x:Type avalonEdit:TextEditor}">
             <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}" />

let the tooltips in function block editor work again!