diff --git a/samples/ComputeSharp.SwapChain.Uwp/ComputeSharp.SwapChain.Uwp.csproj b/samples/ComputeSharp.SwapChain.Uwp/ComputeSharp.SwapChain.Uwp.csproj index d903484e..93b9c8fd 100644 --- a/samples/ComputeSharp.SwapChain.Uwp/ComputeSharp.SwapChain.Uwp.csproj +++ b/samples/ComputeSharp.SwapChain.Uwp/ComputeSharp.SwapChain.Uwp.csproj @@ -176,7 +176,7 @@ 7.1.1 - + 7.1.1 diff --git a/samples/ComputeSharp.SwapChain.Uwp/Views/MainView.xaml b/samples/ComputeSharp.SwapChain.Uwp/Views/MainView.xaml index a8e47a9d..e76991f4 100644 --- a/samples/ComputeSharp.SwapChain.Uwp/Views/MainView.xaml +++ b/samples/ComputeSharp.SwapChain.Uwp/Views/MainView.xaml @@ -14,7 +14,8 @@ xmlns:models="using:ComputeSharp.SwapChain.Uwp.Models" mc:Ignorable="d" d:DesignHeight="300" - d:DesignWidth="400"> + d:DesignWidth="400" + SizeChanged="UserControl_SizeChanged"> @@ -46,6 +47,7 @@ - + + + + - - - - - - - - + + + + + diff --git a/samples/ComputeSharp.SwapChain.Uwp/Views/MainView.xaml.cs b/samples/ComputeSharp.SwapChain.Uwp/Views/MainView.xaml.cs index 0caf4436..2852c30c 100644 --- a/samples/ComputeSharp.SwapChain.Uwp/Views/MainView.xaml.cs +++ b/samples/ComputeSharp.SwapChain.Uwp/Views/MainView.xaml.cs @@ -1,4 +1,5 @@ -using Windows.UI.Xaml; +using System; +using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Input; @@ -23,4 +24,10 @@ public sealed partial class MainView : UserControl { Root.Children.Remove(ShaderSelectionPanel); } + + // Updates the size of the shaders list panel + private void UserControl_SizeChanged(object sender, SizeChangedEventArgs e) + { + ShadersListContainerPanel.Height = Math.Round(e.NewSize.Height * 0.35); + } }