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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T21:10:32+00:00 2026-06-15T21:10:32+00:00

Here is my issue, I created a UserControl as follows: XAML: <UserControl x:Class=ProcessVisualizationBar.UserControl1 xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation

  • 0

Here is my issue, I created a UserControl as follows:

XAML:

<UserControl x:Class="ProcessVisualizationBar.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" xmlns:lb="clr-namespace:ProcessVisualizationBar"
         Name="ProcessVisualizationBar">

    <Border BorderBrush="Silver" BorderThickness="1,1,1,1" Margin="0,5,5,5" CornerRadius="5" Padding="2">
        <ListBox Name="ProcessVisualizationRibbon" Grid.Column="1" Height="40" ItemsSource="{Binding ElementName=ProcessVisualizationBar, Path=ItemsSource}"/>
    </Border>

</UserControl>

Code Behind(C#):

using System.Windows;
using System.Windows.Controls;

namespace ProcessVisualizationBar
{
    public partial class UserControl1 : UserControl
    {
        public static readonly DependencyProperty ItemsSourceProperty = DependencyProperty.Register("ItemsSource", typeof(System.Collections.IEnumerable), typeof(UserControl));

        public System.Collections.IEnumerable ItemsSource
        {
            get { return ProcessVisualizationRibbon.ItemsSource; }
            set { ProcessVisualizationRibbon.ItemsSource = value; }
        }

        public UserControl1()
        {
            InitializeComponent();
        }
    }
}

I build my Usercontrol and add the .dll to the reference of another project. I add the reference at the top of my XAML as such:

xmlns:uc="clr-namespace:ProcessVisualizationBar;assembly=ProcessVisualizationBar"

Then I go to use the control.

<uc:UserControl1 Grid.Row="2" x:Name="ProcessVisualizationContent" />

It finds the control okay, but when I try and find the ItemsSource Property I added to it, I’m not finding it. I’m not sure what I missed, and I’m not sure what debug tools are really available to figure this out.

Anyone have some experience with this that can share their wisdom?

  • 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-15T21:10:33+00:00Added an answer on June 15, 2026 at 9:10 pm

    What is the actual data being passed? That is what you should be creating and not a pass through situation which you are attempting.

    Create a dependency property targetting the actual data to be passed with a property changed handler. On the change event, then call internal code to bind it to the ProcessVisualazation ItemsSource. That way you can debug when the data comes through by placing a breakpoint in the event.

    Here is an example where the consumer will see StringData in the Xaml and needs to pas a list of strings into the custom control:

      #region public List<string> StringData
      /// <summary>
      /// This data is to be bound to the ribbon control
      /// </summary>
      public List<string> StringData
      {
         get { return GetValue( StringDataProperty ) as List<string>; }
         set { SetValue( StringDataProperty, value ); }
      }
    
      /// <summary>
      /// Identifies the StringData dependency property.
      /// </summary>
      public static readonly System.Windows.DependencyProperty StringDataProperty =
          System.Windows.DependencyProperty.Register(
              "StringData",
              typeof( List<string> ),
              typeof( UserControl ),
              new System.Windows.PropertyMetadata( null, OnStringDataPropertyChanged ) );
    
      /// <summary>
      /// StringDataProperty property changed handler.
      /// </summary>
      /// <param name="d">DASTreeBinder that changed its StringData.</param>
      /// <param name="e">Event arguments.</param>
      private static void OnStringDataPropertyChanged( System.Windows.DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e )
      {
         UserControl source = d as UserControl;
         List<string> value = e.NewValue as List<string>;
         BindDataToRibbon( value );
      }
      #endregion public List<string> StringData 
    

    Now just create a BindDataToRibbon method which will do the dirty work. Note that I use Jeff Wilcox’s Silverlight dependency snippets in Visual Studio to generate the above dependency. I have used it for WPF and Silverlight projects.

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

Sidebar

Related Questions

Sample: I've created a minimal set of files that highlight the issue here: http://uploads.omega.org.uk/Foo3.zip
I'm having a small issue here: <div id=navbar> <ul id=navtabs class=floatcontainer> <li <?php if
I have a bit of a strange issue here. I created a custom control
Here's the issue: I created a drop down menu displaying security questions. One of
I created a complete Visual Studio 2010 solution that can reproduce the issue here:
having a strange issue here. I have ~/Library/LaunchAgents/com.me.helloworld.plist with the following contents: <?xml version=1.0
My issue here is quite simple : i'm trying to use the jQuery validate
Having an issue here that I have tried everything I can think of but
I have a really weird issue here. I'm using my local development server right
Im having a weird issue here. Its probably just something stupid but I dont

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.