0

我确定以前有人问过,但我找不到答案。是否可以使用 LongListSelector 控件始终显示当前组的名称?就像它在人员中心工作一样。

4

2 回答 2

1

这只是一个片段。请根据需要进行修改。

var transform = llstItems.TransformToVisual(Application.Current.RootVisual);
Point pointTarget = transform.Transform(new Point(0, 0));
pointTarget.X += 5;
pointTarget.Y += 6;
List<UIElement> elements = (List<UIElement>)VisualTreeHelper.FindElementsInHostCoordinates(pointTarget, Application.Current.RootVisual);
if (elements != null && elements.Count > 0)
{
    TextBlock textGroupedHeader = elements[0] as TextBlock;
    if (textGroupedHeader != null)
    {
        Main.GroupTitle = textGroupedHeader.Text;
    }
}
于 2013-11-25T09:46:42.820 回答
0

您可以将控件作为 Windows Phone 工具包的一部分获取

https://nuget.org/packages/WPtoolkit

于 2013-02-14T12:06:12.703 回答