Frame independent camera dragging

I am trying to implement camera dragging functionality and smooth camera sliding that happens when player releases mouse button. My code works, but the problem is that I can’t figure it out how to make it frame independent. At 60fps it works great but at unlocked frame rate camera does not move at all.

private MouseInput mouse;
        private Vector2 mouseDelta;
        private Vector2 lastMousePosition;
        private bool enableMouseDragging;
        private void UpdateMouse(GameTime gameTime)
            if (mouse.IsDown(MouseButton.Middle) && !enableMouseDragging)
                enableMouseDragging = true;
            else if (!mouse.IsDown(MouseButton.Middle) && enableMouseDragging)
                enableMouseDragging = false;

            if (enableMouseDragging)
                var delta = lastMousePosition - mouse.Position;
                Position += delta;

                if (delta != Vector2.Zero)
                    mouseDelta = delta;
                if (mouseDelta != Vector2.Zero)
                    Position += mouseDelta * (float)gameTime.ElapsedGameTime.TotalSeconds;
                    mouseDelta = Vector2.LerpPrecise(mouseDelta, new Vector2(0f, 0f), 0.08f * (float)gameTime.ElapsedGameTime.TotalSeconds);

            lastMousePosition = mouse.Position;

Someone sugested to use:

mouseDelta = Vector2.LerpPrecise(mouseDelta, new Vector2(0f, 0f), 1.0f - Mathf.Pow(Smoothing, DeltaTime));


if (delta != Vector2.Zero)
mouseDelta = delta / (float)gameTime.ElapsedGameTime.TotalSeconds;

But it’s still not perfect.

Try: ElapsedGameTime.TotalMilliseconds

Tried it before, but it’s not working.

Put breakpoint and check values ‘mouseDelta’ and ‘delta’

And still. Perhaps it is necessary to replace:

0.08f * (float)gameTime.ElapsedGameTime.TotalSeconds
0.00008f * (float)gameTime.ElapsedGameTime.TotalMilliseconds