Touchscreen scrolling with c#?

Working on implementing a group of sprites that will move up and down with touch scrolling. I have never attempted anything like this in my life, so I don’t know where to start and I haven’t found anything useful online. Are there any useful libraries that will handle the meat of it? Or does anybody have clues on how I’d code that functionality?

One way is to use a camera. When you move your finger up or down, you reposition the camera in the game world.

I have this tutorial which is indirectly related: Infinite background shader - Learn MonoGame

The code you want should look something like this:

Vector2 _xy = Vector2.Zero;
Vector2 _dragAnchor = Vector2.Zero;
bool _isDragged = false;
SpriteBatch _s;

private Matrix GetView() {
    return Matrix.CreateTranslation(-_xy.X, -_xy.Y, 0f);
}

protected override void Update(GameTime gameTime) {
    TouchCollection tc = TouchPanel.GetState();
    if (tc.Count > 0) {
        TouchLocation tl = tc[0];

        Vector2 _touchWorld = Vector2.Transform(tl.Position, Matrix.Invert(GetView()));

        if (TouchLocationState.Pressed == tl.State) {
            _dragAnchor = _touchWorld;
            _isDragged = true;
        }
        if (_isDragged && TouchLocationState.Moved == tl.State) {
            _xy.Y += _dragAnchor.Y - _touchWorld.Y;
            _touchWorld = _dragAnchor;
        }
        if (_isDragged && TouchLocationState.Released == tl.State) {
            _isDragged = false;
        }
    }

    base.Update(gameTime);
}

protected override void Draw(GameTime gameTime) {
    GraphicsDevice.Clear(Color.Black);

    _s.Begin(transformMatrix: GetView());

    // Draw your sprites.

    _s.End();

    base.Draw(gameTime);
}