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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:47:10+00:00 2026-06-11T07:47:10+00:00

MyControl.xaml.cs public string achName { get { return (string)this.GetValue(achNameProperty); } set { this.SetValue(achNameProperty, value);

  • 0

MyControl.xaml.cs

public string achName
{
    get { return (string)this.GetValue(achNameProperty); }
    set { this.SetValue(achNameProperty, value); }
}
public static readonly DependencyProperty achNameProperty = DependencyProperty.Register("achName", typeof(string), typeof(MyControl), new PropertyMetadata(null));

MainPage.xaml

 <My:MyControl achName="{Binding Name}"/>

name has a value, but it doesn’t seem to get send to the dependendcy (achName) property. How can I fix this?

ViewModel

public string Name { get { return "some random test value"; } }

other bindings to viewmodel do work, so the problem doesn’t lie there.

  • 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-11T07:47:11+00:00Added an answer on June 11, 2026 at 7:47 am

    The only reason i can see is that Binding to Name is failing. You can debug your bindings to see if its not failing. Refer to this – Debug Data Bindings

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

Sidebar

Related Questions

i can't get this binding working in XAML. Binding in c# works: public partial
I have class Marker class Marker { public double Position {get; set;} public string
My control has 5 dependency properties. I set them in XAML like this: <MyControl
The ViewModel class: class MyViewModel : ViewModelBase, INotifyPropertyChanged { public string SomeText { get{...}
Lets have a class: public partial class MyControl: UserControl{ private ObservableCollection<string> names = new
I have two UserControls: public partial class MKSelectMonthUC : UserControl { public static readonly
I have created a UserControl as follows: <UserControl x:Class=MySample.MyControl xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml xmlns:local=using:MySample xmlns:d=http://schemas.microsoft.com/expression/blend/2008 xmlns:mc=http://schemas.openxmlformats.org/markup-compatibility/2006
Why this works if (mycontrol.GetType() == typeof(TextBox)) {} and this do not? Type tp
I' written this UserControl: <my:MyUserControl x:Class=MyClass xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml xmlns:my=clr-namespace:MyNameSpace.MyControls;assembly=MyAssembly> </my:MyUserControl> public partial class Editor
I have a usercontrol like this: <UserControl x:Class=MySample.customtextbox 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=20

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.