private static void OnTitleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { string value = (string)e.NewValue; ProtectedTabItem parent = (ProtectedTabItem)d; parent.Title = value; }
private static void OnIconChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ImageSource icon = (ImageSource)e.NewValue; ProtectedTabItem parent = (ProtectedTabItem)d; parent.Icon = icon; }
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; } }