locked
Can a TextBlock in a Flyout have wrapped text? RRS feed

  • Question

  • The TextBlock in the following code does not wrap.

    <AppBarButton x:Name="abbFooHelp" Icon="Help" IsCompact="True" VerticalAlignment="Center" HorizontalAlignment="Center">
        <AppBarButton.Flyout>
            <Flyout>
                <TextBlock TextWrapping="Wrap">This is a very looooooooooooooooooooog text. This is a very looooooooooooooooooooog text.</TextBlock>
            </Flyout>
        </AppBarButton.Flyout>
    </AppBarButton>

    Could any one offer a tip?


    Hong

    Monday, June 30, 2014 5:10 AM

Answers

  • change it to:

     <Flyout>
    <Grid Width="100">
                <TextBlock TextWrapping="Wrap">This is a very looooooooooooooooooooog text. This is a very looooooooooooooooooooog text.</TextBlock>
    </Grid>
            </Flyout>


    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    Monday, June 30, 2014 5:26 AM

All replies

  • change it to:

     <Flyout>
    <Grid Width="100">
                <TextBlock TextWrapping="Wrap">This is a very looooooooooooooooooooog text. This is a very looooooooooooooooooooog text.</TextBlock>
    </Grid>
            </Flyout>


    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    Monday, June 30, 2014 5:26 AM
  • Thank you, Dave.  It works!

    I think that I got the point - wrapping TextBlock needs to be in a container with an explicitly specified width. 


    Hong

    Monday, June 30, 2014 10:16 AM