开发者

How to put image on top of fullscreen

I am creating silverlight video player. I have organized my player as grid. First row is video, second and third are control panels with buttons.

When I switch to fullscree开发者_开发百科n mode I want to set specified image on the top. So i load image, resize and can't make this image to cover all elements(video,panels). I try to make this image only visible, and cant do that.

I think there is possible to create an "element" and set it somehow to cover. I would like do this like splash because i guess collapsing my rows isn't good idea.

Thanks in advance.


You should be able to do this by first making sure your image element is the last child in the Grid and by adding Grid.RowSpan value to it containing the number of rows in the grid:-

<Grid>
  <Grid.RowDefinitions>
    <RowDefinition Height="*" />
    <RowDefinition Height="Auto" />
    <RowDefinition Height="Auto" />
  </Grid.RowDefinitions>
  <MediaElement ... />
  <StackPanel Orientation="Horizontal" Grid.Row="1">...</StackPanel>
  <StackPanel Orientation="Horizontal" Grid.Row="2">...</StackPanel>
  <Image Source="SomeImageUrl" Grid.RowSpan="3" />
</Grid>

An alternative to placing the Image at the end of the Grid's child list is to give it a higher ZIndex using rather unintuitively Canvas.ZIndex property.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜