I'm currently trying to fix this issue in the UI, where the pin drop alert is only showing half/ hidden on the screen: enter image description here
I added the center alignment/position in the XAML. My problem is how can I change this if condition and insert or modify the condition to add Center Alignment/Position.
> SmartAlertPins = new List<AnnotationData>();
int i = 0;
if (History?.AlertPins?.Count > 0)
{
foreach (var alert in History.AlertPins)
{
DateTime time = alert.DecisionLog == null ? (DateTime)uTCToDeviceTimeZoneConverter.Convert(alert.Time, null, null, CultureInfo.InvariantCulture) : (DateTime)uTCToDeviceTimeZoneConverter.Convert(alert.DecisionLog.UtcTimeStamp, null, null, CultureInfo.InvariantCulture);
History.AlertPins[i].TypeIcon = (string)alertTypeToImage.Convert(alert, null, null, CultureInfo.InvariantCulture);
History.AlertPins[i].Position = (time - History.History.Start).Hours <= 6 ? "Left" : "Right";
History.AlertPins[i].Alignment = alert.Value >= 4 ? "Bottom" : "Top";
if (alert.Reason == null || alert.Reason == "")
if (alert.Reason == null || alert.Reason == "")
History.AlertPins[i].Reason = _displayTextConverter.Convert(History.AlertPins[i].AlertReason, null, "AlertCondition", CultureInfo.InvariantCulture).ToString();
if (alert.Action == null || alert.Action == "")
History.AlertPins[i].Action = _displayTextConverter.Convert(History.AlertPins[i].AlertAction, null, "AlertAction", CultureInfo.InvariantCulture).ToString();