I have a RichTextBox and when I try to drag & drop inside it it throws exception:
it happens when I'm in debug mode and the common language runtime exception flag is on.
This is my XAML -
<Grid>
<RichTextBox x:Name="rtb"
ScrollViewer.VerticalScrollBarVisibility="Auto"
IsReadOnly="True" />
</Grid>
this is code behind -
public MainWindow()
{
InitializeComponent();
rtb.AppendText("aaaaaaa aaaaaaaaaaa aaaaaaaa aaaaaaaabbb bbbbb bbbbb bbbb");
}
Have you set AllowDrop = true
?
If you haven't, you can get bizarre errors
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.