Esempio n. 1
0
        private static void OnDescriptionChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            OccupationInfoUC occupationInfoUc = d as OccupationInfoUC;

            if (occupationInfoUc == null)
            {
                return;
            }
            // ISSUE: explicit reference operation
            string newValue = e.NewValue as string;

            occupationInfoUc.textBlockDescription.Text = newValue;
        }
Esempio n. 2
0
        private static void OnGroupImageChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            OccupationInfoUC occupationInfoUc = d as OccupationInfoUC;

            if (occupationInfoUc == null)
            {
                return;
            }
            // ISSUE: explicit reference operation
            string newValue = e.NewValue as string;

            if (!string.IsNullOrEmpty(newValue))
            {
                ImageLoader.SetUriSource(occupationInfoUc.imageGroup, newValue);
                ((UIElement)occupationInfoUc.imageGroup).Visibility = Visibility.Visible;
            }
            else
            {
                ImageLoader.SetUriSource(occupationInfoUc.imageGroup, "");
                ((UIElement)occupationInfoUc.imageGroup).Visibility = Visibility.Collapsed;
            }
        }