using XFEEDToolBox.ViewModels; namespace XFEEDToolBox.Views; public sealed partial class EngineeringPage : Page { public ToolboxViewModel ViewModel => App.ViewModel; public EngineeringPage() { InitializeComponent();NavigationCacheMode=Microsoft.UI.Xaml.Navigation.NavigationCacheMode.Required; SizeChanged+=(_,_)=>LayoutCatalogue();Loaded+=(_,_)=>LayoutCatalogue(); } private void LayoutCatalogue() { var compact=ActualWidth<1150;var narrow=ActualWidth<800; TypesColumn.Width=new GridLength(narrow?0:220); Grid.SetColumn(TypesPanel,narrow?1:0);Grid.SetColumnSpan(TypesPanel,narrow?2:1);Grid.SetRow(TypesPanel,0); Grid.SetColumn(EditorPanel,1);Grid.SetRow(EditorPanel,narrow?1:0);Grid.SetColumnSpan(EditorPanel,compact?2:1); Grid.SetColumn(BudgetPanel,compact?1:2);Grid.SetRow(BudgetPanel,compact?(narrow?2:1):0);Grid.SetColumnSpan(BudgetPanel,compact?2:1); } }