Jack. Posted March 5, 2018 Share Posted March 5, 2018 (edited) 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 March 5, 2018 by Jack. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.