© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•15mo ago•
179 replies
Merineth

Troubleshooting xaml - initialize window

<Window x:Class="Othello.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Othello Game" Height="75" Width="500">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <StackPanel Orientation="Horizontal" Margin="10" HorizontalAlignment="Center">
            <Button Content="Human vs Human" Width="150" Margin="5" Click="HumanVsHuman_Click"/>
            <Button Content="Human vs Computer" Width="150" Margin="5" Click="HumanVsComputer_Click"/>
            <Button Content="Computer vs Computer" Width="150" Margin="5" Click="ComputerVsComputer_Click"/>
        </StackPanel>

        <Grid Name="GameBoard" Grid.Row="1" Margin="10"
              HorizontalAlignment="Center" VerticalAlignment="Center">
        </Grid>
    </Grid>
</Window>
<Window x:Class="Othello.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Othello Game" Height="75" Width="500">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <StackPanel Orientation="Horizontal" Margin="10" HorizontalAlignment="Center">
            <Button Content="Human vs Human" Width="150" Margin="5" Click="HumanVsHuman_Click"/>
            <Button Content="Human vs Computer" Width="150" Margin="5" Click="HumanVsComputer_Click"/>
            <Button Content="Computer vs Computer" Width="150" Margin="5" Click="ComputerVsComputer_Click"/>
        </StackPanel>

        <Grid Name="GameBoard" Grid.Row="1" Margin="10"
              HorizontalAlignment="Center" VerticalAlignment="Center">
        </Grid>
    </Grid>
</Window>
image.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements
Next page

Similar Threads

❔ Removing items from a XAML window
C#CC# / help
4y ago
✅ xaml
C#CC# / help
9mo ago
❔ XAML
C#CC# / help
3y ago