PaginationControl and SlideView OverlayContent

7 posts, 0 answers
  1. Mike
    Mike avatar
    4 posts
    Member since:
    Apr 2014

    Posted 09 May 2014 Link to this post

    Hi.

    Im am using the Pagination Control with the SlideView and Described in the Documentation. This is working great so far. Now I also activated the OverlayContent in my SlideView. Also this is working fine as expected. But not I have an issue. Because my overlay has a transparency the paging indicator (dots ins sample app) is still visible in background. Is there a possibility to toggle paging indicator visibility depending on showing the overlay?

    Best regards Mike.
  2. Todor
    Admin
    Todor avatar
    778 posts

    Posted 14 May 2014 Link to this post

    Hello Mike,

    Thank you for writing.

    There is no way to determine whether the overlay is currently displayed or not, but since you know when this happens (on Tap), you can change the pagination control's visibility when RadSlideView's Tap event occurs.

    Let us know if you need further assistance.

    Regards,
    Todor
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. DevCraft banner
  4. Mike
    Mike avatar
    4 posts
    Member since:
    Apr 2014

    Posted 16 May 2014 in reply to Todor Link to this post

    Hi.

    Thanx for your reply.

    Now I check the radslideview's tap event as you suggested

    GalleryRadSlideView.Tap += GalleryView_Tap;

    Inside I am just toggle the Pagination visibility.
    So far so good, but when I am tapping inside the Overlay Content the Overlay will not be hidden, only if I tab outside.
    Therefore I wanted to check the radSlideView's 

    IsOverlayContentDisplayed = true

    But this is always true.
    Is there a possibility to check if overlay is shown or not to decice if I should show or hide the paging?
  5. Todor
    Admin
    Todor avatar
    778 posts

    Posted 21 May 2014 Link to this post

    Hello Mike,

    Thank you for writing back.

    I'm not sure I understand correctly the scenario where the issue occurs. I have attached a sample which demonstrates the approach that I mentioned.

    On a side note, IsOverlayContentDisplayed is not always true. For example you can see that if the ManipulationStarted event occurs when the overlay is not displayed, the value of this property is correctly still false. However by the time the Tap event occurs, its value is already changed to true.

    Please have a look at the sample and let me know if this approach works for you. If not, please elaborate a bit more about the scenario when it is not applicable.

    Regards,
    Todor
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  6. Mike
    Mike avatar
    4 posts
    Member since:
    Apr 2014

    Posted 23 May 2014 in reply to Todor Link to this post

    Hello.

    Thank you very much for your sample. I checked it out and I did it the same way.
    The issue seems to be my overlay template definition. I have a ScrollViewer
    around the textblock, thus I can show long descriptions in the overlay and scroll inside.
    This is the issue. When I tap inside the scroll viewer the overlay keeps visible, but the paging toggles.
    I did this change in your sample, so you can test and see what I mean.
  7. Mike
    Mike avatar
    4 posts
    Member since:
    Apr 2014

    Posted 23 May 2014 in reply to Mike Link to this post

    Hmm I only can attach images - no zip files.
    So I post the code here:

    <telerikPrimitives:RadSlideView.OverlayContentTemplate>
         <DataTemplate>
             <Grid Opacity="0.5"
                   VerticalAlignment="Center"
                   Background="Gray">
                 <ScrollViewer Grid.Row="1" Height="170" VerticalScrollBarVisibility="Auto">
                     <TextBlock Text="{Binding}"
                     FontSize="{StaticResource PhoneFontSizeLarge}"
                     FontFamily="{StaticResource PhoneFontFamilySemiLight}"
                     VerticalAlignment="Top"/>
                 </ScrollViewer>
             </Grid>
         </DataTemplate>
     </telerikPrimitives:RadSlideView.OverlayContentTemplate>
  8. Todor
    Admin
    Todor avatar
    778 posts

    Posted 28 May 2014 Link to this post

    Hello Mike,

    Thank you for getting back to us.

    The ScrollViewer consumes the manipulation so it doesn't reach to RadSlideView and thus the overlay is not hidden. You can change this by manually handling when to show and hide the overlay by using RadSlideView's public methods. Here is the change that I made to the sample project:

    private void OnSlideViewTap(object sender, System.Windows.Input.GestureEventArgs e)
    {
        if(pagination.Visibility == System.Windows.Visibility.Visible)
        {
            slideView.ShowOverlayContent();
            pagination.Visibility = System.Windows.Visibility.Collapsed;
        }
        else
        {
            slideView.HideOverlayContent();
            pagination.Visibility = System.Windows.Visibility.Visible;
        }
    }

    Let me know if you need further assistance.

    Regards,
    Todor
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
DevCraft banner