Click here to Skip to main content
15,901,373 members

Comments by fct2004 (Top 13 by date)

fct2004 19-May-12 14:59pm View    
This sounds like it might have a chance of working. I know you can't place the actual Canvas at multiple locations at once, because the visual tree will only allow it to have one parent. Yet, two images (not Images) of the Canvas and its contents, sounds like it might work. You might have a bit of trouble interacting with it on a GUI level.
fct2004 1-Apr-12 7:26am View    
I don't know of anything that can make this run faster in parallel code. A normal for loop is about the fastest this is going to get for two reasons.

1. There is more overhead in a parallel loop than a normal loop.
2. Writing to the same console in parallel won't speed it up because we are being limited by the I/O stream, not the CPU.

If you were doing actual computation inside the body of the loop, we might be able to help you speed it up by running the loops in parallel.

The sort answer is no. You cannot speedup the body of this specific loop by running it in parallel.
fct2004 31-Mar-12 23:04pm View    
Line objects have an X1, X2, Y1, and Y2 properties. I had to do this for work, and using those properties to set the endpoints of the line worked pretty well. I have to warn anything in the negatives might not be visible because a lot of controls don't render things that are outside of them. And, you might want to increase the width and height of the canvas a bit.
fct2004 31-Mar-12 22:51pm View    
1. Do you want to add a new control every-time a button gets clicked?
2. Are there any controls you want to remove when a button gets clicked?
3. Are you saying you have different controls, and the one that gets added is dependent on which button is clicked?
fct2004 31-Mar-12 22:46pm View    
Do any of those properties lead to things like images because that can really slow things down. Are you doing anything that may disable UI virtualization? Why aren't you binding it an ObservableCollection?