This is a migrated thread and some comments may be shown as answers.

Suitable Import namespace for examples

1 Answer 120 Views
RichTextBox (obsolete as of Q3 2014 SP1)
This is a migrated thread and some comments may be shown as answers.
George
Top achievements
Rank 1
George asked on 24 Jan 2013, 02:16 PM
I am trying to replicate the code listed in the examples fro importing a file to a richtextbox, like

Dim document As RadDocument = Nothing
        Dim provider As IDocumentFormatProvider = New DocxFormatProvider()
        Dim openDialog As New OpenFileDialog()
        openDialog.Filter = "Documents|*.docx"
        openDialog.Multiselect = False
        Dim dialogResult As DialogResult = openDialog.ShowDialog()
        If dialogResult = System.Windows.Forms.DialogResult.OK Then
            Using stream As New FileStream(openDialog.FileName, FileMode.Open)
                document = provider.Import(stream)
            End Using
        End If
        Return document


I am unable to find what are the correct namespaces for RadDocument and  IDocumentFormatProvider, 

I have tried 

imports telerik.wincontrols
imports telerik.wincontrols.ui

etc, but I am kind of lost,

Can you please provide some help?

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 29 Jan 2013, 09:06 AM
Hi George,

Thank you for writing.

RadDocument is in the Telerik.WinControls.RichTextBox.Model namespace, while the IDocumentFormatProvider is in the Telerik.WinControls.RichTextBox.FormatProviders namespace. I will make sure that this gets into our documentation.

I hope that you find this information useful.

Kind regards,
Stefan
the Telerik team
Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
Tags
RichTextBox (obsolete as of Q3 2014 SP1)
Asked by
George
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or