about summary refs log tree commit diff
path: root/ModerationClient/Views/MainWindow.axaml
blob: 1c2b396581feed87fb1bf2b3391b0f720e4d2b13 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<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"
        x:DataType="vm:MainWindowViewModel"
        Icon="/Assets/avalonia-logo.ico"
        Title="ModerationClient"
        Width="640" Height="480">

    <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>

    <StackPanel>
        <Grid ColumnDefinitions="Auto, *, Auto">
            <StackPanel Orientation="Horizontal" Grid.Column="0">
                <Label Content="{CompiledBinding Scale}" />
                <Label>x</Label>
                <Rectangle Width="32" />
                <Label Content="{CompiledBinding ChildTargetWidth}" />
                <Label>x</Label>
                <Label Content="{CompiledBinding ChildTargetHeight}" />
            </StackPanel>
            <Label Grid.Column="2">Press '?' for keybinds</Label>
        </Grid>
        <Viewbox>
            <ContentControl
                Width="{CompiledBinding ChildTargetWidth}"
                Height="{CompiledBinding ChildTargetHeight}"
                Background="#222222"
                Content="{CompiledBinding CurrentViewModel}" />
        </Viewbox>

    </StackPanel>

</Window>