Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7893023
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T07:01:01+00:00 2026-06-03T07:01:01+00:00

see, i have a html file and i’m trying to load other than iframe

  • 0

see, i have a html file and i’m trying to load other than iframe and web-browser controls
so i used RichTextBox is it supportable only with XAML? if it also supports HTML.how do i implement.

i tried to load a html file but it loaded as text.

below is my code.

<Grid x:Name="LayoutRoot" Background="White">
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="400"/>
        <ColumnDefinition Width="580"/>
    </Grid.ColumnDefinitions>
    <Grid.RowDefinitions>
        <RowDefinition/>
    </Grid.RowDefinitions>
    <Canvas>
    <TextBox Height="23" x:Name="txtFileName" Canvas.Left="15" Canvas.Top="40" Grid.Row="0" Grid.Column="0" Width="280"  />
        <Button Content="Browse" Height="23" HorizontalAlignment="Left" x:Name="btnBrowse" Canvas.Left="300" Canvas.Top="40" Grid.Row="0" Grid.Column="0" Width="75" Click="BtnBrowse_Click"  />

        <RichTextBox x:Name="rtxtboxHTML" Margin="3" Grid.Row="0" Grid.Column="1" Width="450" Height="400" HorizontalAlignment="Center" VerticalAlignment="Center" Canvas.Left="450" Canvas.Top="40" IsReadOnly="True" TextWrapping="Wrap"/>

    </Canvas>
</Grid>

private void BtnBrowse_Click(object sender, RoutedEventArgs e)
    {

        OpenFileDialog openFileDialog = new OpenFileDialog();
        openFileDialog.Filter = "Html files (*.html)|*.htm|All Files (*.*)|*.*";

        if (openFileDialog.ShowDialog()==true)
        {
            txtFileName.Text = openFileDialog.File.Name;
            FileInfo _File = openFileDialog.File;

            using (StreamReader strReader = new StreamReader(openFileDialog.File.OpenRead()))
            {
                string _strTemp = string.Empty;
                //var rs = Application.GetResourceStream(new Uri(openFileDialog.File.Name, UriKind.Relative));
                //StreamReader sr = new StreamReader(rs.Stream);
                while (!strReader.EndOfStream)
                {
                    _strTemp = strReader.ReadToEnd();
                }
                strReader.Close();
                rtxtboxHTML.Selection.Text = _strTemp;
            }
        }
    }

where i went wrong…
Thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T07:01:02+00:00Added an answer on June 3, 2026 at 7:01 am

    RichTextBox will not parse HTML for you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to load a html file in a webview in a
I have a html text file and I am trying to remove any HTML
I have two html files, one contains the other with an iframe, and I
I have the following HTML and you can see the extra space between the
Imagine that HTML page is a game surface (see picture). User can have n
htmlparser.Parser, I have the snippet of html(see below) and i need to get the
Sometimes I see and have used the following variation for a fast divide in
I see an application have used Log.info = some info where are these logs
i have an index.html file that holds: document.addEventListener(deviceready,onDeviceReady,false); function onDeviceReady(){ var deviceuid = device.uuid;
I have a .php file, and a .html file. Within a button click, I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.