Suitable Import namespace for examples

2 posts, 0 answers
  1. George
    George avatar
    62 posts
    Member since:
    Sep 2008

    Posted 24 Jan 2013 Link to this post

    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?

  2. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 29 Jan 2013 Link to this post

    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.
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top