SORU
29 NİSAN 2009, ÇARŞAMBA


Nasıl bir StackPanel içinde çalışmak ScrollViewer alabilir miyim?

Bu ScrollViewer çalışmıyor aşağıdaki WPF XAML (kaydırma çubuğu görüntüler ama gidemez ve içeriğini alt penceresi kapanır).

Bir Kılavuz için dış StackPanel değiştirebilirim ve bunu başaracağız.

Ancak, aşağıdaki kodu ettim benim uygulamada, bir dış StackPanel gerekiyor.Ben StackPanel için ScrollViewer kullanışlı bir kaydırma çubuğunu göstermek için ne yapmam gerekiyor?="Stretch" Height="Oto" iş yok. örneğin ayarlar verticalalignment

 <StackPanel>
        <ScrollViewer>
            <StackPanel>
                <TextBlock Text="This is a test"/>
                <TextBlock Text="This is a test"/>
                <TextBlock Text="This is a test"/>
                <TextBlock Text="This is a test"/>
                <TextBlock Text="This is a test"/>
                <TextBlock Text="This is a test"/>
                <TextBlock Text="This is a test"/>
                <TextBlock Text="This is a test"/>
                <TextBlock Text="This is a test"/>
                <TextBlock Text="This is a test"/>
                <TextBlock Text="This is a test"/>
                <TextBlock Text="This is a test"/>
                <TextBlock Text="This is a test"/>
                <TextBlock Text="This is a test"/>
                <TextBlock Text="This is a test"/>
                <TextBlock Text="This is a test"/>
                <TextBlock Text="This is a test"/>
                <TextBlock Text="This is a test"/>
                <TextBlock Text="This is a test"/>
                <TextBlock Text="This is a test"/>
                <TextBlock Text="This is a test"/>
                <TextBlock Text="This is a test"/>
                <TextBlock Text="This is a test"/>
                <TextBlock Text="This is a test"/>
                <TextBlock Text="This is a test"/>
                <TextBlock Text="This is a test"/>
                <TextBlock Text="This is a test"/>
            </StackPanel>
        </ScrollViewer>
 </StackPanel>

CEVAP
8 Temmuz 2010, PERŞEMBE


Bu bir süre için adamcağız beni, hile bir scrollviewer içinde stackpanel koymaktır.

Ayrıca, kaydırma CanContentScroll özelliği izleyiciye Doğru ayarlamak emin olmanız gerekir, işte bir örnek:

  <ScrollViewer Grid.Row="1" Margin="299,12,34,54" Name="ScrollViewer1" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" Height="195" CanContentScroll="True">
        <StackPanel Name="StackPanel1" OverridesDefaultStyle="False"  Height="193" Width="376" VerticalAlignment="Top" HorizontalAlignment="Left"></StackPanel>
  </ScrollViewer>

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • CasinoRoyaleMovie's channel

    CasinoRoyale

    1 AĞUSTOS 2006
  • Chanre Joubert

    Chanre Joube

    27 Temmuz 2012
  • Maya Learning Channel

    Maya Learnin

    23 HAZİRAN 2010