I am using Silverlight and eventually Silverlight for the Phone.
What I am trying to do is create a bordered container which contains children controls. The children controls should not be visible when outside the bounds of the grid control.
Is this possible? I know I can create a clip from path, but is this the only way.
I did use a scroll container, which seemed to work…. somewhat.
This is the xaml. What I am expecting is the second button not be visible when the app is runing.
<Grid x:Name="LayoutRoot" Background="White" >
<Grid HorizontalAlignment="Left" VerticalAlignment="Top" Height="197" Width="241" d:LayoutOverrides="HorizontalAlignment, VerticalAlignment">
<Button Content="Button" Margin="25,42,101,81"/>
<Button Content="Button" Height="76" Margin="25,0,63,-83" VerticalAlignment="Bottom"/>
</Grid>
</Grid>
I found a work around but would love to use another solution. I used a scrollviewer and hide the scrollbars. This seems like a heavy solution, but will work for the time being. I definately will need to find something lighter weight when I move this to Windows Phone 7.