2
我模板列表框。我只想在选择该项目时显示路径。WindowsPhone:RelativeSource Mode = FindAncestor,AncestorType:CannotResolve SymbolAncestorType
的DataTemplate中:
<DataTemplate x:Key="itplPlayerOfTheDay">
<Grid>
...
<Grid Width="50" Height="50" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,5,5,0">
<Path Visibility="{Binding RelativeSource={RelativeSource Mode=FindAncestor , AncestorType={ListBoxItem}}, Path=IsSelected, Converter={StaticResource BooleanToVisibilityConverter}}" Data="M32.5569,7.54591 C32.3883,13.1553 31.3485,16.9274z" Stretch="Uniform" Stroke="Black" >
</Path>
</Grid>
...
</Grid>
</DataTemplate>
Apparantly有什么不对我的XAML。在设计师说明中:无法解析符号祖先类型。
请不要在标题中放入代码... – 2013-03-05 20:05:46