Ejemplo n.º 1
0
        private static void OnRelativeChanged(DependencyObject sender,
                                              DependencyPropertyChangedEventArgs e)
        {
            Relative     newRelative = (Relative)e.NewValue;
            RelativeView view        = (RelativeView)sender;

            view.RelationshipType = newRelative.RelationshipType;
            view.FullName         = newRelative.FullName;
            view.BirthYear        = newRelative.BirthYear;
            view.BirthPlace       = newRelative.BirthPlace;
            view.WorkPlace        = newRelative.WorkPlace;
        }
Ejemplo n.º 2
0
        private static void OnCollapseButtonsChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
        {
            bool         newValue = (bool)e.NewValue;
            RelativeView view     = (RelativeView)sender;

            if (newValue)
            {
                view.DeleteButton.Visibility = Visibility.Collapsed;
                view.EditButton.Visibility   = Visibility.Collapsed;
            }
            else
            {
                view.DeleteButton.Visibility = Visibility.Visible;
                view.EditButton.Visibility   = Visibility.Visible;
            }
        }