title: Scrollviewer visibility after debugging
body: <p>I have a WPF Application. I added a scrollviewer to a window. However I can see the scrollviewer during the design. When I debug the project then the scrollviewer does not seem...</p>
  
  <p>There is the code</p>
  
  <pre><code>                  &lt;/local:WorkControl.DataContext&gt;
  &lt;ScrollViewer HorizontalScrollBarVisibility="Visible" VerticalScrollBarVisibility="Visible"&gt;
      &lt;Grid Name="mainGrid" VerticalAlignment="Top"&gt;
  
      &lt;Grid.Background&gt;
          &lt;ImageBrush Stretch="Fill" TileMode="FlipXY" Viewport="0,0,1479,437" ViewportUnits="Absolute" /&gt;
      &lt;/Grid.Background&gt;
  
          &lt;DockPanel HorizontalAlignment="Stretch" Margin="1,1,1,1" Name="dockPanel1" VerticalAlignment="Top" Width="Auto"&gt;
          &lt;Grid Name="grid1" Width="Auto" Margin="0" VerticalAlignment="Top" DockPanel.Dock="Top" OpacityMask="Black" ShowGridLines="False" OverridesDefaultStyle="False"&gt;
              &lt;Grid.ColumnDefinitions&gt;
                  &lt;ColumnDefinition Width="*" /&gt;
                  &lt;ColumnDefinition Width="250" /&gt;
                  &lt;ColumnDefinition Width="310" /&gt;
              &lt;/Grid.ColumnDefinitions&gt;
              &lt;Grid.RowDefinitions&gt;
                  &lt;RowDefinition Height="40" /&gt;
                  &lt;RowDefinition Height="123" /&gt;
                  &lt;RowDefinition Height="*" /&gt;
              &lt;/Grid.RowDefinitions&gt;
              &lt;Border Grid.ColumnSpan="3" BorderBrush="Silver" BorderThickness="1" HorizontalAlignment="Left" Margin="2" Name="borAdrTopR" VerticalAlignment="Top" CornerRadius="5"
          AllowDrop="False"&gt;
                  &lt;Canvas Width="834" Height="40" HorizontalAlignment="Stretch" Margin="0" VerticalAlignment="Stretch" Name="panelTop" ContextMenuOpening="panelTop_ContextMenuOpening"&gt;
                      &lt;TextBlock Name="txAdrID" Canvas.Left="11" Canvas.Top="11" Height="20" Text="AdrID:" Width="44" Foreground="Silver" FontWeight="Bold" /&gt;
                      &lt;TextBox Text="{Binding [AdrID]}" Height="20" HorizontalAlignment="Right" Margin="0,11,602,0" Name="tbAdrID" Width="86" VerticalAlignment="Top" FontWeight="Bold"
              VerticalContentAlignment="Top" Foreground="Silver" Canvas.Left="54" Canvas.Top="-1" Padding="1" BorderThickness="0" IsReadOnly="True" Background="{x:Null}" /&gt;
                      &lt;TextBlock Canvas.Left="488" Canvas.Top="11" Height="20" Text="Adresspool:" Width="70" TextAlignment="Right" /&gt;
                      &lt;CheckBox Canvas.Left="570" Canvas.Top="11" Content="MSS" Height="16" Name="chkMSSPool" Checked="chkPool_Checked" Unchecked="chkPool_Checked" /&gt;
                      &lt;CheckBox Canvas.Left="620" Canvas.Top="11" Content="GMM" Height="16" Name="chkGMMPool" Checked="chkPool_Checked" Unchecked="chkPool_Checked" /&gt;
                      &lt;CheckBox Canvas.Left="675" Canvas.Top="11" Content="MZ" Height="16" Name="chkMZPool" Checked="chkPool_Checked" Unchecked="chkPool_Checked" IsEnabled="False" /&gt;
                      &lt;CheckBox Canvas.Left="728" Canvas.Top="11" Content="Sage" Height="16" Name="chkSagePool" Checked="chkPool_Checked" Unchecked="chkPool_Checked" /&gt;
                      &lt;CheckBox Canvas.Left="780" Canvas.Top="11" Content="Web" Height="16" Name="chkMyMalikPool" IsEnabled="False" Checked="chkPool_Checked" Unchecked="chkPool_Checked" /&gt;
                      &lt;TextBox Background="{x:Null}" BorderThickness="0" Canvas.Left="367" Canvas.Top="9" FontWeight="Bold" Foreground="Red" Height="21" IsReadOnly="True" Name="tbSecInfo"
              Padding="1" Text="" VerticalContentAlignment="Top" Width="101" /&gt;
                      &lt;Image Canvas.Left="268" Canvas.Top="11" Height="16" Name="imgCRMstatus" Stretch="None" Width="96" MouseLeftButtonUp="imgCRMstatus_MouseClick"
              MouseRightButtonUp="imgCRMstatus_MouseClick" /&gt;
                      &lt;Label Canvas.Left="257" Canvas.Top="17" Height="11" Name="lbCRMStatus" Width="9" IsEnabled="False" /&gt;
                      &lt;Image Canvas.Left="466" Canvas.Top="7" Height="24" Name="imgSec" Stretch="None" Width="24" MouseRightButtonUp="imgSec_MouseClick" MouseLeftButtonUp="imgSec_MouseClick"
              Visibility="Hidden" /&gt;
                  &lt;/Canvas&gt;
              &lt;/Border&gt;
              &lt;Border Grid.Row="1" BorderBrush="Silver" BorderThickness="1" HorizontalAlignment="Left" Name="borAddress" VerticalAlignment="Top" CornerRadius="5" Background="White"
          AllowDrop="False"&gt;
                  &lt;FlowDocumentScrollViewer HorizontalAlignment="Left" Name="fdocview" VerticalAlignment="Top" Height="Auto" VerticalScrollBarVisibility="Auto" Background="#FFFFFFF9"
            Margin="2" HorizontalContentAlignment="Left" Padding="0" MinHeight="118"&gt;
                      &lt;FlowDocument TextAlignment="Left" FontSize="12" PagePadding="5"&gt;
                          &lt;FlowDocument.Resources&gt;
                              &lt;Style TargetType="{x:Type Paragraph}"&gt;
                                  &lt;Setter Property="FontSize" Value="13" /&gt;
                                  &lt;Setter Property="Foreground" Value="DarkBlue" /&gt;
                                  &lt;Setter Property="FontFamily" Value="Trebuchet MS" /&gt;
                                  &lt;Setter Property="Margin" Value="0,0,0,0" /&gt;
                              &lt;/Style&gt;
                          &lt;/FlowDocument.Resources&gt;
                          &lt;Paragraph&gt;ViewControl...mmm&lt;/Paragraph&gt;
                      &lt;/FlowDocument&gt;
                  &lt;/FlowDocumentScrollViewer&gt;
              &lt;/Border&gt;
              &lt;Border Grid.Row="1" Grid.Column="1" BorderBrush="Silver" BorderThickness="1" Padding="3" Name="borAdrInfoLeft" CornerRadius="6" AllowDrop="False"&gt;
                  &lt;Grid VerticalAlignment="Top"&gt;
                      &lt;Grid.ColumnDefinitions&gt;
                          &lt;ColumnDefinition Width="73" /&gt;
                          &lt;ColumnDefinition /&gt;
                          &lt;ColumnDefinition Width="35" /&gt;
                          &lt;ColumnDefinition Width="45" /&gt;
                      &lt;/Grid.ColumnDefinitions&gt;
                      &lt;Grid.RowDefinitions&gt;
                          &lt;RowDefinition Height="28" /&gt;
                          &lt;RowDefinition Height="28" /&gt;
                          &lt;RowDefinition Height="28" /&gt;
                          &lt;RowDefinition Height="28" /&gt;
                      &lt;/Grid.RowDefinitions&gt;
                      &lt;local:ComboBoxCW Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="2" x:Name="cbAdrTypeID" CWListName="Adresstypen" Background="#FFC8D2E8"
              SelectedID="{Binding Path=[AdrTypeID]}" SelectionChanged="cwAdrType_SelectionChanged" Margin="0,0,0,3" /&gt;
                      &lt;local:ComboBoxCW Grid.Column="1" Grid.Row="1" Grid.ColumnSpan="3" x:Name="cbGruppenID" SelectedID="{Binding [GruppenID]}" CWListName="Gruppen" Background="#FFC8D2E8"
              CWListArt="withall" CWListFilter="M" Margin="0,0,0,3" /&gt;
                      &lt;TextBlock Grid.Column="3" Grid.Row="0" Name="txtBedeutung" Text="$$" Width="22" TextAlignment="Center" VerticalAlignment="Center" /&gt;
                      &lt;TextBox Grid.Column="1" Grid.Row="2" Name="tbKundenNr" Canvas.Left="83" Text="{Binding [KundenNr]}" BorderBrush="#96000000" MaxLength="30" Margin="0,0,0,3" /&gt;
                      &lt;TextBox Grid.Column="3" Grid.Row="2" Name="tbCRA" Text="{Binding [CRA]}" BorderBrush="#96000000" IsReadOnly="True" Margin="0,0,0,3" /&gt;
                      &lt;local:ComboBoxCW Grid.Column="1" Grid.Row="3" x:Name="cwSprachID" SelectedID="{Binding [SprachID],Mode=TwoWay}" CWListName="Sprachen" CWListArt="withempty"
              Margin="0,0,0,3" /&gt;
                      &lt;ComboBox Grid.Column="3" Grid.Row="3" Name="cbBedeutung" Text="{Binding Path=[Bedeutung]}"&gt;
                          &lt;ComboBoxItem Content=" " /&gt;
                          &lt;ComboBoxItem Content="A" /&gt;
                          &lt;ComboBoxItem Content="B" /&gt;
                          &lt;ComboBoxItem Content="C" /&gt;
                      &lt;/ComboBox&gt;
                      &lt;TextBlock Grid.Column="0" Grid.Row="0" Text="Adressart" /&gt;
                      &lt;TextBlock Grid.Column="0" Grid.Row="1" Text="Gruppe" /&gt;
                      &lt;TextBlock Grid.Column="0" Grid.Row="2" Text="Kundennr." /&gt;
                      &lt;TextBlock Grid.Column="2" Grid.Row="2" Text="CRA" TextAlignment="Right" /&gt;
                      &lt;TextBlock Grid.Column="0" Grid.Row="3" Text="Sprache" /&gt;
                      &lt;TextBlock Grid.Column="2" Grid.Row="3" Text="Bed." TextAlignment="Right" /&gt;
                  &lt;/Grid&gt;
              &lt;/Border&gt;
              &lt;Border Grid.Row="1" Grid.Column="2" BorderBrush="Silver" BorderThickness="1" Padding="3" Name="borAdrInfoRight" CornerRadius="6" AllowDrop="False"&gt;
                  &lt;Grid VerticalAlignment="Top"&gt;
                      &lt;Grid.ColumnDefinitions&gt;
                          &lt;ColumnDefinition Width="73" /&gt;
                          &lt;ColumnDefinition /&gt;
                          &lt;ColumnDefinition Width="35" /&gt;
                          &lt;ColumnDefinition Width="30" /&gt;
                          &lt;ColumnDefinition Width="30" /&gt;
                      &lt;/Grid.ColumnDefinitions&gt;
                      &lt;Grid.RowDefinitions&gt;
                          &lt;RowDefinition Height="28" /&gt;
                          &lt;RowDefinition Height="28" /&gt;
                          &lt;RowDefinition Height="28" /&gt;
                          &lt;RowDefinition Height="28" /&gt;
                      &lt;/Grid.RowDefinitions&gt;
                      &lt;local:ComboBoxCW Grid.Row="0" Grid.Column="1" x:Name="cbAdrStatusID" SelectedID="{Binding [AdrStatusID]}" CWListName="Adressstati" Margin="0,0,0,3"
              Background="#FFC8D2E8" /&gt;
                      &lt;TextBox Grid.Row="0" Grid.Column="3" Grid.ColumnSpan="2" Name="tbMZunitID"
              Text="{Binding [MZunitID],Mode=OneWay,Converter={StaticResource codetextfromid}, ConverterParameter=MZunits}" Margin="0,0,0,3" BorderBrush="#96000000"
              IsReadOnly="True" /&gt;
                      &lt;local:ComboBoxCW Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="3" x:Name="cbBetreuerID" Text="" Background="#FFC8D2E8" CWListName="Mitarbeiter" Margin="0,0,0,3"
              SelectedID="{Binding Path=[BetreuerID]}" CWListArt="withall" /&gt;
                      &lt;ListBox Grid.Row="2" Grid.Column="1" Name="listBetreuers" BorderBrush="#96000000" SelectionChanged="listBetreuers_SelectionChanged" Grid.ColumnSpan="3"
              Grid.RowSpan="2" Margin="0,0,0,3" /&gt;
                      &lt;Popup Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="3" OpacityMask="#00000000" Name="popAdd" StaysOpen="False" PlacementTarget="{Binding ElementName=listBetreuers}"
              Placement="Bottom" HorizontalOffset="-40" VerticalOffset="-20"&gt;
                          &lt;ListBox Height="160" Width="270" HorizontalAlignment="Left" Name="listAdd" VerticalAlignment="Top" SelectionChanged="listAdd_SelectionChanged" /&gt;
                      &lt;/Popup&gt;
                      &lt;Button Grid.Row="3" Grid.Column="4" Content="-" Height="22" Width="22" Name="btnBetreuerDel" Click="btnBetreuerDel_Click" HorizontalAlignment="Right" /&gt;
                      &lt;Button Grid.Row="2" Grid.Column="4" Content="+" Height="22" Width="22" Name="btnBetreuerAdd" Click="btnBetreuerAdd_Click" HorizontalAlignment="Right" /&gt;
                      &lt;Button Grid.Row="1" Grid.Column="4" Content="H" Height="22" Width="22" Name="btnBetreuerHaupt" Click="btnBetreuerHaupt_Click" HorizontalAlignment="Right" /&gt;
                      &lt;TextBlock Grid.Row="0" Grid.Column="0" Text="Status" /&gt;
                      &lt;TextBlock Grid.Row="0" Grid.Column="2" Text="Unit" TextAlignment="Right" Margin="2" /&gt;
                      &lt;TextBlock Name="lbHauptbetrP" Visibility="Visible" Grid.Row="1" Grid.Column="0" Text="Hauptbetr." /&gt;
                      &lt;TextBlock Name="lbHauptbetrF" Visibility="Hidden" Grid.Row="1" Grid.Column="0" Text="Account-Mgr." /&gt;
                      &lt;TextBlock Grid.Row="2" Grid.Column="0" Text="weitere Betreuer" TextWrapping="Wrap" /&gt;
                  &lt;/Grid&gt;
              &lt;/Border&gt;
              &lt;!-- ====TAB Firma start --&gt;
              &lt;TabControl Grid.Row="2" Grid.ColumnSpan="3" Name="tabReg" Margin="0" SelectionChanged="tabReg_SelectionChanged" VerticalAlignment="Stretch" Padding="2,2"&gt;
                  &lt;TabItem Header="Firma" Name="regFirma" local:HelpProvider.HelpParameter="AddressControl;Firma"&gt;
                      &lt;Grid VerticalAlignment="Top"&gt;
                          &lt;Grid.ColumnDefinitions&gt;
                              &lt;ColumnDefinition Width="*" /&gt;
                              &lt;ColumnDefinition Width="Auto" /&gt;
                              &lt;ColumnDefinition Width="*" /&gt;
                          &lt;/Grid.ColumnDefinitions&gt;
                          &lt;Grid.RowDefinitions&gt;
                              &lt;RowDefinition /&gt;
                          &lt;/Grid.RowDefinitions&gt;
                          &lt;!-- ====Firmen-Felder linke Seite --&gt;
                          &lt;Border Grid.Row="0" Grid.Column="0" BorderBrush="Silver" BorderThickness="1" Padding="3" Name="borFeed0" CornerRadius="6" AllowDrop="False"&gt;
                              &lt;Grid Margin="2"&gt;
                                  &lt;Grid.ColumnDefinitions&gt;
                                      &lt;ColumnDefinition Width="95" /&gt;
                                      &lt;ColumnDefinition Width="*" /&gt;
                                      &lt;ColumnDefinition Width="35" /&gt;
                                  &lt;/Grid.ColumnDefinitions&gt;
                                  &lt;Grid.RowDefinitions&gt;
                                      &lt;RowDefinition Height="50" /&gt;
                                      &lt;RowDefinition Height="28" /&gt;
                                      &lt;RowDefinition Height="28" /&gt;
                                      &lt;RowDefinition Height="28" /&gt;
                                      &lt;RowDefinition Height="28" /&gt;
                                      &lt;RowDefinition Height="28" /&gt;
                                      &lt;RowDefinition Height="38" /&gt;
                                      &lt;RowDefinition Height="28" /&gt;
                                      &lt;RowDefinition Height="28" /&gt;
                                      &lt;RowDefinition Height="28" /&gt;
                                      &lt;RowDefinition Height="28" /&gt;
                                      &lt;RowDefinition Height="28" /&gt;
                                  &lt;/Grid.RowDefinitions&gt;
                                  &lt;TextBlock Grid.Column="0" Grid.Row="0" Text="Firma" /&gt;
                                  &lt;Button Name="btnLinkFirma" Height="23" Width="23" ToolTip="Mit Firma verknüpfen..." Click="btnLinkFirma_Click" Grid.Column="0" Grid.Row="0"
                    HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,0,5,0"&gt;
                                      &lt;Button.Content&gt;
                                          &lt;Image Source="Images/Verknuepfung_32.png" /&gt;
                                      &lt;/Button.Content&gt;
                                  &lt;/Button&gt;
                                  &lt;TextBox Name="tbFirma" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="2" Margin="0,0,0,3" Text="{Binding Path=[Firma]}" BorderBrush="#96000000"
                    MouseDoubleClick="tbFirma_MouseDoubleClick" MaxLength="80" AcceptsReturn="True" /&gt;
                                  &lt;TextBox x:Name="tbFirmazusatz" Grid.Column="1" Grid.Row="1" Grid.ColumnSpan="2" Margin="0,0,0,3" Text="{Binding Path=[Firmazusatz]}" BorderBrush="#96000000"
                    MaxLength="50" /&gt;
  </code></pre>
  
  <p>There are more codes</p>