show int[] as comma separated values

This commit is contained in:
Morten Nielsen 2020-07-29 13:24:05 -07:00
parent bd268d9e64
commit 8ea3cb8759
2 changed files with 8 additions and 3 deletions

View file

@ -12,7 +12,7 @@
</Border>
<local:KeyValuePairControl Header="GPS Mode: " Value="{Binding Mode}"/>
<local:KeyValuePairControl Header="Fix Mode: " Value="{Binding Fix, Mode=OneTime}" />
<local:KeyValuePairControl Header="Satellite vehicles: " Value="{Binding SatelliteIDs, Mode=OneTime}" />
<local:KeyValuePairControl Header="Satellite vehicles: " x:Name="vehicles" />
<local:KeyValuePairControl Header="HDOP: " Value="{Binding Hdop, Mode=OneTime}" />
<local:KeyValuePairControl Header="VDOP: " Value="{Binding Vdop, Mode=OneTime}" />
<local:KeyValuePairControl Header="PDOP: " Value="{Binding Pdop, Mode=OneTime}" />

View file

@ -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);
}
}
}