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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T03:51:00+00:00 2026-06-09T03:51:00+00:00

I have the following class schema public Class Test : DependencyObject { private DependencyProperty

  • 0

I have the following class schema

public Class Test : DependencyObject 
{
    private DependencyProperty _thickness = DependencyProperty.Register("Thickness", typeof(double), typeof(CounterDataStreamWrapper));
    public double Thickness
    {
        get 
        { 
            return (double)GetValue(this._thickness); 
        }
        set
        {
            SetValue(this._thickness, value);
        }
    }


    ... Rest of the code
}

Essentially I have a collection of Test objects, and I want to bind the Thickness value for each one to its corresponding UI element. I am not too familiar with C# binding. When I try to create multiple objects, I am running into “DependencyProperty is already registered” issue. I am sure that I am just missing some key concept for binding to DependencyProperty.

Any help is appreciated!

  • 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-09T03:51:02+00:00Added an answer on June 9, 2026 at 3:51 am

    You are registering the Thickness DependencyProperty on the CounterDataStreamWrapper type and private per instance.

    Make the DependencyProperty public static and register it for the class Test.

    public static DependencyProperty Thickness = 
        DependencyProperty.Register("Thickness", typeof(double), typeof(Test));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have following class public class ButtonChange { private int _buttonState; public void SetButtonState(int
I have following test class @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = {/services-test-config.xml}) public class MySericeTest { @Autowired
I have the following class structure: @XmlRootElement public class A{ private String s; private
I have an azure table that has the following schema: public class Village :
I have following class (as seen through reflector) public class W : IDisposable {
I have the following class public class MenuVeiculo { public string Nome { get;
I have the following configuration: @Aspect public class MyAspect { @Around(@annotation(SomeAnnotation)) public Object myMethod(ProceedingJoinPoint
Assume the following schema class Person{ public int Id {get;set;} public virtual ICollection<Province> Provinces
I have a folder hierarchy represented by the following class: public class Folder {
I have a legacy class, with a lot of public double fields. All double

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.