Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WPF
  4. WPF Designer Crash

WPF Designer Crash

Scheduled Pinned Locked Moved WPF
csharphelpwpflearning
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mj2c
    wrote on last edited by
    #1

    I've been messing around with C# for about a year or so and I thought I'd have a look to see what WPF is all about. However I'm having a problem. Here's the problem - If I drag a control (Button, TextBox TextBlock ,whatever) and I try to access the FontFamily property in the Poperties window then the designer will crash with the following error - System.ArgumentException An item with the same key has already been added. at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at MS.Internal.FontFace.PhysicalFontFamily.ConvertDictionary(IDictionary`2 dictionary) at MS.Internal.FontFace.PhysicalFontFamily.MS.Internal.FontFace.IFontFamily.get_Names() at System.Windows.Media.FontFamily.get_FamilyNames() at MS.Internal.Services.WPFFontPlatformService.GetFontFamilyName(FontFamily fontFamily) at MS.Internal.Services.WPFFontPlatformService.GetSupportedFamilyNames() at MS.Internal.Designer.PropertyEditing.Editors.FontEditor.FontList.Refresh(EditingContext context) at MS.Internal.Designer.PropertyEditing.Editors.FontEditor.FontList.GetEnumerator() at MS.Internal.Data.EnumerableCollectionView.LoadSnapshotCore(IEnumerable source) at MS.Internal.Data.EnumerableCollectionView..ctor(IEnumerable source) at MS.Internal.Data.ViewManager.GetViewRecord(Object collection, CollectionViewSource cvs, Type collectionViewType, Boolean createView) at MS.Internal.Data.DataBindEngine.GetViewRecord(Object collection, CollectionViewSource key, Type collectionViewType, Boolean createView) at System.Windows.Data.CollectionViewSource.GetDefaultCollectionView(Object source, Boolean createView) at System.Windows.Data.CollectionViewSource.GetDefaultCollectionView(Object source, DependencyObject d) at System.Windows.Controls.ItemCollection.SetItemsSource(IEnumerable value) at System.Windows.Controls.ItemsControl.OnItemsSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e) at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e) at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args) at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean

    B 1 Reply Last reply
    0
    • M mj2c

      I've been messing around with C# for about a year or so and I thought I'd have a look to see what WPF is all about. However I'm having a problem. Here's the problem - If I drag a control (Button, TextBox TextBlock ,whatever) and I try to access the FontFamily property in the Poperties window then the designer will crash with the following error - System.ArgumentException An item with the same key has already been added. at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at MS.Internal.FontFace.PhysicalFontFamily.ConvertDictionary(IDictionary`2 dictionary) at MS.Internal.FontFace.PhysicalFontFamily.MS.Internal.FontFace.IFontFamily.get_Names() at System.Windows.Media.FontFamily.get_FamilyNames() at MS.Internal.Services.WPFFontPlatformService.GetFontFamilyName(FontFamily fontFamily) at MS.Internal.Services.WPFFontPlatformService.GetSupportedFamilyNames() at MS.Internal.Designer.PropertyEditing.Editors.FontEditor.FontList.Refresh(EditingContext context) at MS.Internal.Designer.PropertyEditing.Editors.FontEditor.FontList.GetEnumerator() at MS.Internal.Data.EnumerableCollectionView.LoadSnapshotCore(IEnumerable source) at MS.Internal.Data.EnumerableCollectionView..ctor(IEnumerable source) at MS.Internal.Data.ViewManager.GetViewRecord(Object collection, CollectionViewSource cvs, Type collectionViewType, Boolean createView) at MS.Internal.Data.DataBindEngine.GetViewRecord(Object collection, CollectionViewSource key, Type collectionViewType, Boolean createView) at System.Windows.Data.CollectionViewSource.GetDefaultCollectionView(Object source, Boolean createView) at System.Windows.Data.CollectionViewSource.GetDefaultCollectionView(Object source, DependencyObject d) at System.Windows.Controls.ItemCollection.SetItemsSource(IEnumerable value) at System.Windows.Controls.ItemsControl.OnItemsSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e) at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e) at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args) at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean

      B Offline
      B Offline
      BechBej
      wrote on last edited by
      #2

      Make sure to do not add more than one item with the same identifier or key

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups