Click here to Skip to main content
15,917,005 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In WPF dependency property provide the binding,styling and animation etc as read several places but How the TextBox.Text is bindable property in XAML because when we see the metadata of Text it's a normal CLR property.Is TextBox.Text property is a dependency property.
[DefaultValue("")]
[Localizability(LocalizationCategory.Text)]
 public string Text { get; set; }


What I have tried:

As I have seen the metadata of TextBox.Text it's a normal property.
Posted
Updated 4-Oct-16 0:42am

1 solution

That´s totally ok, DependencyProperties almost always come with such an clr-property wrapper around the actual static representation.

Just have a look at the "propdp" VisualStudio-CodeSnippet, that generates exactly this kind of accessor.

In your case, just look out for a static readonly DependencyProperty:

C#
//
// Summary:
//     Identifies the System.Windows.Controls.TextBox.Text dependency property.
//
// Returns:
//     The identifier for the System.Windows.Controls.TextBox.Text dependency property.
public static readonly DependencyProperty TextProperty

or simply just hit F1 on the member in question, which should take you to the according ;MSDN-Description
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900