Use System.Windows.Markup.ContentProperty attribut on the class
Eg:
If you are creating a custom class for clock control and wanna Time to take the Content from xaml use as follows.
[System.Windows.Markup.ContentProperty("Time")]
public class Clock : Control {
public DateTime Time{
}
}
Hence the xaml looks like
<MyControl:Clock >
4:30:34
</MyControl:Clock >
Thursday, June 21, 2007
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment