Click here to Skip to main content
15,886,026 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I think my problem fully expressed by my question. I could create group with the help of http://www.geekchamp.com/articles/the-new-longlistselector-control-in-windows-phone-8-sdk-in-depth but how can i pass "GroupIconPath" to use in header template.

C#
public class CategoryCollection
    {
      public string GroupName { get; set; }
      public string GroupIconPath { get; set; }
      public List<Category> CategoryRingtone { get; set; }
      public CategoryCollection()
      {
          CategoryRingtone = new List<Category>();
      }
    }

public  class Category
    {
        public string id { get; set; }
        public string name { get; set; }
        public string islock { get; set; }
    }


<phone:LongListSelector.GroupHeaderTemplate>
<DataTemplate>
<StackPanel Height="80" Margin="0" Orientation="Horizontal" HorizontalAlignment="Stretch">
<TextBlock Text="{Binding GroupName }" FontSize="32" Foreground="Green" />
<Image Source="{Binding GroupIconPath}"/>
</StackPanel>
</DataTemplate>
</phone:LongListSelector.GroupHeaderTemplate>

<phone:LongListSelector.ItemTemplate>
<DataTemplate>
<StackPanel Height="70" Margin="0,0,0,1" VerticalAlignment="Center">
<StackPanel.Background>
<ImageBrush ImageSource="Assets/ImageButton/list-bar.png"/>
</StackPanel.Background>
<TextBlock Text="{Binding name}" VerticalAlignment="Center" FontSize="30" Height="60" Style="{StaticResource PhoneTextNormalStyle}"/>

</StackPanel>

</DataTemplate>
</phone:LongListSelector.ItemTemplate>
</phone:LongListSelector>
Posted
Comments
suzand 17-Aug-14 13:19pm    
Please show me the way. I've been waiting for your valuable suggestion.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900