the property 'Content' is set more than once

前端 未结 2 1832
闹比i
闹比i 2021-01-17 18:16

I am having the following XAML code, which throws error following error pointing to line# 16.

the property \'Content\' is set more than once

2条回答
  •  抹茶落季
    2021-01-17 18:54

    The Content property is normally mapped to whatever is between the and tags, e.g.

    
        This stuff is set to the Content property
    
    

    But it can also be set like a normal property, e.g.

    
    

    In your example you are doing both by setting the Content property on line 15 like a normal property and again on line 16 between the tags. I'm guessing you will want to get rid of the Content="Viewer" on line 15 to get the output you are looking for.

提交回复
热议问题