循環item
<ItemsPanelTemplate>
<CarouselPanel>
</ItemsPanelTemplate>
讓ScrollViewer一次只能滑動一個item
<ScrollViewer HorizontalSnapPointsType="MandatorySingle"/>
Get Xaml Template
.xaml
<Style>
...
<TextBlock x:Name="TB"/>
</Style>
.cs
override void OnApplyTemplate()
{
TextBlock _TB = (TextBlock)this.GetTemplateChild("TB");
}
"CallerMemberName"
protected void OnPropertyChanged([CallerMemberName] string propertyName = null)
{
var eventHandler = this.PropertyChanged;
if (eventHandler != null)
{
eventHandler(this, new PropertyChangedEventArgs(propertyName));
}
}
使ITEM不會re-load
ItemsPanel裡的 ItemsPanelTemplate -> VirtualizingStackPanel -> CleanUpVirtualizedItemEvent
沒有留言:
張貼留言