我有以下的XAML(XAML)
<ListBox Name="feedListBox" Height="468" HorizontalAlignment="Left" Margin="20,100,0,0" VerticalAlignment="Top" Width="444" ScrollViewer.VerticalScrollBarVisibility="Auto" SelectionChanged="feedListBox_SelectionChanged" DataContext="{Binding Source={StaticResource MyData}}">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel VerticalAlignment="Top">
<TextBlock TextDecorations="Underline" FontSize="24" Name="feedTitle" TextWrapping="Wrap" Margin="12,0,0,0" HorizontalAlignment="Left" Foreground="{StaticResource PhoneAccentBrush}" Text="{Binding Title.Text, Path=Arabic , Converter={StaticResource RssTextTrimmer}}" />
<TextBlock Name="feedSummary" TextWrapping="Wrap" Margin="12,0,0,0" Text="{Binding Summary.Text, Converter={StaticResource RssTextTrimmer}}" />
<TextBlock Name="feedPubDate" Foreground="{StaticResource PhoneSubtleBrush}" Margin="12,0,0,10" Text="{Binding PublishDate.DateTime}" />
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
现在我有了这个目标
crAr = new Arabic.Controls.ArabicShape();
我想在 XAML 的每一个元素上应用“ 显示阿拉伯语” 方法 :
///// FeedTitle TextBlock
{TextBlock ELEMENT content} = crAr.DisplayArabic( {TextBlock ELEMENT content} );
///// FeedSummary TextBlock
{TextBlock ELEMENT content} = crAr.DisplayArabic( {TextBlock ELEMENT content} );
///// FeedPubDate TextBlock
{TextBlock ELEMENT content} = crAr.DisplayArabic( {TextBlock ELEMENT content} );
这怎么可能写在C##?