我正在寻找突出显示TextBlock内容的某些部分的方法。 由于大多数我找到建议写我自己的控制,从TextBlock继承,因为我不喜欢写我自己的额外功能一点一滴控制我试图把该funktionality在连接的解决方案行为,我很成功(所以我认为)。 这里是我的行为的代码: Public NotInheritable Class TextBlockHighlighting
Private
我正在使用How can I make a WPF combo box have the width of its widest element in XAML? 不像的问题,我在代码中创建组合框(工具栏)的后面描述的ComboBox的行为: private static ComboBox GetCombobox(ToolbarItemViewModel item)
{
va
我在How can I make a WPF combo box have the width of its widest element in XAML? public static void SetWidthFromItems(this ComboBox comboBox)
{
double comboBoxWidth = 19;// comboBox.DesiredSize.Wi