Reputation: 260
I'm sure it has been asked before, but i cant find the answer. Is it possible using the LongListSelector control to always show the name of the current group? Just like it works in the People hub.
Upvotes: 0
Views: 261
Reputation: 36
This is just a snippet. Please modify it as necessary.
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;
}
}
Upvotes: 1
Reputation: 139
You can get the control as part of the Windows Phone Toolkit
https://nuget.org/packages/WPtoolkit
Upvotes: 0