---
title: "Is there a way how can I disable listbox remembering last position?"  
description: "Is there a way how can I disable listbox remembering last position?"  
author: "marcel ethan"  
published: 2014-01-23  
updated: 2014-01-23  
canonical: https://www.mindstick.com/forum/1864/is-there-a-way-how-can-i-disable-listbox-remembering-last-position  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# Is there a way how can I disable listbox remembering last position?

Is there a way how can I [disable](https://www.mindstick.com/forum/12901/how-to-disable-enable-input-box-in-aspx-with-value-from-sql) [listbox](https://www.mindstick.com/articles/626/listbox-events-in-c-dot-net) remembering last position?

## Replies

### Reply by Pravesh Singh

Hi Marcel,\

The following code scrolls to the first item, when you navigate to the view:

```
protected override void OnNavigatedTo(NavigationEventArgs e){    var firstListBoxItem = listBox.Items.FirstOrDefault();    if(firstListBoxItem != null) listBox.ScrollIntoView(firstListBoxItem);}
```

You may extend it by e.g. checking whether you are actually navigation backwards by using if(e.NavigationMode == NavigationMode.Back) { ... }


---

Original Source: https://www.mindstick.com/forum/1864/is-there-a-way-how-can-i-disable-listbox-remembering-last-position

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
