XAML - The property 'Content' is set more than once

后端 未结 3 2134
南方客
南方客 2021-02-06 21:19

Very new to WPF and XAML. I can\'t get my head around why I can\'t place a WPF control where I would like in the following code. My issue is where the

3条回答
  •  北海茫月
    2021-02-06 22:05

    By adding your text description to your TabItem you added Content then when you added the Canvas you added an additional item of Content which is not allowed for the TabItem. You need to use a Control that can hold a collection of Children such as Canvas, Grid, StackPanel etc. Try something like this.

    
        
            
                
                    This is where the outline of the entire document will be placed.
                
            
        
        
            This is where the preview will be drawn to screen.
        
        
            This is where the resources { graphic files, fonts, data files }
        
        
            This is where the user can save re-usable bits of code. Useful when adding intel barcodes or Address blocks etc...
        
    
    

提交回复
热议问题