Quantcast
Channel: VBForums - WPF, WCF, WF
Viewing all articles
Browse latest Browse all 256

RichTextBox Issues

$
0
0
Hi,
I made a FontViewer program using WPF (See screen below)

Here are the issues...
1) When loading a saved RTF file, I am getting a bunch of font names appended at the end of my text that IS NOT VISIBLY IN THE RTF file
2) After loading file into RTB, I can not longer change the font size

Here is my saving and loading code for the RTF file.

Code:

'SAVE RTF
If File.Exists(DemoRTFFile) Then
    fs = New FileStream(DemoRTFFile, FileMode.Open, FileAccess.Write)
        Using fs
            Dim RTBText As New TextRange(rtfEditor.Document.ContentStart, rtfEditor.Document.ContentEnd)
            RTBText.Save(fs, DataFormats.Rtf)
        End Using
End If

'Load RTF
If File.Exists(DemoRTFFile) Then
    fs = New FileStream(DemoRTFFile, FileMode.Open, FileAccess.Read)
      Using fs
          Dim RTBText As New TextRange(rtfEditor.Document.ContentStart, rtfEditor.Document.ContentEnd)
          RTBText.Load(fs, DataFormats.Rtf)
        End Using
End If

Any insight would be appreciated

Name:  fontviewerErr.jpg
Views: 33
Size:  62.5 KB
Attached Images
 

Viewing all articles
Browse latest Browse all 256

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>