Очень новый для WPF и XAML. Я не могу понять, почему я не могу разместить элемент управления WPF, где бы мне хотелось, в следующем коде. Моя проблема - это теги <canvas></canvas>
. Все, что я положил в это место, дает мне "Свойство" Содержимое "установлено более одного раза
Если кто-нибудь может объяснить простым языком, где установлено свойство Content, которое было бы наиболее полезно.
Я просмотрел следующие статьи безрезультатно: свойство 'Content' установлено более одного раза содержимое ресурса установлено более одного раза Содержимое ресурса установлено более одного раза Свойство 'Content' установлено более одного раза Button WPF ControlTemplate вызывает ошибку " Свойство 'content' установлено более одного раза
<Window x:Class="PDFIndexer.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Grid x:Name="ParentGrid">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="1*" />
<RowDefinition Height="25" />
</Grid.RowDefinitions>
<Menu Grid.Row="0" >
<MenuItem Header="File" >
<MenuItem Header="Open Project" Click="MenuItem_Click_1"></MenuItem>
<MenuItem Header="Save Project"></MenuItem>
<MenuItem Header="Close Project"></MenuItem>
<Separator></Separator>
<MenuItem Header="Exit"></MenuItem>
</MenuItem>
<MenuItem Header="Edit"></MenuItem>
</Menu>
<TabControl Grid.Row="1">
<TabItem Header="Document Flow" >
This is where the outline of the entire document will be placed.
<Canvas></Canvas>
</TabItem>
<TabItem Header="Preview">
This is where the preview will be drawn to screen.
</TabItem>
<TabItem Header="Resources">
This is where the resources { graphic files, fonts, data files }
</TabItem>
<TabItem Header="Code Library">
This is where the user can save re-usable bits of code. Useful when adding intel barcodes or Address blocks etc...
</TabItem>
</TabControl>
<StatusBar Grid.Row="2">
Items
</StatusBar>
</Grid>