richeditbox

Paragraph mark of UWP RichEditBox is not resized

六月ゝ 毕业季﹏ 提交于 2020-06-29 04:02:51
问题 With this code ( Editor.Document.Selection.CharacterFormat.Size = 20; ) I change the font size of a UWP RichEditBox in the Page_Loaded -handle. When I start typing some characters, everything works fine. But when I select the paragraph mark and then type something, this text appears in the wrong font size (10.5). What I've tried is to expand the selection before setting the font size, but it seems that there is no paragraph mark when there's no text. But when the rich edit box is empty and I

Paragraph mark of UWP RichEditBox is not resized

前提是你 提交于 2020-06-29 04:02:32
问题 With this code ( Editor.Document.Selection.CharacterFormat.Size = 20; ) I change the font size of a UWP RichEditBox in the Page_Loaded -handle. When I start typing some characters, everything works fine. But when I select the paragraph mark and then type something, this text appears in the wrong font size (10.5). What I've tried is to expand the selection before setting the font size, but it seems that there is no paragraph mark when there's no text. But when the rich edit box is empty and I

Paragraph mark of UWP RichEditBox is not resized

佐手、 提交于 2020-06-29 04:02:26
问题 With this code ( Editor.Document.Selection.CharacterFormat.Size = 20; ) I change the font size of a UWP RichEditBox in the Page_Loaded -handle. When I start typing some characters, everything works fine. But when I select the paragraph mark and then type something, this text appears in the wrong font size (10.5). What I've tried is to expand the selection before setting the font size, but it seems that there is no paragraph mark when there's no text. But when the rich edit box is empty and I

UWP RichEditBox disable image resize

谁说我不能喝 提交于 2020-01-11 08:01:07
问题 I'm trying to build a native editor in which i have a rich edit box in which i insert an image. I'm able to resize the image from the editor, how can I disable resizing. Also how can i get the inserted image back. 回答1: I'm able to resize the image from the editor, how can I disable resizing If you want to keep image original size and insert to RichEditBox , you could get the image PixelWidth and PixelHeight value with BitmapImage like the follow. Windows.Storage.Pickers.FileOpenPicker open =

RichEditBox: picture and content after the picture disappear (Windows 10 1703 Creators Update)

纵饮孤独 提交于 2019-12-25 16:05:00
问题 In Windows 10 1703 Creators Update a new bug appeared. Steps to reproduce: Load an RTF document with a picture into RichEditBox Save it. Save it again. Reload it or open it with another app - you will see that the picture is gone and all the content after it is gone too. I submitted this bug here in FeedbackHub app. The question is how to avoid this bug or make a workaround? 回答1: This project on GitHub is to demonstrate the bug and to fix it. After you save the document for the 2-nd time, the

RichEditBox: picture and content after the picture disappear (Windows 10 1703 Creators Update)

被刻印的时光 ゝ 提交于 2019-12-25 16:02:43
问题 In Windows 10 1703 Creators Update a new bug appeared. Steps to reproduce: Load an RTF document with a picture into RichEditBox Save it. Save it again. Reload it or open it with another app - you will see that the picture is gone and all the content after it is gone too. I submitted this bug here in FeedbackHub app. The question is how to avoid this bug or make a workaround? 回答1: This project on GitHub is to demonstrate the bug and to fix it. After you save the document for the 2-nd time, the

How to get image from RichEditBox

廉价感情. 提交于 2019-12-23 03:09:44
问题 I have a RichEditBox in which I have already inserted an image through code. Now, I want to get the inserted image after some process. Is there any way to get image from RichEditBox? Any help would be greatly appreciated!! 回答1: I found two old question here that may help you. Extracting images from RichTextBox Extract Embedded Image Object in RTF 来源: https://stackoverflow.com/questions/44393353/how-to-get-image-from-richeditbox

Keep selection visual in RichEditBox on unfocus?

我是研究僧i 提交于 2019-12-23 01:59:12
问题 Does someone know a way to keep the visual selection state of a selected text in a RichEditBox? I want to add some basic text editing to my Windows 8.1 App but every time I select a text and click on another UI Element within the app, the RichEditBox hides the selection. I already tried to register the unfocus event an set the selection range again but unfortunately this has no effect. I also tried to draw my own rect over the Text using richEdit.Document.Selection.GetRect(PointOptions

Acces Denied when I use Open File Picker for open text file for RichEditBox UWP C#

本小妞迷上赌 提交于 2019-12-12 20:45:57
问题 I want to open a text file with Open File Picker and show in a RichEditBox, but when I select the file and push Ok, Visual Studio show "Access Denied", I want to know how to solve this please, there is my code: var picker = new FileOpenPicker(); picker.ViewMode = PickerViewMode.Thumbnail; picker.SuggestedStartLocation = PickerLocationId.DocumentsLibrary; picker.FileTypeFilter.Add("*"); picker.FileTypeFilter.Add(".txt"); picker.FileTypeFilter.Add(".text"); picker.FileTypeFilter.Add(".bat");

How to set multiple links in RichEditBox without AccessViolationException

雨燕双飞 提交于 2019-12-11 04:22:38
问题 Essentially my problem is that I receive AccessViolationException when I try to programmatically apply more than 2 links to an ITextDocument, if a user has edited the content. I've put together a simple demo app, based on the windows phone (8.1) Blank App template. I add to the main page: <StackPanel Margin="19,0,0,0"> <Button Content="Apply Links" Click="Button_Click" /> <RichEditBox x:Name="RtfBox" Height="300" Loaded="RtfBox_Loaded" Margin="0,0,19,0" TextWrapping="Wrap" /> </StackPanel>