当用户按下回车键或插入文本时,RichTextBox会在行之间放置额外的空间,而这正是我想要摆脱的.我四处搜索,我找到的唯一合适的解决方案就是这个:
Setter SetParagraphMargin = new Setter();
SetParagraphMargin.Property = Paragraph.MarginProperty;
SetParagraphMargin.Value = new Thickness(0);
Style style = new Style();
style.TargetType = typeof(Paragraph);
style.Setters.Add(SetParagraphMargin);
rtb.Resources.Add("Style", style);
Run Code Online (Sandbox Code Playgroud)
但这仍然行不通.有没有人对我有任何提示?
我想遍历我在项目中添加的所有类
Assembly[] foo = AppDomain.CurrentDomain.GetAssemblies();
foreach(Assembly a in foo)
{
foreach(Type t in a.GetTypes())
{
}
}
Run Code Online (Sandbox Code Playgroud)
这是我尝试但我想排除.net提供的程序集,例如"mscorlib"