This is a migrated thread and some comments may be shown as answers.

is it possible to have button beside the stickyheader

2 Answers 25 Views
JumpList
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
christian
Top achievements
Rank 1
christian asked on 20 May 2012, 07:25 PM
I know its possible to have it per se, but I have tried to cancel out the "open groupheader" event but fail to find it,
basicaly i have a button beside the rectangle and when the button is clicked i dont wnat the group selector to fire
<Border HorizontalAlignment="Stretch"
                                      Background="White"
                                      Margin="0,-2,0,0"
                                      BorderThickness="0"
                                      Padding="12, 2, 0, 4">
                                  <StackPanel Orientation="Horizontal">
                                      <Border Width="64"
                                              Height="64"
                                              Margin="0,0,0,0"
                                              HorizontalAlignment="Left"
                                              Background="{StaticResource rebtelblue}"
                                              BorderThickness="0">
                                          <TextBlock Margin="8,4,4,2"
                                                     HorizontalAlignment="Left"
                                                     VerticalAlignment="Bottom"
                                                     FontFamily="{StaticResource PhoneFontFamilyLight}"
                                                     FontSize="{StaticResource PhoneFontSizeExtraLarge}"
                                                     Foreground="{StaticResource PhoneBackgroundBrush}"
                                                     Text="{Binding Key}" />
                                      </Border>
                                      <HyperlinkButton  Name="InviteFriend" cal:Message.Attach="[Event Tap] = [Action InviteFriend($source , $eventArgs)]"
                                       Style="{StaticResource phoneNumberButton}">
                                          <HyperlinkButton.Content>
                                              <Grid Margin="18,0" HorizontalAlignment="Stretch">
                                                  <Grid.ColumnDefinitions>
                                                      <ColumnDefinition Width="*" />
                                                      <ColumnDefinition Width="*" />
                                                  </Grid.ColumnDefinitions>
                                                  <StackPanel HorizontalAlignment="Stretch">
                                                      <TextBlock Grid.Row="0"
                                                 HorizontalAlignment="Stretch"
                                                 FontFamily="{StaticResource PhoneFontFamilyLight}"
                                                 FontSize="{StaticResource PhoneFontSizeExtraLarge}"
                                                 Foreground="{StaticResource rebtelblue}"
                                                 LineHeight="30"
                                                 LineStackingStrategy="BlockLineHeight"
                                                 Text="{Binding Path=LocalizedResources.InviteFriendContactPage,
                                                                Source={StaticResource LocalizedStrings}}" />
                                                      <TextBlock Grid.Row="1"
                                                 FontFamily="{StaticResource PhoneFontFamilyLight}"
                                                 FontSize="{StaticResource PhoneFontSizeMedium}"
                                                 Foreground="{StaticResource rebtelgrey}"
                                                 LineHeight="22"
                                                 LineStackingStrategy="BlockLineHeight"
                                                 Text="{Binding Path=LocalizedResources.InviteFriendSubHeaderContactPage,
                                                                Source={StaticResource LocalizedStrings}}" />
                                                  </StackPanel>
                                              </Grid>
                                          </HyperlinkButton.Content>
                                      </HyperlinkButton>
 
                                  </StackPanel>
                              </Border>
                          </DataTemplate>

2 Answers, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 21 May 2012, 12:55 PM
Hello Christian,

Thanks for writing.

Currently, there is an issue which prevents you from stopping the GroupPicker from opening. We will address this issue but for the time being you can use the following workaround:

1. Handle the GroupHeaderItemTap event exposed by JumpList
2. Check whether the Item property exposed by the event arguments is null
3. In case the Item is null that means that you have tapped on the sticky header. In this case simply set the ShowGroupPicker property of the event args to false.

I hope this helps.

Kind regards,
Deyan
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
christian
Top achievements
Rank 1
answered on 21 May 2012, 06:33 PM
Thanks for the tip, since I actually wanted the sticky header to fire the picker, but not the button i ended up with below, it aint pretty but its working for me;) 

if (e.Item == null)
            {
                if (e.OriginalSource is TextBlock)
                {
                    TextBlock obj = (TextBlock) e.OriginalSource;
                    if (obj.Name.Contains("invite")) // a bit of hack telerik is working on it
                    {
                        e.ShowGroupPicker = false;
                    }
                }
            }

Tags
JumpList
Asked by
christian
Top achievements
Rank 1
Answers by
Deyan
Telerik team
christian
Top achievements
Rank 1
Share this question
or