Jump to content
LaunchBox Community Forums

[XAML] Videos and Screenshots problem


Jack.

Recommended Posts

Hi, basically i have a grid with a 4:3 ratio, but videos 320x240 do not scale correctly. In this example i'm using 640x480 desktop resolution, at this resolution the grid is exactly 320x240. But as you can see the video in this screenshot is 300x240 and because of that i get black bars. It does the same thing with other desktop resolutions such as 800x600. With videos that are 640x480 i don't have this problem and they scale correctly like this.

Here is the code:

<Border x:Name="GameVideoBorder" Grid.Column="3" Grid.ColumnSpan="4" Grid.Row="4" Grid.RowSpan="2" CornerRadius="10.0">
					<Grid>
						<Border x:Name="GameVideoMask" CornerRadius="{Binding ElementName=GameVideoBorder, Path=CornerRadius}" Background="#000000"/>
							<Grid>
								<Grid.OpacityMask>
									<VisualBrush Visual="{Binding ElementName=GameVideoMask}" />
								</Grid.OpacityMask>
									<transitions:TransitionPresenter  TransitionSelector="{Binding ImageVideoTransitionSelector}" Content="{Binding ImageVideoView}" IsContentVideo="true" />
                                                        </Grid>
					</Grid>
                <Border.Effect>
                    <DropShadowEffect RenderingBias="Performance" Color="#000000" Opacity="0.8" ShadowDepth="0.0" BlurRadius="30.0" />
                </Border.Effect>
            </Border>

 

There is a way to fix this? I don't want to stretch the videos\screens but i want them to maintain aspect ratio. Thanks and sorry for my english.

Edited by Jack.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...