当前位置:编程学习 > C#/ASP.NET >>

WPF ListBox 取值问题

        <Style x:Key="ListBoxStyle" TargetType="{x:Type ListBox}">
            <Setter Property="ItemTemplate">
                <Setter.Value>
                    
                     <DataTemplate>
                            <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="30"/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>
                                
                                <TextBlock Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="4" FontWeight="Heavy" FontSize="18">
                                    <Hyperlink NavigateUri="C:\Documents and Settings\lll\My Documents\Visual Studio 2010\Projects\SearchWindows\SearchWindows\SearchPage.xaml" RequestNavigate="Hyperlink_RequestNavigate" Name="LinkTitle">
                                        <TextBlock Name="TitleName" Text="{Binding Title}"></TextBlock>
                                    </Hyperlink>
                                </TextBlock>
                            
                            <StackPanel Grid.Column="0" Grid.Row="1" Margin="20"  >
                                <ContentControl Content="{Binding Content,Converter={StaticResource HighlightWordConverter}}" FontSize="16" />
                            </StackPanel>
                        </Grid>

                    </DataTemplate> 
                    
                </Setter.Value>
            </Setter>

        </Style>

怎么去Hyperlink包含的Text啊,求高手指点。
补充:.NET技术 ,  .NET Framework
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,