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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:36:33+00:00 2026-05-24T17:36:33+00:00

I had en idea, which shortly explained was that i would like to load

  • 0

I had en idea, which shortly explained was that i would like to load xaml-files runtime, and then bind them to runtime data.
Inside these xaml-files i would use a component called “PropertySetter” like this:

public class PropertySetter : UserControl
{
    public string Value { get; set; }
    public string Text { get; set; }
    public string Adress { get; set; }

    public PropertySetter()
    {
    }
}

And the xamlfile, would look like this:

<Grid
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"   
    xmlns:vf="clr-namespace:VisualFactory.vfGraphics.Graphics;assembly=VisualFactory">
    <vf:PropertySetter Name="Datapoint" Text="propset" Value="false" Adress="10201"  />
    <CheckBox IsChecked="{Binding ElementName=Datapoint, Path=Value}" Content="{Binding ElementName=Datapoint, Path=Text}" />
</Grid>

I hope you get the point by now.
The checkbox would bind its values (content, ischecked) to a propertysetter, and when the application runs, it just changes the values of a bunch of “PropertySetter”‘s and the graphics update their content and values.
BUT: While the xaml correctly sets the values when it is loaded, it doesnt update them, when i change the values of the propertysetters. I have tried setting Mode=TwoWay, and the propertysetters are in a iNotify collection.
Has anyone tried something like this before?

  • 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-24T17:36:35+00:00Added an answer on May 24, 2026 at 5:36 pm

    The answer lays in the “DependencyProperty” class. I changed the PropertySetter to this:

     public class PropertySetter : UserControl
        {
            public string Value
            {
                get { return (string)GetValue(ValueProperty); }
                set { SetValue(ValueProperty, value); }
            }
    
            public static readonly DependencyProperty ValueProperty =
                DependencyProperty.Register("Value", typeof(string), typeof(PropertySetter), new UIPropertyMetadata("0"));
    
    
    
    
            public string Text
            {
                get { return (string)GetValue(TextProperty); }
                set { SetValue(TextProperty, value); }
            }
    
            public static readonly DependencyProperty TextProperty =
                DependencyProperty.Register("Text", typeof(string), typeof(PropertySetter), new UIPropertyMetadata("def"));
    
    
    
    
            public string Adress
            {
                get { return (string)GetValue(AdressProperty); }
                set { SetValue(AdressProperty, value); }
            }
    
            public static readonly DependencyProperty AdressProperty =
                DependencyProperty.Register("Adress", typeof(string), typeof(PropertySetter), new UIPropertyMetadata(""));
    
    
    
            public PropertySetter():base()
            {
            }
        }
    

    And voilá, it all binds correctly, and i have now made a layer in between runtime loaded XAML and app-logic.

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

Sidebar

Related Questions

I had an idea that would require me be able to send and receive
I had an idea for an app that would periodically access peoples' Facebook data.
I had the following idea: Say we have a webapp written using django which
I had a crazy (but so crazy that it just might work) idea where
I had an idea today (that millions of others have probably already had) of
I had this idea and my first reaction after having it was That's a
I have a lot of files which have things like 1- mysql_query(update ... $_POST['foo']
i was asked a few java interview questions which i had no idea how
Sorry I had no idea how set a topic which could express what help
I had an idea to store hour-by-hour availability using a binary string that 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.