이 처리 할 수있는 방법 그러나 대한 기본 재산이 없다는 것을 수치를 찾아보십시오.
그래서 내가 무슨 짓을 :
private int CurrentSectionIndex = 0;
private HubSection CurrentSection
{
get { return this.Hub.SectionsInView[CurrentSectionIndex]; }
}
//Retrieve the ScrollViewer of the Hub control and handle the ViewChanged event of this ScrollViewer
public Page()
{
ScrollViewer sv = ControlHelper.GetChild<ScrollViewer>(this.Hub);
sv.ViewChanged += sv_ViewChanged;
}
//In the ViewChanged event handler body then calculate the index relative to the horizontal offset (means current position) of the ScrollViewer
void sv_ViewChanged(object sender, ScrollViewerViewChangedEventArgs e)
{
if(!e.IsIntermediate)
{
double ho = ControlHelper.GetChild<ScrollViewer>(this.Hub).HorizontalOffset;
if (ho >= CurrentSection.ActualWidth - (this.ActualWidth - CurrentSection.ActualWidth))
{
CurrentSectionIndex = (int)((ho + (this.ActualWidth - CurrentSection.ActualWidth))/CurrentSection.ActualWidth);
}
}
}
가 작동하는 것 같다하지만 여전히
어떻게 결합하려고 (알려) 테스트? 그것은 벡터입니다. 그리고 TextBloc에서 데이터를 바인딩 할 수 있음에도 불구하고 – Kamen