i'd like to get a control in resource. but it's difficult for me.
1. resource(xaml)
<Span x:Key="spanParagrahTitle" x:Shared="false">
<InlineUIContainer BaselineAlignment="Center">
<dgWPFCtrl:IconButton x:Name="ibtnAddToFavorite" Cursor="Hand" IsPressible="True"/>
<InlineUIContainer BaselineAlignment="Center">
</Span>
2. code
Span myTitle = (Span)appRes["spanParagrahTitle"];
IconButton ibtnAddToFavorite = (IconButton)myTitle.FindName("ibtnAddToFavorite");
How can I get control ibtnAddToFavorite in xaml? of cause, FindName was failed. (It returns null.)
ps. IconButton is User Control.