Link to home
Start Free TrialLog in
Avatar of Juan Giraldo
Juan Giraldo

asked on

Refreshing WPF applications and Serial Ports.

I need to refresh a serial port connection in case it randomly closes. I seem to only be able to refresh it if I refresh my WPF application.
I have two questions.
1.)Using c# code how do i refresh a wpf application? something like this.Refresh() in windows forms.
2.) using c# code how do I refresh a serial port connection?

regards.
Avatar of David Favor
David Favor
Flag of United States of America image

Likely best to break this up into 2x distinct questions + then post the code you have now + error codes returned.

Keep in mind, the answers to your questions depend on the context of your exact code.

You'll also require very clear descriptions of what you're asking.

For example, there is no common definition of what "refresh a serial port connection" might mean.

This is where your Application code + clear descriptions come into play.

I know what "refresh a serial port connection" means to me + no clue what it means to you... or in the context of your application code...

This may also relate to your specific hardware, as even clearing i/o registers may be very different, depending on hardware being used.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.