简体   繁体   中英

WP7 Binding a value itself

If I have

<SomeTag x:Key="Name">AVALUE</SomeTag>

How to bind SomeTag? I need to set AVALUE from binding, I want to make something like we use on Styles:

<Setter Property="Name" Value="AVALUE"/>

so I could set instead of AVALUE -> {Binding ....}

It must be something simple, but I don't know what.

Like this?

<SomeTag x:Key="Name" Content="{Binding SomeProperty}" />

The default property for the content between the start and end tag, is Content . But it could be a different property (like Text for most FlowDocument elements).

The documentation should tell you so.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM