Click here to Skip to main content
15,924,193 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Create event in UserControl Pin
Mark Salsbery2-Jul-11 6:19
Mark Salsbery2-Jul-11 6:19 
GeneralRe: Create event in UserControl Pin
jadughar3-Jul-11 22:15
jadughar3-Jul-11 22:15 
QuestionTwo-way binding requires Path or XPath error Pin
SledgeHammer0130-Jun-11 6:46
SledgeHammer0130-Jun-11 6:46 
AnswerRe: Two-way binding requires Path or XPath error Pin
Pete O'Hanlon30-Jun-11 6:56
mvePete O'Hanlon30-Jun-11 6:56 
GeneralRe: Two-way binding requires Path or XPath error Pin
SledgeHammer0130-Jun-11 7:08
SledgeHammer0130-Jun-11 7:08 
GeneralRe: Two-way binding requires Path or XPath error Pin
SledgeHammer0130-Jun-11 9:20
SledgeHammer0130-Jun-11 9:20 
QuestionRuntime Error 4008... Layout Cycle Detected... Layout Could Not Complete. Pin
NTheOne30-Jun-11 1:59
NTheOne30-Jun-11 1:59 
AnswerRe: Runtime Error 4008... Layout Cycle Detected... Layout Could Not Complete. Pin
Pete O'Hanlon30-Jun-11 2:34
mvePete O'Hanlon30-Jun-11 2:34 
This means that you have put too many user controls on the page for the render cycle to complete. It has been upper bounded so that "pathological" (thanks to Microsoft's Rob Relyea for using this term) bounds don't come into play. Basically, the layout has been bounded so that the layout cycle doesn't complete because the layout size is changing.

Rob Relyea has this to say (citing textboxes as an example):

"Layout uses while loops, and the loops need some sort of upper bound on them so that they don’t loop forever in pathological conditions. An example of a pathological condition is if foo’s size is changed in the foo.SizeChanged event handler. There are a number of ways that a layout loop counter can be “used up” legitimately, such as doing anything to invalidate measure during an arrange call, invalidating measure or arrange during a SizeChanged or LayoutUpdated handler (even if a pathological condition is avoided), etc. The TextBox control is doing something to “use up” a layout loop iteration. Since the layout cycle detection is triggered at 250 iterations, under ideal circumstances, you can measure/arrange at most ~250 TextBoxes at once. It has nothing to do with frame rate, the hardware, the browser, etc. It also doesn’t matter how many TextBoxes you have in total, just how many you are laying out in one frame. This is most critical at startup time, when if you have > 250 visible TextBoxes in the tree, you will get a layout cycle. You will also have problems any other time you add > 250 visible TextBoxes, or if you have somehow incrementally added TextBoxes in groups so that you have gotten away with having more than 250, but all TextBoxes layout has been invalidated at once, such as by resizing the browser. You can have as many collapsed TextBoxes on the screen as you want—layout just skips over collapsed controls. Also, if you add the TextBoxes incrementally, and somehow manage them so that they won’t all get invalidated at once (e.g. by putting them in parent containers that won’t ever be resized) you should be OK."

Forgive your enemies - it messes with their heads


My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility


QuestionIs this possible with HierarchicalDataTemplates? Pin
SledgeHammer0129-Jun-11 11:47
SledgeHammer0129-Jun-11 11:47 
QuestionShift path Pin
Lutosław27-Jun-11 22:37
Lutosław27-Jun-11 22:37 
AnswerRe: Shift path Pin
Mark Salsbery28-Jun-11 10:21
Mark Salsbery28-Jun-11 10:21 
GeneralRe: Shift path Pin
Lutosław28-Jun-11 10:48
Lutosław28-Jun-11 10:48 
GeneralRe: Shift path Pin
Mark Salsbery28-Jun-11 10:59
Mark Salsbery28-Jun-11 10:59 
QuestionHow to keep two Combo Boxes in sync with WPF [modified] Pin
Member 297299227-Jun-11 9:42
Member 297299227-Jun-11 9:42 
AnswerRe: How to keep two Combo Boxes in sync with WPF Pin
SledgeHammer0127-Jun-11 11:22
SledgeHammer0127-Jun-11 11:22 
AnswerRe: How to keep two Combo Boxes in sync with WPF Pin
Mycroft Holmes27-Jun-11 12:59
professionalMycroft Holmes27-Jun-11 12:59 
Question[SOLVED] Child Window Not Working Properly Pin
AmbiguousName27-Jun-11 0:48
AmbiguousName27-Jun-11 0:48 
AnswerRe: Child Window Not Working Properly Pin
Mycroft Holmes27-Jun-11 1:15
professionalMycroft Holmes27-Jun-11 1:15 
AnswerRe: Child Window Not Working Properly Pin
AmbiguousName27-Jun-11 1:17
AmbiguousName27-Jun-11 1:17 
QuestionHow click more that visible row in DataGrid Pin
tâzn27-Jun-11 0:09
tâzn27-Jun-11 0:09 
AnswerRe: How click more that visible row in DataGrid Pin
Mycroft Holmes27-Jun-11 1:17
professionalMycroft Holmes27-Jun-11 1:17 
GeneralRe: How click more that visible row in DataGrid Pin
tâzn27-Jun-11 5:22
tâzn27-Jun-11 5:22 
GeneralRe: How click more that visible row in DataGrid Pin
Mycroft Holmes27-Jun-11 12:54
professionalMycroft Holmes27-Jun-11 12:54 
QuestionAny way to copy / clone XAML resources? Pin
SledgeHammer0124-Jun-11 18:17
SledgeHammer0124-Jun-11 18:17 
AnswerRe: Any way to copy / clone XAML resources? Pin
SledgeHammer0124-Jun-11 18:30
SledgeHammer0124-Jun-11 18:30 

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.