前提・実現したいこと
使用ディスプレイと同じ縦横比になるウィンドウサイズ変更しか受け付けない。
ex) 1920×1080の場合、192×108、960×540などにしかウィンドウサイズを変えられない
発生している問題・エラーメッセージ
エラーメッセージ
該当のソースコード
XAML
1<Page 2 x:Class="Test_UWP.MainPage" 3 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 4 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 5 xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 6 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 7 mc:Ignorable="d" 8 Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> 9 10 <Grid> 11 <Grid.RowDefinitions> 12 <RowDefinition Height="1*"/> 13 <RowDefinition Height="1*"/> 14 <RowDefinition Height="1*"/> 15 </Grid.RowDefinitions> 16 <Grid.ColumnDefinitions> 17 <ColumnDefinition Width="1710*"/> 18 <ColumnDefinition Width="210*"/> 19 </Grid.ColumnDefinitions> 20 21 <Viewbox 22 Grid.RowSpan="3"> 23 <CaptureElement 24 x:Name="sample"/> 25 </Viewbox> 26 27 </Grid> 28</Page>
試したこと
ViewboxのMaxWidthやMinWidthなどのパラメータ設定
補足情報(FW/ツールのバージョンなど)
使用環境:VisualStudio2019
使用言語:XAML,C#

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。