Tengo una clase de propiedades adjuntas:propiedades adjuntas como XAML Elementos
public static class XamlProps
{
#region Attached Properties
private static readonly DependencyProperty FooProperty = DependencyProperty.RegisterAttached(
"Foo",
typeof(string),
typeof(XamlProps),
null);
public static void SetFoo(DependencyObject obj, string action)
{
obj.SetValue(FooProperty, action);
}
}
Y utilizan estas propiedades en mi XAML:
<Border me:XamlProps.Foo="Foo to the Bar">
pero ahora quiero un valor mayor en este propiedad, por lo que me gustaría utilizarlo como un elemento:
<Border>
<me:XamlProps.Foo>Foo to the Bar</me:XamlProps.Foo>
</Border>
Pero ahora Silverlight no llama setFoo() nunca más. ¿Cómo hago que esto funcione?
En Windows Phone 7, si es importante.
Esto funcionó como un encanto. Muchas gracias – Hounshell
¿Hay alguna manera de envolver esto en un ? – Hounshell
No parece ser: http://stackoverflow.com/questions/4048223/silverlight-xaml-textblock-text-with-cdata-not-showing-up-at-runtime – Damian