Click here to Skip to main content
15,912,207 members
Home / Discussions / WPF
   

WPF

 
QuestionBinding: Accept an empty string in enumeration [modified] Pin
Lutosław30-Jul-11 10:24
Lutosław30-Jul-11 10:24 
AnswerRe: Binding: Accept an empty string in enumeration Pin
teejayem30-Jul-11 12:23
teejayem30-Jul-11 12:23 
GeneralRe: Binding: Accept an empty string in enumeration Pin
Lutosław31-Jul-11 1:16
Lutosław31-Jul-11 1:16 
QuestionProblem with WPF and calling a WCF Web Service Pin
AndyCSharp29-Jul-11 5:54
AndyCSharp29-Jul-11 5:54 
AnswerRe: Problem with WPF and calling a WCF Web Service Pin
ToddHileHoffer29-Jul-11 7:46
ToddHileHoffer29-Jul-11 7:46 
QuestionListBox control with Button Items like apple iphone Pin
ISharda28-Jul-11 19:20
ISharda28-Jul-11 19:20 
QuestionAsynchronous Callback in WCF/Silverlight 4 application Pin
Parth Gandhi27-Jul-11 21:22
Parth Gandhi27-Jul-11 21:22 
AnswerRe: Asynchronous Callback in WCF/Silverlight 4 application Pin
Simon Bang Terkildsen27-Jul-11 23:24
Simon Bang Terkildsen27-Jul-11 23:24 
AnswerRe: Asynchronous Callback in WCF/Silverlight 4 application Pin
Abhinav S28-Jul-11 3:24
Abhinav S28-Jul-11 3:24 
QuestionCustom input for Silverlight DatePicker Pin
jadughar26-Jul-11 22:48
jadughar26-Jul-11 22:48 
AnswerRe: Custom input for Silverlight DatePicker Pin
Mycroft Holmes26-Jul-11 23:47
professionalMycroft Holmes26-Jul-11 23:47 
GeneralRe: Custom input for Silverlight DatePicker Pin
jadughar27-Jul-11 2:49
jadughar27-Jul-11 2:49 
AnswerRe: Custom input for Silverlight DatePicker Pin
Simon Bang Terkildsen27-Jul-11 22:21
Simon Bang Terkildsen27-Jul-11 22:21 
SuggestionRe: Custom input for Silverlight DatePicker Pin
Oludayo Alli16-Aug-11 2:10
Oludayo Alli16-Aug-11 2:10 
Answer[SOLVED]Re: Custom input for Silverlight DatePicker Pin
jadughar20-Sep-11 21:01
jadughar20-Sep-11 21:01 
QuestionHow to create a wpf application Pin
Naim_8626-Jul-11 20:02
Naim_8626-Jul-11 20:02 
AnswerRe: How to create a wpf application Pin
Mycroft Holmes26-Jul-11 23:25
professionalMycroft Holmes26-Jul-11 23:25 
QuestionAuto Scrolling to Bottom Pin
AmbiguousName26-Jul-11 20:01
AmbiguousName26-Jul-11 20:01 
AnswerRe: Auto Scrolling to Bottom Pin
Simon Bang Terkildsen27-Jul-11 22:39
Simon Bang Terkildsen27-Jul-11 22:39 
AnswerRe: Auto Scrolling to Bottom Pin
AmbiguousName28-Jul-11 1:45
AmbiguousName28-Jul-11 1:45 
AnswerRe: Auto Scrolling to Bottom Pin
SledgeHammer0128-Jul-11 5:08
SledgeHammer0128-Jul-11 5:08 
Of course it doesn't work Smile | :) . And I bet I know why...

I'm guessing your code looks something like:

private void SomeMethod()
{
AddItem();
AutoScrollToBottom();
}

right?? Smile | :) .

This is one of the things that annoys me about WPF and always throws newbies (sorry if you are not, just this is well known to experienced WPF guys) for a loop.

When you have an item based control (ListBox, ListView, TreeView, etc), items are not really inserted into the control right away. They are inserted at some random point in the future. So what happens is exactly what you are seeing... your code says insert item #10, then it says "scroll to the last item" which still happens to be item #9. Then item #10 happens to be inserted. So you are scrolling to the second to last item because that was really the last item when your code executed.

What you need to do is subscribe to the ItemContainerGenerator.StatusChanged event and wait for the status to be ContainerGenerated on the item you want. Only then can you scroll it into view.
QuestionMigration from RadScheduler to RadScheduleView Pin
Jeyakumarbics126-Jul-11 19:23
Jeyakumarbics126-Jul-11 19:23 
AnswerRe: Migration from RadScheduler to RadScheduleView Pin
Mycroft Holmes26-Jul-11 23:23
professionalMycroft Holmes26-Jul-11 23:23 
AnswerRe: Migration from RadScheduler to RadScheduleView Pin
Michał Zalewski31-Jul-11 2:39
Michał Zalewski31-Jul-11 2:39 
QuestionAppointmentCreate event in RadScheduleView Pin
Jeyakumarbics126-Jul-11 19:14
Jeyakumarbics126-Jul-11 19:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.