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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T08:50:57+00:00 2026-05-15T08:50:57+00:00

I’m hoping for some insight from someone better experienced than I for creating a

  • 0

I’m hoping for some insight from someone better experienced than I for creating a window/set of windows for displaying data in WPF. Here is a little overview of my task:

  • I will getting a large amount of binary output from a receiver. This will then be parsed and keyed to the meaning of the particular bit (i.e. word1 bit1 = Receiver Status OK”) for each binary string.

  • The data must then be displayed in a simple window of some sort in the format Receiver Status OK [CheckBox bound to value], or Speed in X direction: [TextBlock bound to value]

The issues are as follows:

  • There are around 60 unique ‘messages’ that need to be displayed when the user needs to look at the incoming data

  • Each message is of a different length of words, each with different meanings and a different number of fields that will have to be displayed.

I would like to know how you would approach this situation. I was thinking of going brute force, one window per message, but that seems very raw. My other thought was making a single standard window with a grid that was the size of the largest message, and then populating it with necessary TextBlocks and such. Then, I just DataBind the keys and values to the fields for each message, and Collapse the unused fields.

Any suggestions would be greatly appreciated. Thank you in advance.

  • 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-15T08:50:58+00:00Added an answer on May 15, 2026 at 8:50 am

    It sounds like you have a bunch of concrete message classes. If this is the case, I would create a new DataTemplate for each of the messages in the Window's Resources. The DataTemplate's x:Key should be set to the type of the class it is representing. Then, you would set the Content of the Window to the instance of the message, and it will select the correct DataTemplate for the type.

    e.g.

    <Window x:Class="MessageTest.MessageWindow"
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            xmlns:lcl="clr-namespace:MessageTest">
    
        <Window.Resources>
            <DataTemplate x:Key="{x:Type lcl:SimpleMessage}">
                <TextBlock Text="{Binding MessageContent}" />
            </DataTemplate>
        </Window.Resources>
    
    </Window>
    

    And when you create the Window:

    private void MessageRecieved(IMessage message)
    {
        var window = new MessageWindow { Content = message };
        window.Show();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am currently running into a problem where an element is coming back from
I want to construct a data frame in an Rcpp function, but when 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.