With these controls you get an IP Address Text Box, IP Port Text Box and IP Connection Status Icon. These are all seperate controls to allow you to place them however you want. Combine them together for a complete IP connection control.
Controls | Description | Bindable Property |
---|---|---|
IpField | IP Address TextBox | string or byte[] |
IpPort | IP Port TextBox | ushort |
IpStatus | IP Connection Status | Connection Status |
-
Install the IPUserControls Nuget package
-
Add this to your SomeView.xaml namespace
xmlns:ip="clr-namespace:IPUserControls;assembly=IPUserControls.Wpf"
-
Access the IP controls by typing either or all of the commands
<ip:IpField />
<ip:IpPort />
<ip:IpStatus />
-
Setting up the View in XAML shown below. I use Prism and an MVVM design. For an example on how to bind to the ViewModel, see the Prototyping Prism project in this repository. It does basic binding to get the IP, Port and set connection status.