WPF と XAML の新機能です。次のコードで、WPF コントロールを配置したい場所に配置できない理由がわかりません。私の問題は、<canvas></canvas>
タグがどこにあるかです。この場所に置くと、「プロパティ「コンテンツ」が複数回設定されています」というメッセージが表示されます
Content プロパティが設定されている場所を誰かが簡単に説明できれば、それが最も役に立ちます。
次の記事をチェックアウトしましたが、役に立ちませんでした: プロパティ 'Content' が複数回設定され ています プロパティ コンテンツが複数回設定されています プロパティ コンテンツが複数回 設定されてい ます プロパティ 'Content' が複数回設定されています ボタン 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>