0

I am trying to use Blend 2012 to edit the Jump List Area that you can setup with the now built in longlistselector.

I never had a problem doing it with the Windows Phone Toolkit but now I have huge trouble.

enter image description here

I try to make a copy of the template and then I see this

enter image description here

I now have no clue on what to do next. I want to add in a textblock and style it. This will of course be the jump menu style.

chobo2
  • 83,322
  • 195
  • 530
  • 832

1 Answers1

0

It seems Blend is creating a Template rather than a Style.

For what it's worth here is an example JumpListStyle which can be used ...

<phone:LongListSelector.JumpListStyle>
    <Style TargetType="phone:LongListSelector">
        <Setter Property="GridCellSize"  Value="113,113"/>
        <Setter Property="LayoutMode" Value="Grid" />
        <Setter Property="ItemTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Border Background="{Binding Converter={StaticResource BackgroundConverter}}" 
                        Width="113" 
                        Height="113" 
                        Margin="6" >
                        <TextBlock 
                            Text="{Binding Key}" 
                            FontSize="42" 
                            Padding="6" 
                            Foreground="{Binding Converter={StaticResource ForegroundConverter}}" 
                            VerticalAlignment="Center"/>
                    </Border>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</phone:LongListSelector.JumpListStyle>

You also need references to the ForegroundConverter and BackgroundConverter. I put this in App.xaml so that the style is consistent throughout the app.

<phone:JumpListItemBackgroundConverter x:Key="BackgroundConverter" 
            Disabled="{StaticResource MyThemeFGColor}" Enabled="{StaticResource MyThemeAccentColor}" />
<phone:JumpListItemForegroundConverter x:Key="ForegroundConverter"
            Disabled="{StaticResource MyThemeFGColor}" Enabled="{StaticResource MyThemeBGColor}" />
Brendan
  • 18,771
  • 17
  • 83
  • 114
  • Yea, I found some tutorials and code for the jump style, I thought it was something to do with the template(all the other ones get generated as data templates which seem to work fine). I just like to use blend so I was hoping that there was some way around it. If I try to put like starter code(like your code), I can't edit it in design view(edit current will be disabled still) – chobo2 Feb 19 '14 at 00:51
  • I can't give a definitive answer but I suspect there isn't a way around this. Blend hasn't had much love from MS since they switched focus to improving the Visual Studio XAML editor. Over time I have moved away from using Blend for anything much more than creating sample-data and animations. – Brendan Feb 19 '14 at 01:02
  • hmm that sucks I hope if they do focus on more on VS they basically merge blend into it, I don't like xaml that much and love the power of the blend and how it can help me create have decent interfaces and stuff like statebehaviors are so great. – chobo2 Feb 20 '14 at 06:55