I want to get Windows UpTime like the picture below

I am using NetFrameWork 3 I use this code to display UpTime for Windows
PerformanceCounter upTime = new PerformanceCounter("System", "System Up Time");
upTime.NextValue();
TimeSpan ts = TimeSpan.FromSeconds(upTime.NextValue());
UpTime.Text = "UpTime: " + ts.Days + ":" + ts.Hours + ":" + ts.Minutes + ":" + ts.Seconds;
But what I receive is fixed and does not update itself I want to change the uptime of Windows here at the same time please guide me
Your code looks good. The only thing missing is that you should call it periodically to update the UI.
Take a look at the example: https://learn.microsoft.com/en-us/dotnet/api/system.windows.threading.dispatchertimer?view=windowsdesktop-6.0
Important to note, since you want to update UI:
Your only slightly modified code might then look something like this: