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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T15:47:24+00:00 2026-05-20T15:47:24+00:00

I am producing graphics for a process control system and I would like to

  • 0

I am producing graphics for a process control system and I would like to create a system border which would visually wrap the various sub system being displayed in the process mimic. I could use a regular border for this except I want it to not only changing color reflecting system status, but also popping up small “balloons” indicating the piece of the system that is in alarm state.

Process Mimic

I created a test project with a User Control and added a ListBox (for the balloons) and a ContentPresenter element wrapped in a border control. However, whenever I use this new control in another app, it wont allow me to add content to it. I’ve tried messing some with the ContentPropertyAttribute and properties of the ContentPresenter element, but I feel I am in the blind here.

<UserControl x:Class="SystemStatusBorder.UserControl1"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Canvas Height="290" Width="303">        
        <Border HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
            <ContentPresenter/>
        </Border>
        <ListBox Canvas.Right="0" Canvas.Bottom="0">
            <ListBox.RenderTransform>
                <TranslateTransform X="20"></TranslateTransform>
            </ListBox.RenderTransform>
            <ListBoxItem>TagA</ListBoxItem>
            <ListBoxItem>TagB</ListBoxItem>
        </ListBox>
    </Canvas>
</UserControl>

I don’t get it. What more should it need other than just the existence of a contentpresenter? UserControl subclasses ContentControl so I would have thought the wiring was in place. Eventually, I want it to be used something like this:

<SystemBorder>
  <SystemBorder.MonitoredTags>
        <List of relevant tags for the specific sub system goes here>
  </SystemBorder.MonitoredTags>
  <regular content goes here>  
</SystemBorder>
  • 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-20T15:47:25+00:00Added an answer on May 20, 2026 at 3:47 pm

    To create your own container control, you must create a new custom control (not a UserControl).

    Make your new control inherit from ContentControl.

    Custom Controls don’t have their own XAML. Instead, they are assigned a ControlTemplate.

    When you create your first Custom Control, the IDE will create a new file Themes\Generic.xaml.

    This is where the template for your control is. You can modify this template to match the XAML in your question. This will support the ContentPresenter element.

    I found a very good walkthrough here.

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

Sidebar

Related Questions

I'm producing a graph in matplotlib and I would like to set the x-axis
I am currently producing a mobile web application which enables the user to walk
The benefits of version control are obvious to someone who's producing text. How can
I'm producing bifurcation diagrams (which are normally used in nonlinear dynamics). These diagrams identify
In producing a web-based data entry system, is the fact that you are adding
I've been producing a letter compilation system (to save people time after a questionaire
I have a program producing a lot of data, which it writes to a
I'm producing a hex file to run on an ARM processor which I want
I am basically producing a simple, watered down, iPhone specific sites on a sub-domain
My app is producing doubles where Double.toString() produces -3.1999999999999953 - whereas I would expect

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.