15,867,704 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by H. S. Masud (Top 4 by date)
H. S. Masud
24-Aug-11 13:23pm
View
Hi,
I found the reason and the solution to my problem. Initialliy I thought that setting text at the status bar TextBlock should not be the reason. You agreed on that too. But that's the reason to my problem. Not the funny ParameterizedThreadStart. Please read the solution I posted to this problem.
Thanks
H. S. Masud
22-Aug-11 0:59am
View
Sending message means invoking a delegate in UI thread and to set the text property to show message at the status bar. Nothing else.
"Invocation of the delegate which only sets some text in the UI should not affect scrolling of anything." This is the only reason I posted this question. If I don't set the message the ListBox doesn't scrolls. That surprised me. I gave the link of my complete code. Here it is once again http://mediaassistant.codeplex.com/SourceControl/changeset/changes/8705#.
I understand that it's difficult to download the complete code and compile and test it. But I gave this link because I could not re-create in a different project. Something else is happening when I update my UI which makes the ListBox scroll to top. It doesn't matter how did I update the UI. I'm interested to find that.
Thanks
H. S. Masud
21-Aug-11 13:35pm
View
The ListBox scrolls even if I make the Message property to NotifyPropertyChanged instead of using dependency property and change it from a background thread. I could not explain this behavior, that's why I posted this question to codeproject. If you know anything which would solve my problem or explain why it's happening the please let me know.
Thanks
H. S. Masud
21-Aug-11 13:16pm
View
Hi,
The action sets the message property of my status bar control which is a dependency property and it's bounded to a textblock. I used ParameterizedThreadStart to send a message to the action. Why it's so funny is not clear to me. It's a very simple solution to invoke an action to UI thread from another thread. You can have many other solution to this problem. I must have miss understood your answer because I could not found any solution to my problem. Let me explain my problem once again.
When I update anything to my status bar from a thread or show any wait screen my ListBox gets scrolled to top. I tried to re-create it from a simple wpf application where I used the same BeginInvoke method with same ParameterizedThreadStart and the same action. But I could not re-create it. The problem is why does the ListBox scrolled to top automatically when I execute a code which updates a textbox or displays a wait screen. It happens with ListView too.
Thanks