0
사용자가 RichTextBox 내부에서 테이블을 만들 수있게하려고합니다. RichTextBox 안에 그리드를 만들 수 있지만 그걸로 몇 가지 문제가 있습니다.Silverlight 4에서 RichTextBox 내부의 표에 액세스하는 방법은 무엇입니까?
그리드에서이 XAML부터 시작합니다.
<RichTextBox Name="TB1" AcceptsReturn="True">
<Paragraph TextAlignment="Center">
Hi everybody
</Paragraph>
<Paragraph>
<InlineUIContainer>
<Grid Background="Black">
<Grid.RowDefinitions>
<RowDefinition Height="10" />
<RowDefinition Height="10" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="10" />
<ColumnDefinition Width="10" />
</Grid.ColumnDefinitions>
</Grid>
</InlineUIContainer>
</Paragraph>
<Paragraph>
How are you today?
</Paragraph>
</RichTextBox>
그런 다음 RichTextBox의 Xaml 속성을 사용하여 XAML을 꺼내면이 XAML을 얻습니다.
<Section xml:space="preserve" HasTrailingParagraphBreakOnPaste="False" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<Paragraph FontSize="11" FontFamily="Portable User Interface" Foreground="#FF000000" FontWeight="Normal" FontStyle="Normal" FontStretch="Normal" TextAlignment="Center">
<Run Text="Hi everybody" />
</Paragraph>
<Paragraph FontSize="11" FontFamily="Portable User Interface" Foreground="#FF000000" FontWeight="Normal" FontStyle="Normal" FontStretch="Normal" TextAlignment="Left">
<Run />
</Paragraph>
<Paragraph FontSize="11" FontFamily="Portable User Interface" Foreground="#FF000000" FontWeight="Normal" FontStyle="Normal" FontStretch="Normal" TextAlignment="Left">
<Run Text="How are you today?" />
</Paragraph>
</Section>
여기서는 Grid가 빈 Run 요소로 변했습니다.
왜 이런 일이 발생하는지 알고 계십니까?