From 8ea3cb8759b9dde67b6f54bcf1fa4677d8db2a08 Mon Sep 17 00:00:00 2001 From: Morten Nielsen Date: Wed, 29 Jul 2020 13:24:05 -0700 Subject: [PATCH] show int[] as comma separated values --- src/SampleApp.WinDesktop/GsaControl.xaml | 2 +- src/SampleApp.WinDesktop/GsaControl.xaml.cs | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/SampleApp.WinDesktop/GsaControl.xaml b/src/SampleApp.WinDesktop/GsaControl.xaml index 0096744..e955509 100644 --- a/src/SampleApp.WinDesktop/GsaControl.xaml +++ b/src/SampleApp.WinDesktop/GsaControl.xaml @@ -12,7 +12,7 @@ - + diff --git a/src/SampleApp.WinDesktop/GsaControl.xaml.cs b/src/SampleApp.WinDesktop/GsaControl.xaml.cs index 5acab7e..0c4bd8b 100644 --- a/src/SampleApp.WinDesktop/GsaControl.xaml.cs +++ b/src/SampleApp.WinDesktop/GsaControl.xaml.cs @@ -33,6 +33,11 @@ namespace SampleApp.WinDesktop } public static readonly DependencyProperty MessageProperty = - DependencyProperty.Register(nameof(Message), typeof(Gsa), typeof(GsaControl), new PropertyMetadata(null)); - } + DependencyProperty.Register(nameof(Message), typeof(Gsa), typeof(GsaControl), new PropertyMetadata(null, (d, e) => ((GsaControl)d).OnGsaPropertyChanged(e))); + + private void OnGsaPropertyChanged(DependencyPropertyChangedEventArgs e) + { + vehicles.Value = string.Join(",", Message?.SatelliteIDs); + } + } }