当前位置:网站首页>How to make the listbox scroll automatically when adding a new item- How can I have a ListBox auto-scroll when a new item is added?
How to make the listbox scroll automatically when adding a new item- How can I have a ListBox auto-scroll when a new item is added?
2022-07-05 03:30:00 【Bustling city 】
problem :
I have a WPF ListBox that is set to scroll horizontally. I have one set to scroll horizontally WPF ListBox.The ItemsSource is bound to an ObservableCollection in my ViewModel class.ItemsSource Bound to my ViewModel Class ObservableCollection.Every time a new item is added, I want the ListBox to scroll to the right so that the new item is viewable. Every time you add a new item , I hope ListBox Scroll right , So that you can view new projects .
The ListBox is defined in a DataTemplate, so I am unable to access the ListBox by name in my code behind file.ListBox Is in DataTemplate As defined in , So I can't access by name in my code behind file ListBox.
How can I get a ListBox to always scroll to show a latest added item? How to make ListBox Always scroll to show newly added items ?
I would like a way to know when the ListBox has a new item added to it, but I do not see an event that does this. I want a way to know ListBox When a new item was added , But I don't see the event of this operation .
Solution :
Reference resources : https://stackoom.com/en/question/8Q2b边栏推荐
- PHP cli getting input from user and then dumping into variable possible?
- Basic authorization command for Curl
- El tree whether leaf node or not, the drop-down button is permanent
- [micro service SCG] 33 usages of filters
- Bumblebee: build, deliver, and run ebpf programs smoothly like silk
- The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
- Devtools的簡單使用
- Pdf things
- Usage scenarios and solutions of ledger sharing
- Kuboard
猜你喜欢

Sqoop命令
![[groovy] loop control (number injection function implements loop | times function | upto function | downto function | step function | closure can be written outside as the final parameter)](/img/45/6cb796364efe16d54819ac10fb7d05.jpg)
[groovy] loop control (number injection function implements loop | times function | upto function | downto function | step function | closure can be written outside as the final parameter)

Devtools的簡單使用

Use of kubesphere configuration set (configmap)

Share the newly released web application development framework based on blazor Technology

Leetcode92. reverse linked list II

Jd.com 2: how to prevent oversold in the deduction process of commodity inventory?

Apache build web host

Linux安装Redis

2021 Li Hongyi machine learning (3): what if neural network training fails
随机推荐
Acwing game 58 [End]
040. (2.9) relieved
Azkaban安装部署
Ask, does this ADB MySQL support sqlserver?
51 independent key basic experiment
VM in-depth learning (XXV) -class file overview
Pat class a 1160 forever (class B 1104 forever)
Asp+access campus network goods trading platform
Yyds dry goods inventory intelligent fan based on CC2530 design
Linux安装Redis
Returns the lowest common ancestor of two nodes in a binary tree
Azkaban概述
v-if VS v-show 2.0
Apache build web host
Single box check box
Mongodb common commands
Share the newly released web application development framework based on blazor Technology
The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
Delphi free memory
Class inheritance in C #