2009-08-25 5 views
9

回、私は#16プロパティ「コンテンツは、」より多くの

プロパティ「コンテンツ」が

回 以上に設定されている行を指して、エラー、次のエラーがスローされます、次のXAMLコードを、持っています設定されています

任意の考え?

1  <Grid x:Name="LayoutRoot" Width="970" Height="460" Background="White"> 
2   <Grid.RowDefinitions> 
3    <RowDefinition Height="*"/> 
4    <RowDefinition Height="80"/> 
5   </Grid.RowDefinitions> 
6   <Border Margin="3" BorderBrush="#FF464646" BorderThickness="1" CornerRadius="5" Grid.Row="0"> 
7    <Border.Background> 
8     <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> 
9      <GradientStop Color="#FF5B5A5A" Offset="0.02"/> 
10      <GradientStop Color="#FF3B3B3B" Offset="0.213"/> 
11      <GradientStop Color="#FF535151" Offset="0.807"/> 
12     </LinearGradientBrush> 
13    </Border.Background> 
14 
15    <Liquid:Viewer Content="Viewer"> 
16     <Image Source="Images/planet.jpg" Opacity="0.8" Stretch="Fill" /> 
17    </Liquid:Viewer> 
18 
19   </Border> 
20   <Border Margin="3" BorderThickness="1" CornerRadius="5" Grid.Row="1"> 
21    <Border.Background> 

答えて

8

コンテンツプロパティは、通常、例えば、<X></X>タグの間にあるものは何でもにマッピングされます

<Control> 
    This stuff is set to the Content property 
</Control> 

しかし、それはまた、通常のプロパティのように設定することもできます。

<Control Content="This stuff is set to the Content property" /> 

この例では、15行目のContentプロパティを通常のプロパティのように設定し、16行目のタグ間に設定します。私は、あなたが探しているの出力を得るためにライン15上のコンテンツ=「ビューア」を取り除くことになるでしょう推測しています。

2

15行目では、「属性」に「コンテンツ」を設定し、16行目には「イメージを2つの内容」としています。

関連する問題