我的垂直滚动条有问题。
如果我使用水平条滚动内容,我会在滚动结束时看到垂直条。
首先我看到了这个:
滚动后我看到了:
我正在寻找一个解决方案,总能看到两个吧!
Scrollviewer : Horizontical
Dockpanel : Content
Dockpanel : left
Scrollviewer : Vertical
Dockpanel right
Stackpanel : columns....
代码:
<ScrollViewer x:Name="scv_dpn_variable"
CanContentScroll="True"
HorizontalScrollBarVisibility="Visible"
VerticalScrollBarVisibility="Disabled"
Height="auto"
Width="auto"
Margin="15,0,0,0">
<StackPanel x:Name="spn_right" VerticalAlignment="Top">
<DockPanel x:Name="dpn_right_header" Width="auto" Height="auto" VerticalAlignment="Stretch">
<Label Content="Jan" Height="50" VerticalAlignment="Top" Width="40" Foreground="#FFFBF7F7" FontSize="18"/>
<Label Content="Feb" Height="50" VerticalAlignment="Top" Width="40" Foreground="#FFFBF7F7" FontSize="18"/>
<Label Content="Mrz" Height="50" VerticalAlignment="Top" Width="40" Foreground="#FFFBF7F7" FontSize="18"/>
<Label Content="Apr" Height="50" VerticalAlignment="Top" Width="40" Foreground="#FFFBF7F7" FontSize="18"/>
<Label Content="Mai" Height="50" VerticalAlignment="Top" Width="40" Foreground="#FFFBF7F7" FontSize="18"/>
<Label Content="Jun" Height="50" VerticalAlignment="Top" Width="40" Foreground="#FFFBF7F7" FontSize="18"/>
<Label Content="Jul" Height="50" VerticalAlignment="Top" Width="40" Foreground="#FFFBF7F7" FontSize="18"/>
<Label Content="Aug" Height="50" VerticalAlignment="Top" Width="45" Foreground="#FFFBF7F7" FontSize="18"/>
<Label Content="Sep" Height="50" VerticalAlignment="Top" Width="40" Foreground="#FFFBF7F7" FontSize="18"/>
<Label Content="Okt" Height="50" VerticalAlignment="Top" Width="40" Foreground="#FFFBF7F7" FontSize="18"/>
<Label Content="Nov" Height="50" VerticalAlignment="Top" Width="45" Foreground="#FFFBF7F7" FontSize="18"/>
<Label Content="Dez" Height="50" VerticalAlignment="Top" Width="40" Foreground="#FFFBF7F7" FontSize="18"/>
<Label Content="Bemerkung" Height="50" VerticalAlignment="Top" Width="300" Foreground="#FFFBF7F7" FontSize="18"/>
</DockPanel>
<ScrollViewer x:Name="scv_content_Vert1"
Height="auto"
MaxHeight="550"
VerticalScrollBarVisibility="Visible"
Width="auto" Margin="0,0,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" ScrollChanged="scv_content_Vert1_ScrollChanged" UseLayoutRounding="False" CanContentScroll="True"
>
<DockPanel x:Name="dpn_right_content" Width="auto" Height="auto" VerticalAlignment="Stretch">
<StackPanel x:Name="spn_col_jan" VerticalAlignment="Top" />
<StackPanel x:Name="spn_col_feb" VerticalAlignment="Top" />
<StackPanel x:Name="spn_col_mrz" VerticalAlignment="Top" />
<StackPanel x:Name="spn_col_apr" VerticalAlignment="Top" />
<StackPanel x:Name="spn_col_mai" VerticalAlignment="Top" />
<StackPanel x:Name="spn_col_jun" VerticalAlignment="Top" />
<StackPanel x:Name="spn_col_jul" VerticalAlignment="Top" />
<StackPanel x:Name="spn_col_aug" VerticalAlignment="Top" />
<StackPanel x:Name="spn_col_sep" VerticalAlignment="Top" />
<StackPanel x:Name="spn_col_okt" VerticalAlignment="Top" />
<StackPanel x:Name="spn_col_nov" VerticalAlignment="Top" />
<StackPanel x:Name="spn_col_dez" VerticalAlignment="Top" />
<StackPanel x:Name="spn_col_notice" VerticalAlignment="Top" />
</DockPanel>
</ScrollViewer>
</StackPanel>
</ScrollViewer>
整个代码!谢谢你的帮助。