locked
ScrollViewer and know 2048 texture limit

    Question

  • Hello 

    we all know about ScrollViewer and know 2048 uielement limit problem

    So if anybody want to put TextBlock into scrollviewer and I have some items on top of TextBlock  and on bottom

    scrollviewer will clip TextBlock to 2048height and then it will don't render enything but there is no problem for rest of items bellow textBlock

    <ScrollViewer>

    <StackPanel>

    <TextBox text="asdfsdf"/>

     <TextBlock text="asdfsd"/>   // enter really long text here

    <TextBox text="asdfsdf"/>

    <StackPanel/>

    <ScrollViewer/>

    so 

    I observe that If I write SMS there is also some scrollviewer and textblock 

    and some if you edit contact detail and then you add note 

    So is it possible somehow to disable that ScrollViewer caching strategy and use ScrollViewer just to position ui elements?

    Or how does MS solve this problem?

    They have special variant of scrollviewer ?

    Any idea? 



    Friday, November 14, 2014 2:19 PM

Answers

  • This appears to be a Silverlight issue. I couldn't reproduce any obvious problem with the following code in a Windows Phone Runtime app:

            <ScrollViewer>
                <StackPanel>
                    <TextBlock Text="begin"/>
                    <TextBox x:Name="t"  TextWrapping="Wrap" />
                    <TextBlock Text="end"/>
                </StackPanel>
            </ScrollViewer>
    
            protected override void OnNavigatedTo(NavigationEventArgs e)
            {
                for (int i=0;i<200;i++)
                {
                    t.Text += i + ") Lorem ipsum dolor sit amet.\r\n";
                }
            }


    Friday, November 21, 2014 3:04 AM
    Owner

All replies

  • Can you please explain the problem more clearly? I'm not sure what exactly you are trying to do.

    The ScrollViewer doesn't position elements itself. It generally contains control (Grid, ItemsPresenter, etc.) on which sub-controls are laid out.

    Windows.UI.Xaml controls all use the same ScrollViewer implementation.

    Saturday, November 15, 2014 2:32 AM
    Owner
  • Windows phone 8.0/8.1

    <ScrollViewer>

    <StackPanel>

    <TextBlock text="asdfsdf"/>

      <TextBox text="asdfsd"/>   // write really long text on device

    <TextBlock text="asdfsdf"/>

    <StackPanel/>

    <ScrollViewer/>

    and try to write as much text as possible 

    when TextBox reach some limits in Height  (2048 px), you will stop to see your text

    same problem with list box

    <ListBox>

    <TextBlock text="asdfsdf"/>

      <TextBox text="asdfsd"/>   // write really long text on device

    <TextBlock text="asdfsdf"/>

    <ListBox/>

    TextBox  will have right height but we don't see text

    We can easy compare my example with sms application on windows phone

    list of SMSs with new sms and everything is scroll-able

    As we have bigger phones with higher resolution , 2048px limitation is big problem as it is easy to get TexBox in that size


    • Edited by Seznam cz Wednesday, November 19, 2014 4:22 PM
    Wednesday, November 19, 2014 4:21 PM
  • The native OS applications on Windows Phone are built using a completely different GUI framework. Some of the Apps have been moved over to the WinRT runtime third party Apps use (Calendar, Battery Safer and some more) but the Messages App to my knowledge still doesn't use the same building blocks we use.

    So basically built in applications aren't really a good starting point for comparisons. What's the behavior in messaging Apps like Facebook Messenger and WhatsApp?

    Thursday, November 20, 2014 11:01 AM
  • So can you point me to that COMPLETELY DIFFERENT GUI framework?

    I want it too.

    plz M$ we want to use your completely different framework with much better ui elements and other stuff.

    Mr Nadella you open so much of m$ work this days, we want to do same magic as WP build in apps. plz


    Skype, whatsApp use MaxHeight for TextBox  => and it look stupid

    But I want to do same magic as email and sms build in apps

    I want faster startup and better animation a no stupid 2048 texture limit for silver light !

    And I don't have problem with C++

    Thursday, November 20, 2014 12:15 PM
  • This appears to be a Silverlight issue. I couldn't reproduce any obvious problem with the following code in a Windows Phone Runtime app:

            <ScrollViewer>
                <StackPanel>
                    <TextBlock Text="begin"/>
                    <TextBox x:Name="t"  TextWrapping="Wrap" />
                    <TextBlock Text="end"/>
                </StackPanel>
            </ScrollViewer>
    
            protected override void OnNavigatedTo(NavigationEventArgs e)
            {
                for (int i=0;i<200;i++)
                {
                    t.Text += i + ") Lorem ipsum dolor sit amet.\r\n";
                }
            }


    Friday, November 21, 2014 3:04 AM
    Owner
  • wow 

    you are right, thx

    now I have 1 week befour app release and I need to port whole app to universal app

    great

    It is nice that most users already upgrade phone firmware to windows phone 8.1

    Friday, November 21, 2014 9:32 AM