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