2013-07-30 8 views
5

मैं एक Grid जो अपने Height इस तरह बढ़ सकता है:ग्रिड को कैसे स्क्रॉल करें?

<Grid.RowDefinitions> 
    <RowDefinition Height="Auto"/> 
</Grid.RowDefinitions> 
<Grid.ColumnDefinitions> 
    <ColumnDefinition Width="*"/> 
</Grid.ColumnDefinitions> 


<Grid Name="Grid" Grid.Row="0" Grid.Column="0"> 

</Grid> 

मैं इसे कैसे स्क्रॉल कर सकते हैं ऊपर-नीचे?

यह एक विंडोज फोन 8 ऐप है।

+0

आप एक ScrollViewer की कोशिश की? http://msdn.microsoft.com/en-us/library/windowsphone/design/hh202907(v=vs.105).aspx समस्या के एक और विशिष्ट उदाहरण के बिना (आपके ग्रिड में कुछ सामग्री और अपेक्षित स्क्रॉलिंग व्यवहार) यह कहना मुश्किल है कि आप इसे कैसे काम करना चाहते हैं। – steveg89

उत्तर

7

आप अपने ग्रिड संरचना कर सकते हैं के रूप में:

<Grid x:Name="LayoutRoot" Background="Transparent"> 
     <Grid.RowDefinitions> 
    <RowDefinition Height="120" /> 
    <RowDefinition Height="*" /> 
    <RowDefinition Height="3*" /> 
    <RowDefinition Height="5*" /> 
</Grid.RowDefinitions> 
     <Grid> 
      ***content goes here**** 
     </Grid> 
     <ScrollViewer VerticalScrollBarVisibility="Visible" Grid.Row="1"> 
      *****Put scalable content here******* 
     </ScrollViewer> 
     <Grid Grid.Row="0"> 
      ***content goes here**** 
     </Grid> 
    </Grid> 
+0

स्क्रॉलबार को देखे बिना स्क्रॉलव्यूयर को स्क्रॉल करना संभव है? – ching

+1

@ching - 'वर्टिकलस्क्रोलबार दृश्यता' को 'छुपा' पर सेट करें। – keyboardP

+0

@keyboardP thanx, मैं इस चीज़ से अनजान था और खोज रहा था, लेकिन छिपी हुई –

0

संक्षेप में हालांकि आप एक ग्रिड स्क्रॉल नहीं करेंगे। आप स्क्रीन आकार या छोटे में ग्रिड सेट बनाने जा रहे हैं। फिर इसके अंदर एक सूची बॉक्स डालें। आप सूची बॉक्स को आसानी से स्क्रॉल कर सकते हैं क्योंकि यह वही करता है।

<Grid margin="0,0,0,0" width="480" hieght="800"> <!--These values probably need ajusted--> 
    <ListBox height="800"> <!--Make sure that it is ENTIRLEY on the screen --> 
    <TextBlock>Put a ton of text here and see that it scrolls</TextBlock> 
    <Button>You can put anything in the list boxes</Button> 
    <TextBox>Even Inputs</TextBox> 
    </ListBox> 
</Grid> 

एक और व्यवहार्य विकल्प है कि नीचे बताया गया है एक स्क्रॉल दर्शक जो बस के रूप में अच्छी तरह से काम करता है।

संबंधित मुद्दे