示例#1
0
        private static void OnPermitsEditChanged(DependencyObject source,
                                                 DependencyPropertyChangedEventArgs e)
        {
            SourceUC control = source as SourceUC;
            bool     permits = (bool)e.NewValue;

            if (!permits)
            {
                control.btnRemoveComment.Visibility = Visibility.Hidden;
            }
        }
示例#2
0
        private static void OnCanReorderChanged(DependencyObject source,
                                                DependencyPropertyChangedEventArgs e)
        {
            SourceUC control = source as SourceUC;
            bool     can     = (bool)e.NewValue;

            if (!can)
            {
                control.btnReposition.Visibility = Visibility.Collapsed;
            }
            else
            {
                control.btnReposition.Visibility = Visibility.Visible;
            }
        }