文本框文本值很容易返回字符串值,但我无法返回文本块元素的文本值。 例如:我如何获得fxzz.Text?
<phone:LongListSelector x:Name="aaa" Margin="-20,-19,-18,157" LayoutMode="List" Background="#FFF9F9F9" BorderBrush="#FFE6E6E6" Foreground="#FF171717" FontSize="20">
<phone:LongListSelector.ItemTemplate >
<DataTemplate>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" >
<TextBlock x:Name="fxzz" VerticalAlignment="Center" HorizontalAlignment="Left" Text="{Binding name}" FontStyle="Normal" FontSize="24" FontFamily="Segoe UI Light" />
<Button x:Name="btn_Parse2" Click="btn_Parse2_Click" Content="folow" Tag="{Binding name}" HorizontalAlignment="Right" VerticalAlignment="Center" Width="150" Background="#FF0C43A2" Foreground="#FFE6E6E6" BorderBrush="{x:Null}" Height="Auto" FontFamily="Segoe UI Light" FontSize="20"/>
</StackPanel>
</DataTemplate>
</phone:LongListSelector.ItemTemplate>
</phone:LongListSelector>
我想用以下代码返回它:
textblock value --- button
textblock value --- button
textblock value --- button
textblock value --- button
textblock value --- button
textblock value --- button
当我点击按钮时,我想获得单个项目的值