Help! Update UI

proflo

New member
Feb 24, 2014
18
0
0
Hi,

is there anyway to update the UI more often than normal?
I want to get the position from different Rectangles in a Canvas.
But the values i get can't be right.

Best Regards Proflo
 
can u show some code ? what u already do ?
Canvas have always updated if u set it in code.
For specific update ui need use thread.
 
can u show some code ? what u already do ?
Canvas have always updated if u set it in code.
For specific update ui need use thread.

Here is my code which doesn't do what i want:

List<Rectangle> rects = new List<Rectangle>();

private void ThisManipulationDelta(object sender, System.Windows.Input.ManipulationDeltaEventArgs e)
{
moveTiles(0, e.DeltaManipulation.Translation.Y);
}

private void moveTiles(double x, double y)
{
double newTop, newLeft;
foreach (Rectangle t in rects)
{
newTop = Canvas.GetTop(t) + y;
newLeft = Canvas.GetLeft(t) + x;
if (newTop < 0)
{
newTop = 500;
}
Canvas.SetTop(t, newTop);
Canvas.SetLeft(t, newLeft);
}
}
 
Last edited:

Trending Posts

Members online

Forum statistics

Threads
341,703
Messages
2,264,780
Members
428,840
Latest member
Adverb_Man