is it possible to have button beside the stickyheader

3 posts, 0 answers
  1. christian
    christian avatar
    10 posts
    Member since:
    Sep 2008

    Posted 20 May 2012 Link to this post

    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. Deyan
    Admin
    Deyan avatar
    2037 posts

    Posted 21 May 2012 Link to this post

    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 >>

  3. DevCraft banner
  4. christian
    christian avatar
    10 posts
    Member since:
    Sep 2008

    Posted 21 May 2012 Link to this post

    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;
                        }
                    }
                }

Back to Top