Beispiel #1
0
        private static void OnTitleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            string           value  = (string)e.NewValue;
            ProtectedTabItem parent = (ProtectedTabItem)d;

            parent.Title = value;
        }
Beispiel #2
0
        private static void OnIconChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            ImageSource      icon   = (ImageSource)e.NewValue;
            ProtectedTabItem parent = (ProtectedTabItem)d;

            parent.Icon = icon;
        }
Beispiel #3
0
        private static void OnPermissionNamePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            string           value  = (string)e.NewValue;
            ProtectedTabItem parent = (ProtectedTabItem)d;

            parent.PermissionName = value;
            if (VisibilityControl.GetWorkspacePermission(parent.PermissionName))
            {
                parent.Visibility = Visibility.Visible;
            }
            else
            {
                parent.Visibility = Visibility.Collapsed;
            }
        }