about summary refs log tree commit diff
path: root/ModerationClient/Views/ClientView.axaml.cs
blob: 1ca5a89ca1e850672e59b83cf01928c44b0c933f (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
using System;
using System.Linq;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;

namespace ModerationClient.Views;

public partial class ClientView : UserControl {
    
    public ClientView() {
        InitializeComponent();
        
        // PropertyChanged += (_, e) => {
        //     switch (e.Property.Name) {
        //         case nameof(Width): {
        //             //make sure all columns fit
        //             var grid = this.LogicalChildren.OfType<Grid>().FirstOrDefault();
        //             if(grid is null) {
        //                 Console.WriteLine("Failed to find Grid in ClientView");
        //                 return;
        //             }
        //             Console.WriteLine($"ClientView width changed to {Width}");
        //             var columns = grid.ColumnDefinitions;
        //             break;
        //         }
        //     }
        // };
    }
    
    private void InitializeComponent() {
        AvaloniaXamlLoader.Load(this);
    }
}