相关疑难解决方法(0)

如何在Windows Phone 7中突出显示上下文相关搜索的结果?

我需要根据在windows phone 7的文本框中输入的文本突出显示搜索结果,

在此输入图像描述

通常的wpf代码在Windows Phone 7中不起作用.有人说如何在Windows Phone 7中实现这一点

实际上这是我用来填充联系人列表的xaml Listbox,

    <ListBox Name="ContactList" ItemsSource="{Binding}" Margin="14,85,14,28" Foreground="White" SizeChanged="ContactList_SizeChanged">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                        <Border BorderThickness="2" HorizontalAlignment="Left" VerticalAlignment="Center" BorderBrush="{StaticResource PhoneAccentBrush}" >
                            <Image Source="{Binding Converter={StaticResource ContactPictureConverter}}" Width="48" Height="48" Stretch="Fill" Name="img1" />
                        </Border>
                        <TextBlock Name="ContactResults" Text="{Binding Path=DisplayName, Mode=OneWay}" FontSize="{StaticResource PhoneFontSizeExtraLarge}" Margin="18,8,0,0" />
                    </StackPanel>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
        <TextBox Name="contactFilterString" Margin="0,0,0,528" TextChanged="contactFilterString_TextChanged" />
Run Code Online (Sandbox Code Playgroud)

C#代码,

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Net;
    using System.Windows;
    //using System.Windows.Controls;
    using System.Windows.Documents;
    using System.Windows.Input;
    using System.Windows.Media;
    using System.Windows.Media.Animation;
    using System.Windows.Shapes;
    using Microsoft.Phone.Controls; …
Run Code Online (Sandbox Code Playgroud)

c# xaml windows-phone-7

8
推荐指数
1
解决办法
1858
查看次数

标签 统计

c# ×1

windows-phone-7 ×1

xaml ×1