@@ -103,18 +103,13 @@ private static void OnPageIndexChanged(DependencyObject d, DependencyPropertyCha
103103 /// </summary>
104104 private int _lastShowIndex ;
105105
106- /// <summary>
107- /// 跳转编号
108- /// </summary>
109- private int _jumpToIndex = - 1 ;
110-
111106 /// <summary>
112107 /// 页码
113108 /// </summary>
114109 public int PageIndex
115110 {
116111 get => ( int ) GetValue ( PageIndexProperty ) ;
117- internal set => SetValue ( PageIndexProperty , value ) ;
112+ set => SetValue ( PageIndexProperty , value ) ;
118113 }
119114
120115 /// <summary>
@@ -147,11 +142,6 @@ public override void OnApplyTemplate()
147142 _visualParent = GetTemplateChild ( ElementVisualParent ) as ModelVisual3D ;
148143
149144 UpdateShowRange ( ) ;
150- if ( _jumpToIndex > 0 )
151- {
152- PageIndex = _jumpToIndex ;
153- _jumpToIndex = - 1 ;
154- }
155145
156146 _point3DAnimation = new Point3DAnimation ( new Point3D ( CoverFlowItem . Interval * PageIndex , _camera . Position . Y , _camera . Position . Z ) , new Duration ( TimeSpan . FromMilliseconds ( 200 ) ) ) ;
157147 _camera . BeginAnimation ( ProjectionCamera . PositionProperty , _point3DAnimation ) ;
@@ -181,11 +171,6 @@ public void AddRange(IEnumerable<object> contentList)
181171 /// <param name="uri"></param>
182172 public void Add ( Uri uri ) => _contentDic . Add ( _contentDic . Count , uri ) ;
183173
184- /// <summary>
185- /// 跳转
186- /// </summary>
187- public void JumpTo ( int index ) => _jumpToIndex = index ;
188-
189174 protected override void OnMouseWheel ( MouseWheelEventArgs e )
190175 {
191176 base . OnMouseWheel ( e ) ;
@@ -237,6 +222,11 @@ private void Viewport3D_MouseLeftButtonDown(object sender, MouseButtonEventArgs
237222 /// <param name="newIndex"></param>
238223 private void UpdateIndex ( int newIndex )
239224 {
225+ if ( ! IsLoaded )
226+ {
227+ return ;
228+ }
229+
240230 UpdateShowRange ( ) ;
241231 _itemShowDic . Do ( item =>
242232 {
0 commit comments