2016-12-01 113 views
0

我有一個網格,其中包含幾行。在每一行中都有一些信息。當點擊行= 1上的按鈕時,它會展開,並且我應用中的下半部分會摺疊。我試圖添加一個scrollviewer,但仍然沒有顯示。 這裏是我的代碼的一部分,我添加滾動條:UWP垂直滾動條不顯示

<Grid Background="LightSalmon" ScrollViewer.VerticalScrollBarVisibility="Visible" 
     ScrollViewer.IsVerticalRailEnabled="True" 
     ScrollViewer.VerticalScrollMode="Enabled"> 



    <Grid.RowDefinitions> 
     <RowDefinition Height="auto"/> 
     <RowDefinition Height="auto"/> 
     <RowDefinition Height="auto"/> 
     <RowDefinition Height="auto"/> 
     <RowDefinition Height="auto"/> 
     <RowDefinition Height="auto"/> 
    </Grid.RowDefinitions> 



</Grid> 

回答

2

Grid不滾動自身,不管你用什麼ScrollViewer附加屬性。刪除所有ScrollViewer附加屬性,並將Grid置入ScrollViewer