我有班级 MyClass:
public class MyClass
{
public string MyColor { get; set; }
public class TeamOfCreators : ObservableCollection<Creator>
{
public string CategoryName { get; set; }
}
public ObservableCollection<TeamOfCreators> TeamsOfCreators { get; set; }
}
和 Xaml:
<toolkit:LongListSelector ItemsSource="{Binding MyClass.TeamsOfCreators}" Height="530">
<toolkit:LongListSelector.GroupItemTemplate>
<DataTemplate>
<Border Background="{Binding MyColor, Converter={StaticResource NativeColorConverter}}" />
<TextBlock Text="{Binding CategoryName}" Style="{StaticResource PhoneTextGroupHeaderStyle}"/>
</Border>
</DataTemplate>
</toolkit:LongListSelector.GroupItemTemplate>
</toolkit:LongListSelector>
我应该如何绑定背景,才能到达 MyColor?如何在 xaml 中查看背景中的绑定?