示例#1
0
        private static void OnDescriptionChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            CareerItemInfoUC careerItemInfoUc = d as CareerItemInfoUC;

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

            careerItemInfoUc.textBlockDescription.Text = newValue;
        }
示例#2
0
        private static void OnGroupImageChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            CareerItemInfoUC careerItemInfoUc = d as CareerItemInfoUC;

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

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