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

  • SEARCH
  • Home
  • 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 182137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T14:53:11+00:00 2026-05-11T14:53:11+00:00

I’m planning a WPF application which will be able to create dynamic data entry

  • 0

I’m planning a WPF application which will

  • be able to create dynamic data entry forms (meaning the form gets the fields to display, their order, etc. from data in the database, not from the XAML)
  • use the MVVM pattern if possible

Here is how I plan to go about it: in a Customer Data Entry View I would set the data context:

<UserControl.DataContext>     <vm:DynamicFormViewModel/> </UserControl.DataContext> 

and then include one element in my XAML as a placeholder for the form:

<UserControl.Content>     <view:DynamicFormView x:Name='CustomerEntry'/> </UserControl.Content> 

then in my ModelView I want to not have static properties but I want to build the XAML as one built HTML controls back in ASP.NET, in this fashion:

View view = new View(); view.Children.Add(...) 

and in this way build the Grid based on the collection of data (firstname, lastname) and meta data (field label, field name, field helptext, field display order, etc.) which the ViewModel gets from the Model.

  • has anyone built a WPF application that could create dynamic forms in this manner?
  • did you use the MVVM pattern?
  • is it possible to use the MVVM pattern in this way or does the MVVM pattern presuppose static fields in the View Model that are directly bound to static elements in the View?
  • 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. 2026-05-11T14:53:12+00:00Added an answer on May 11, 2026 at 2:53 pm

    You will have to write data templates for your various field data types so that WPF will chose how to display your data depending on its type. something of this format:

    NOTE: This is not WPF just pseudo code

    <DataTemplate DataType='{x:Type DateTime}'>   <DatePicker Value='{Binding}'/> </DataTemplate>   <DataTemplate DataType='{x:Type String}'>   <TextBox Text='{Binding}'/> </DataTemplate> 

    It doesn’t have to be a primitive type. It can be an Email, DateApproved or even a Url class type. e.g.

    class Customer   {    public Email Email{get;set;}    public DateTime DateApproved{get;set;}    public URI Url{get;set;} }  public class Email  {    public string Type{get;set;}    public string Value{get;set;}  }  

    ..etc…

    Update

    Check out this WPF Dynamic UI example on MSDN: Dynamic Data Entry with WPF and LINQ

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

Sidebar

Ask A Question

Stats

  • Questions 148k
  • Answers 148k
  • 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 In addition what John answered, I would also strongly recommend… May 12, 2026 at 9:24 am
  • Editorial Team
    Editorial Team added an answer I think the axes in the Flex Charting package allow… May 12, 2026 at 9:24 am
  • Editorial Team
    Editorial Team added an answer You need to show us the definitions for nod. There's… May 12, 2026 at 9:24 am

Related Questions

I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I am currently running into a problem where an element is coming back from
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
Configuring TinyMCE to allow for tags, based on a customer requirement. My config is

Trending Tags

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

Top Members

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.