User Tools

Site Tools


notes:uwp:contentcontrol

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
notes:uwp:contentcontrol [2017/02/15]
admin [ScrollViewer]
notes:uwp:contentcontrol [2017/02/15]
admin [ScrollViewer]
Line 203: Line 203:
 Example: A //​StackPanel//​ wrapped in a //​ScrollViewer//:​ Example: A //​StackPanel//​ wrapped in a //​ScrollViewer//:​
 <code xml> <code xml>
-<​ScrollViewer>​ +<​ScrollViewer ​HorizontalAlignment="​Center"​
-    <​StackPanel ​Name="StackPanel1" />+    <​StackPanel
 +        <​Rectangle Fill="Blue" Width="​180"​ Height="​180"​ Margin="​8" /
 +        <​Rectangle Fill="​Green"​ Width="​180"​ Height="​180"​ Margin="​8"​ /> 
 +        <​Rectangle Fill="​Yellow"​ Width="​180"​ Height="​180"​ Margin="​8"​ /> 
 +        <​Rectangle Fill="​Red"​ Width="​180"​ Height="​180"​ Margin="​8"​ /> 
 +        <​Rectangle Fill="​Magenta"​ Width="​180"​ Height="​180"​ Margin="​8"​ /> 
 +    </​StackPanel>
 </​ScrollViewer>​ </​ScrollViewer>​
 +</​code>​
 +
 +The following //​ScrollViewer//​ won't have the ability to scroll because the parent //​StackPanel//​ reserves infinite space for its children:
 +<code xml>
 +<​StackPanel>​
 +    <​ScrollViewer>​
 +        ...
 +    </​ScrollViewer>​
 +</​StackPanel>​
 +</​code>​
 +
 +Some item controls such as //​ListView//​ have an internal //​ScrollViewer//​. Use attached properties to modify the internal //​ScrollViewer//:​
 +<code xml>
 +<​ListView ScrollViewer.VerticalScrollBarVisibility="​Auto">​
 +...
 +</​ListView>​
 </​code>​ </​code>​
  
notes/uwp/contentcontrol.txt · Last modified: 2017/02/15 by admin