public IncidentIcon(IncidentModel incident, bool menuVisible = false) { InitializeComponent(); Incident = incident; if (Incident.IsHighPriority) { PriorityIconStoryboard.Begin(); } var visibility = Incident.IsHighPriority ? Visibility.Visible : Visibility.Collapsed; PriorityImage.Visibility = BackEllipse.Visibility = PulseEllipse.Visibility = visibility; IconImage.Source = Incident.IncidentPin; ButtonOne.Visibility = menuVisible ? Visibility.Visible : Visibility.Collapsed; IncidentTitle.Text = Incident.Title; IncidentDetails.Text = Incident.Description; IncidentLocation.Text = Incident.Address; }
public IncidentInfoIcon(IncidentModel incident, bool menuVisible = false) { InitializeComponent(); Incident = incident; if (Incident.IsHighPriority) { PriorityIconStoryboard.Begin(); } var visibility = Incident.IsHighPriority ? Visibility.Visible : Visibility.Collapsed; PriorityImage.Visibility = BackEllipse.Visibility = PulseEllipse.Visibility = visibility; SetIconImage(incident); ButtonOne.Visibility = menuVisible ? Visibility.Visible : Visibility.Collapsed; IncidentTitle.Text = Incident.Title; IncidentDetails.Text = Incident.Description; IncidentLocation.Text = Incident.Address; Header.Background = new SolidColorBrush(Incident.IncidentColor.ToMediaColor()); }