none
Vertical compression and Horizontal compression xaml code for scroll viewer RRS feed

  • Question

  • What are the visual states used in the <VisualStateGroup x:Name="VerticalCompression"> and <VisualStateGroup x:Name="HorizontalCompression"> for metro apps?
    Thursday, February 25, 2016 6:46 AM

Answers

  • Hi harish,

    Welcome to the Developing Universal Windows apps forum!

    As a friendly reminder please make sure to add the appropriate tags to the title of your post as per Guide to posting: subject line tags

    I have found the following "VerticalCompression" VisualStateGroup and "HorizontalCompression" VisualStateGroup:

     <VisualStateGroup x:Name="VerticalCompression">
             <VisualState x:Name="NoVerticalCompression"/>
             <VisualState x:Name="CompressionTop"/>
             <VisualState x:Name="CompressionBottom"/>
     </VisualStateGroup>
     <VisualStateGroup x:Name="HorizontalCompression">
             <VisualState x:Name="NoHorizontalCompression"/>
             <VisualState x:Name="CompressionLeft"/>
             <VisualState x:Name="CompressionRight"/>
     </VisualStateGroup>

    In the VerticalCompression VisualStateGroup, it has the NoVerticalCompression/CompressionTop/CompressionBottom, the names are self explanatory, “CompressionTop” means that the compression animation is happening on the ScrollViewer content towards the top side of the viewport. The same as the "HorizontalCompression" VisualStateGroup.

    For more information, please try to refer to the following article:
    http://blogs.msdn.com/b/slmperf/archive/2011/06/30/windows-phone-mango-change-listbox-how-to-detect-compression-end-of-scroll-states.aspx .

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Friday, February 26, 2016 4:32 AM
    Owner

All replies

  • Hi harish,

    Welcome to the Developing Universal Windows apps forum!

    As a friendly reminder please make sure to add the appropriate tags to the title of your post as per Guide to posting: subject line tags

    I have found the following "VerticalCompression" VisualStateGroup and "HorizontalCompression" VisualStateGroup:

     <VisualStateGroup x:Name="VerticalCompression">
             <VisualState x:Name="NoVerticalCompression"/>
             <VisualState x:Name="CompressionTop"/>
             <VisualState x:Name="CompressionBottom"/>
     </VisualStateGroup>
     <VisualStateGroup x:Name="HorizontalCompression">
             <VisualState x:Name="NoHorizontalCompression"/>
             <VisualState x:Name="CompressionLeft"/>
             <VisualState x:Name="CompressionRight"/>
     </VisualStateGroup>

    In the VerticalCompression VisualStateGroup, it has the NoVerticalCompression/CompressionTop/CompressionBottom, the names are self explanatory, “CompressionTop” means that the compression animation is happening on the ScrollViewer content towards the top side of the viewport. The same as the "HorizontalCompression" VisualStateGroup.

    For more information, please try to refer to the following article:
    http://blogs.msdn.com/b/slmperf/archive/2011/06/30/windows-phone-mango-change-listbox-how-to-detect-compression-end-of-scroll-states.aspx .

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Friday, February 26, 2016 4:32 AM
    Owner
  • Hi Amy ,

    Thanks for the above information.

    The above approach i already tried it is working for windows phone but it is not working for windows 8 (tablet),Can you please tell the approach which can be used for windows 8(tablet).  

    Thanks 

    Harish Tata

    Friday, February 26, 2016 7:16 AM