我确信之前已被问过,但我找不到答案。是否可以使用LongListSelector控件始终显示当前组的名称?就像在人员中心工作一样。
答案 0 :(得分: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;
}
}
答案 1 :(得分:0)
您可以将控件作为Windows Phone Toolkit的一部分