积极答复者
RichEditBox没有光标,也没有焦点?

问题
答案
-
这个我觉得是你项目的问题,我建议你建个空的app,然后试试放个RichTextColumns,看看里面的input控件能不能输入,我这边是没有问题的:
<Popup x:Name="myPopup" Margin="-34,0,-31,0" Grid.Row="2" Grid.Column="1" Height="100" VerticalAlignment="Bottom" > <Grid x:Name="columnGrid" Background="White" Width="900" Height="300"> <Grid.ColumnDefinitions> <ColumnDefinition/> <ColumnDefinition/> <ColumnDefinition/> </Grid.ColumnDefinitions> <RichTextBlock Grid.Column="0" IsTextSelectionEnabled="True" TextAlignment="Justify" OverflowContentTarget="{Binding ElementName=firstOverflowContainer}" TextIndent="12" FontSize="12" FontFamily="Segoe UI" Foreground="#2a2a2a" Margin="20,0"> <Paragraph> <InlineUIContainer> <Border Background="Black"> <RichEditBox/> </Border> </InlineUIContainer> </Paragraph> </RichTextBlock> <RichTextBlockOverflow x:Name="firstOverflowContainer" Grid.Column="1" Margin="20,0" OverflowContentTarget="{Binding ElementName=secondOverflowContainer}"/> <RichTextBlockOverflow x:Name="secondOverflowContainer" Grid.Column="2" Margin="20,0"/> </Grid> </Popup>
Sheldon _Xiao[MSFT]
MSDN Community Support | Feedback to us
Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- 已建议为答案 Sheldon _Xiao 2012年9月12日 2:26
- 已标记为答案 Min ZhuModerator 2012年9月13日 7:56
2012年9月12日 1:49 -
在InlineUIContainer内放两个控件就会导致问题的出现,放一个控件没问题,现在已经解决了
- 已标记为答案 Min ZhuModerator 2012年9月13日 7:56
2012年9月12日 2:11
全部回复
-
这个问题暂时还没遇到过, 我这边也没重现, 是不是跟你本地的机器有些关系,我用下面的代码尝试重现:
<Grid Background="AliceBlue"> <Grid x:Name="ContentRoot" Background="LimeGreen" Margin="100,20,100,20"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> <RowDefinition Height="Auto"/> </Grid.RowDefinitions> <Grid HorizontalAlignment="Center" VerticalAlignment="Top"> <StackPanel> <TextBlock Text="Popup Control " Foreground="Red" FontSize="50" ></TextBlock> <Image Source="corner.jpg" Width="400"></Image> <Button x:Name="PopUpButton" Content="Detail..." Height="50" Width="100" Background="Gray" Click="PopUpButton_Click" /> <Popup x:Name="myPopup" Margin="-34,0,-31,0" Grid.Row="2" Grid.Column="1" Height="100" VerticalAlignment="Bottom" > <Border CornerRadius="10" Background="Red" BorderThickness="2" BorderBrush="Black"> <StackPanel Margin="10"> <TextBox x:Name="PopUpText" Height="Auto" Width="Auto" FontSize="20"/> </StackPanel> </Border> </Popup> </StackPanel> </Grid> </Grid> </Grid>
private void PopUpButton_Click(object sender, RoutedEventArgs e) { myPopup.IsOpen = true; PopUpText.Text = "Free c# articles, c# tutorials, news, blogs, resources, forum for C# programming. "; }
如果你的问题还是存在,可以给我提供一个可以重现的sample么?Sheldon _Xiao[MSFT]
MSDN Community Support | Feedback to us
Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
2012年9月11日 8:06 -
这个我觉得是你项目的问题,我建议你建个空的app,然后试试放个RichTextColumns,看看里面的input控件能不能输入,我这边是没有问题的:
<Popup x:Name="myPopup" Margin="-34,0,-31,0" Grid.Row="2" Grid.Column="1" Height="100" VerticalAlignment="Bottom" > <Grid x:Name="columnGrid" Background="White" Width="900" Height="300"> <Grid.ColumnDefinitions> <ColumnDefinition/> <ColumnDefinition/> <ColumnDefinition/> </Grid.ColumnDefinitions> <RichTextBlock Grid.Column="0" IsTextSelectionEnabled="True" TextAlignment="Justify" OverflowContentTarget="{Binding ElementName=firstOverflowContainer}" TextIndent="12" FontSize="12" FontFamily="Segoe UI" Foreground="#2a2a2a" Margin="20,0"> <Paragraph> <InlineUIContainer> <Border Background="Black"> <RichEditBox/> </Border> </InlineUIContainer> </Paragraph> </RichTextBlock> <RichTextBlockOverflow x:Name="firstOverflowContainer" Grid.Column="1" Margin="20,0" OverflowContentTarget="{Binding ElementName=secondOverflowContainer}"/> <RichTextBlockOverflow x:Name="secondOverflowContainer" Grid.Column="2" Margin="20,0"/> </Grid> </Popup>
Sheldon _Xiao[MSFT]
MSDN Community Support | Feedback to us
Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- 已建议为答案 Sheldon _Xiao 2012年9月12日 2:26
- 已标记为答案 Min ZhuModerator 2012年9月13日 7:56
2012年9月12日 1:49 -
在InlineUIContainer内放两个控件就会导致问题的出现,放一个控件没问题,现在已经解决了
- 已标记为答案 Min ZhuModerator 2012年9月13日 7:56
2012年9月12日 2:11 -
好的。
Sheldon _Xiao[MSFT]
MSDN Community Support | Feedback to us
Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
2012年9月12日 2:26