wpf - XAML - The property 'Content' is set more than once -
very new wpf , xaml. can't head around why can't place wpf command in next code. issue <canvas></canvas>
tags are. set in place gives me 'the property 'content' set more once'
if explain in simple terms content property set helpful.
i have checked out next articles no avail: the property 'content' set more once the property content set more once property content set more once the property 'content' set more 1 time button wpf controltemplate causeing error "the property 'content' set more once"
<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" > outline of entire document placed. <canvas></canvas> </tabitem> <tabitem header="preview"> preview drawn screen. </tabitem> <tabitem header="resources"> resources { graphic files, fonts, info files } </tabitem> <tabitem header="code library"> 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>
by adding text description tabitem
added content when added canvas added additional item of content not allowed tabitem
. need utilize command can hold collection of children such canvas, grid, stackpanel etc. seek this.
<tabcontrol grid.row="1"> <tabitem header="document flow"> <canvas> <textblock> outline of entire document placed. </textblock> </canvas> </tabitem> <tabitem header="preview"> preview drawn screen. </tabitem> <tabitem header="resources"> resources { graphic files, fonts, info files } </tabitem> <tabitem header="code library"> user can save re-usable bits of code. useful when adding intel barcodes or address blocks etc... </tabitem> </tabcontrol>
wpf
No comments:
Post a Comment