WPF的Doxygen文档 [英] Doxygen Documentation for WPF
问题描述
我发现了一个或多或少的好解决方案。首先,您必须将文件扩展名添加到 FILE_PATTERNS ,所以* .xaml在我的情况。 Doxygen使用扩展来确定要使用的解析器。我猜默认是C.接下来你添加如下文档:
<! - >
/ ** \file
* \brief简要文件说明。
*
*更详细的文件描述。
* / - >
< ! - 和 - > 是xaml文件的注释部分。当Doxygen解析文件时,它会删除文档而不添加它。这就是为什么有一个> 来愚弄Doxygen解析器,注释已经完成了。我知道这是丑陋的,但最糟糕的是,我的描述在文档中丢失,但仍然可以在文件中。所以只要没有更好的做法,我会坚持下去。
I am currently in the process of creating a documentation for my C# code. I've done a lot of ordinary source code and set up doxygen to create HTML out of it. Finally I arrived at the UI which is done in WPF, so both XAML and source code. Now my question is, what is the best way to document these files? Comments are possible in XAML but not that useful as they cannot be nested. Also I don't know if Doxygen can possibly handle XAML documentation. So should everything be documented in the xaml.cs files?
I found a more or less good solution. At first, you have to add the file extension to FILE_PATTERNS, so *.xaml in my case. Doxygen uses the extension to determine what parser to use. I guess the default is C. Next you add your documentation like this:
<!-->
/** \file
* \brief A brief file description.
*
* A more elaborated file description.
*/ -->
The < !-- and --> are the comment section for xaml files. When Doxygen parses the file it removes the documentation without adding it. That's why there is a > to fool the Doxygen parser that the comment is already finished. I know this is ugly but the worst that can happen is that my descriptions are lost in the documentation but still available in the files. So as long as there is no better way of doing it I will stick with this.
这篇关于WPF的Doxygen文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!