Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8104637
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T23:54:29+00:00 2026-06-05T23:54:29+00:00

in my app, a canvas moves when i move my handRigth (kinect SDK), I

  • 0

in my app, a canvas moves when i move my handRigth (kinect SDK), I need to create a method (C#, Wpf)that allows me to store the coordinates of Y (arrayList of 100 positions). this method content:

alLastCoor_HandRight.Add(dYpuntero); //ArrayList, dYpuntero=Position
if (alLastCoor_HandRight.Count > 100)// Limit ArrayList 100 positions
alLastCoor_HandRight.RemoveAt(0);

and each time enter the method, store 100 positions of Y canvas position.
How can i do that ??

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T23:54:31+00:00Added an answer on June 5, 2026 at 11:54 pm

    First of all, never use ArrayLists as they do the same thing as Lists only less efficiently (see ArrayList vs List<object>). The way I would do this is by having a Boolean to decide if the count was greater than 100 or less than 100 like this:

        private bool HasLessThan100(List<double> list)
        {
            if (list.Count <= 100) return true;
    
            if (list.Count > 100) return false;
    
            return false;
        }
    

    Then for your method, call it like this:

        private void MoveCanvas(List<double> list, double dYpuntero)
        {
            if (HasLessThan100(list))
            {
                list.Add((double)dYpuntero);
            }
    
            else return;
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Everyone, I have a WPF app that has a canvas that I have wrapped
I am currently working on an app that allows for free-drawing. The current method
I am building a FB canvas app that has share functionality, my plan is
I'm trying to have a WPF canvas with rounded rectangles on that I can
I just create a app for writing the text on Screen using TouchEvent method.
I've got a Rails app that's running in an iframe in a canvas app
I have a Facebook canvas app. I am using the JS SDK to authenticate
I am working with facebook app canvas which requires post. I am using express
I have an app (facebook canvas app, facebook displays the app in an iframe)
I have an iPad 2 canvas app (game) and would like to get it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.