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 981595
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T04:34:02+00:00 2026-05-16T04:34:02+00:00

I’m creating a WPF (in c#) application that will create html files based on

  • 0

I’m creating a WPF (in c#) application that will create html files based on it’s output. Is there a way to use the concept of an html ‘view’ (from the asp.net mvc) in a desktop application without reinventing the wheel? Basically I just want to save a list of outputted items in html which is so simple in a web application (and even using binding in a wpf desktop application to show the output in window) but seems clunky for HTML output in a desktop application I feel like I’d be reinventing the wheel to include flexible html templates with my program for data output.

Surely there is a quick and elegant way to do this?

As an example say the output of the program were a list of names (Bill, Bob, Jill, Frank), I’d like to save the following HTML file to the disk:

<html>
<body>
<ul>
<li>Bill</li>
<li>Bob</li>
<li>Jill</li>
<li>Frank</li>
</ul>
</body>
</html>

if the user defined a an html template such as:

<html>
<body>
<ul>
<li><!-- user name --></li>
</ul>
</body>
</html>

which could be done in ASP.NET MVC (or in a very similar way in PHP, ruby, etc) if the user defined something similar to the following:

<html>
<body>
<ul>
    <% foreach (string name in NameList) { %>
        <li>
        <%: name %>
        </li>
    <% } %>
</ul>
</body>
</html>

and I’d like to know if there is an easy way to create html files using that method in a desktop application?

  • 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-05-16T04:34:03+00:00Added an answer on May 16, 2026 at 4:34 am

    Store your data in a form that is readily serialized to XML – either in a class that implements XML serialization, or an ADO.NET DataSet. Write XSLT templates for transforming the XML into XHTML. Implement the transformations using the XslCompiledTemplate class.

    Granted, that approach will require you to learn some things that you probably don’t know very much about. XSLT’s not trivial, and there are subtleties in XML, XSLT, and HTML that will trip you up from time to time. But once you learn it, it’s an incredibly powerful combination of technologies. I haven’t produced an HTML document by hand in a decade; my starting point for any HTML document that I have to produce is an XML document that contains its content and an XSLT transform for rendering the content.

    From the WPF side, the only issue that you’ll need to deal with is in displaying rendered HTML in your application. I’ve done this two ways. One is by wrapping the WinForms WebBrowser control in a UserControl that exposes an Html dependency property, so that I can bind my view models’ Html property to it. (The view models all share a helper class for getting their XML and transforming it to HTML.)

    Another, harder way to get the output into a WPF UI is to bypass HTML completely and write an XSLT transform that renders the data as a FlowDocument in XAML. It’s not actually harder per se, it just introduces a bunch of new issues that you have to think about – also, it may be totally inappropriate for your application, if HTML production is truly what it’s all about. But once you know how to transform XML data into HTML, transforming it into XAML is child’s play.

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

Sidebar

Ask A Question

Stats

  • Questions 499k
  • Answers 500k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer This is not pretty but it works: rm -R $(ls… May 16, 2026 at 12:45 pm
  • Editorial Team
    Editorial Team added an answer Yes. Override the base1 and base2 methods in Derived to… May 16, 2026 at 12:45 pm
  • Editorial Team
    Editorial Team added an answer No, you can't. Unfortunately, UIEvent doesn't expose any public way… May 16, 2026 at 12:45 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a French site that I want to parse, but am running into
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti

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.