私は他のいくつかの答えを読みましたが、なぜ私のものがまだこのエラーを投げているのかを完全に理解することはできません:
<Grid Grid.Column="2" Width="100" Height="30" HorizontalAlignment="Right">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Button Command="{Binding CloseCommand}" Grid.Column="3" Width="24" Height="24" HorizontalAlignment="Right">
<Button.Template>
<ControlTemplate TargetType="{x:Type Button}">
<StackPanel>
<Image Source="{Binding LocalisedResource[delete_48.png].Image}" Stretch="Fill" VerticalAlignment="Top" />
</StackPanel>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Cursor" Value="Hand" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Button.Template>
</Button>
<Button Command="{Binding ShowConfigCommand}" Grid.Column="0" Width="24" Height="24" HorizontalAlignment="Right">
<Button.Template>
<ControlTemplate TargetType="{x:Type Button}">
<StackPanel>
<Image Source="{Binding LocalisedResource[software_24.png].Image}" Stretch="Fill" VerticalAlignment="Top" />
</StackPanel>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Cursor" Value="Hand" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Button.Template>
</Button>
</Grid>
人々はこのエラーを受け取っていないので、残りのコードを投稿します:
<Grid>
<Grid.Background>
<SolidColorBrush Color="Black" />
</Grid.Background>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="20" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="20" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="50" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="20" />
</Grid.RowDefinitions>
<TextBlock Text="{Binding LocalisedText[app.title]}" Grid.Column="1" Grid.Row="0" Style="{DynamicResource MainWindowTitleTextStyle}" />
<Grid Grid.Column="2" Width="100" Height="30" HorizontalAlignment="Right">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Button Command="{Binding }" Grid.Column="3" Width="24" Height="24" HorizontalAlignment="Right">
<Button.Template>
<ControlTemplate TargetType="{x:Type Button}">
<StackPanel>
<Image Source="{Binding LocalisedResource[delete_48.png].Image}" Stretch="Fill" VerticalAlignment="Top" />
</StackPanel>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Cursor" Value="Hand" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Button.Template>
</Button>
<Button Command="{Binding }" Grid.Column="0" Width="24" Height="24" HorizontalAlignment="Right">
<Button.Template>
<ControlTemplate TargetType="{x:Type Button}">
<StackPanel>
<Image Source="{Binding LocalisedResource[software_24.png].Image}" Stretch="Fill" VerticalAlignment="Top" />
</StackPanel>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Cursor" Value="Hand" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Button.Template>
</Button>
</Grid>
<!-- Popup Box -->
<ContentPresenter Content="{Binding }" Grid.Column="1" Grid.ColumnSpan="4" Grid.Row="2" Grid.RowSpan="4" VerticalAlignment="Center" HorizontalAlignment="Center" />
<!-- Connected View Goes Here -->
<ContentPresenter Content="{Binding }" Grid.Column="1" Grid.Row="1" />
<!-- Demo View Goes Here -->
<ContentPresenter Content="{Binding }" Grid.Column="1" Grid.Row="2" />
<!-- Configuration -->
<ContentPresenter Content="{Binding }" Grid.ColumnSpan="2" Grid.RowSpan="2" Grid.Row="1" Grid.Column="1" Margin="50" />
</Grid>