Tag cloud in WPF

2019-06-05 01:16发布

问题:

Anyone knows how to create one? I know this question has been asked before but there was no answer and the provided link was a dead end.

EDIT

The project I found but couldn't make it work is this: http://alanle.com/wp-content/uploads/2009/12/WPFTagCloud.zip

The errors I get are

  1. “Assembly must be specified for XAML files that are not part of a project. Reopen this XAML file after adding it to a project, close this file and reopen it using the project it is associated with, or modify the clr-namespace to include the name of the assembly.”
  2. “The type ‘local:CountToFontSizeConverter’ was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built.”

If someone can run it and knows how to fix it that would be great. Thanks

回答1:

Take a look at this blog post.

After looking at the code in this blog post (just close the authenticate box that pops up) it looks correct. The basic idea is to bind the font size as well as the text, and calculate the font size based on the number of occurrences.



回答2:

A simple bing search came up with this: Building a WPF Tag Cloud.



标签: wpf tag-cloud