Загрузка данных


<Window xmlns="https://github.com/avaloniaui"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:vm="using:GuessGameApp.ViewModels"
        x:Class="GuessGameApp.Views.MainWindow"
        x:DataType="vm:MainViewModel"
        Title="Угадай число" Width="400" Height="300">

    <StackPanel Margin="20" Spacing="10">
        <!-- Выбор сложности -->
        <TextBlock Text="Выберите сложность:"/>
        <ComboBox ItemsSource="{Binding DifficultyLevels}" 
                  SelectedItem="{Binding SelectedDifficulty}" 
                  HorizontalAlignment="Stretch"/>

        <!-- Скрытое секретное число -->
        <TextBlock Text="Загаданный код:"/>
        <PasswordBox PasswordChar="*" 
                     Text="{Binding SecretCode}" 
                     IsReadOnly="True"/>

        <!-- Ввод пользователя -->
        <TextBlock Text="Ваше число:"/>
        <TextBox Text="{Binding UserInput, Mode=TwoWay}" 
                 Watermark="Введите предполагаемое число"/>

        <Button Content="Проверить" 
                Command="{Binding CheckGuessCommand}" 
                HorizontalAlignment="Center"/>

        <!-- Статус и результат -->
        <TextBlock Text="{Binding StatusMessage}" 
                   HorizontalAlignment="Center" 
                   FontWeight="Bold"/>
    </StackPanel>
</Window>