<Window xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:vm="using:ModerationClient.ViewModels" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:views="clr-namespace:ModerationClient.Views" mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" x:Class="ModerationClient.Views.MainWindow.MainWindow" x:DataType="vm:MainWindowViewModel" Icon="/Assets/avalonia-logo.ico" Title="ModerationClient" Width="1280" Height="720"> <!-- <Design.DataContext> --> <!-- This only sets the DataContext for the previewer in an IDE, to set the actual DataContext for runtime, set the DataContext property in code (look at App.axaml.cs) --> <!-- <vm:MainWindowViewModel /> --> <!-- </Design.DataContext> --> <Grid RowDefinitions="Auto, *"> <Viewbox Grid.Row="1"> <Grid RowDefinitions="Auto, *" Background="#202020" Width="{CompiledBinding ChildTargetWidth}" Height="{CompiledBinding ChildTargetHeight}"> <Grid Grid.Row="0" ColumnDefinitions="Auto, *, Auto" x:Name="TopPanel" Background="#000000"> <StackPanel Orientation="Horizontal" Grid.Column="0"> <Label>[F1 -]</Label> <Label Content="{CompiledBinding Scale}" /> <Label>x</Label> <Label>[+ F2]</Label> <Rectangle Width="32" /> <Label>VRes =</Label> <Label Content="{CompiledBinding ChildTargetWidth}" /> <Label>x</Label> <Label Content="{CompiledBinding ChildTargetHeight}" /> </StackPanel> <Label Grid.Column="2">Press '?' for keybinds</Label> </Grid> <ContentControl Grid.Row="1" Content="{CompiledBinding CurrentViewModel}" /> </Grid> </Viewbox> </Grid> </Window>