none
Textbox layout RRS feed

  • Pregunta

  • Hi:
    i´ve a doubt about the layout and the textbox
    I´ve created a control with this code:

    <UserControl x:Class="WpfApplication1.UserControl1"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
       
            <Border x:Name="brdThinking" BorderThickness="1" BorderBrush="#FFADADAD">
            <StackPanel>
                <TextBlock>This is a very short text</TextBlock>
                <TextBlock>This is a very long text, really a very long text, as you can see, this may be a big problem...</TextBlock>
             </StackPanel>
            </Border>
    </UserControl>

    And in the main page i use this control with this code:

    <Window x:Class="WpfApplication1.Window1"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:Controls="clr-namespace:WpfApplication1"
        Title="Window1">

        <Grid x:Name="LayoutRoot" Width="1086" Height="250" VerticalAlignment="Top">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0.15*"/>
                <ColumnDefinition Width="0.85*"/>
            </Grid.ColumnDefinitions>
            <Controls:UserControl1 x:Name="uc1" Grid.Column="0" VerticalContentAlignment="Top"/>
        </Grid>
     
    </Window>

    But the second TextBlock dont see complete.

    What is the matter?

    Thanks in advance

    domingo, 22 de noviembre de 2009 22:06

Respuestas

  • set TextWrapping property = Wrap for second textblock
    Please mark posts as answers/helpful if it answers your question
    • Marcado como respuesta S. Man lunes, 23 de noviembre de 2009 13:47
    lunes, 23 de noviembre de 2009 11:08