Use a regular DependencyProperty
in the Behavior
instead of an attached one, then you can do
<Button Command="{Binding ContactCommand}">
<i:Interaction.Behaviors>
<local:ContactCommandBehavior ResourceKey="blah"/>
</i:Interaction.Behaviors>
</Button>
which is a much nicer syntax. Also, make sure the code you try to read these properties only AFTER OnAttached()
has ocurred.