我有一个名字的组合框.我将框设置为可编辑,以便用户可以输入名称.我想要它,以便用户只能输入列表中已有的名称.当用户单击"保存"时,如果框中的框为空,则我希望该框显示红色验证边框.有没有办法做到这一点?
<ComboBox IsEditable="True"
Grid.Column="2"
Grid.Row="1"
Margin="5,3,0,0"
Text="{Binding Model.Number}"
ItemsSource="{Binding DList}"
SelectedItem="{Binding Model.Number}"
IsEnabled="{Binding EnableComboBox}"
VerticalAlignment="Top">
</ComboBox>
Run Code Online (Sandbox Code Playgroud) 我正在尝试获取有音频的进程列表。音量混合器中显示的进程。
目前我有:
var currentProcess = Process.GetProcesses();
foreach (Process Proc in currentProcess.Where(p => p.MainWindowHandle != IntPtr.Zero))
{
Console.WriteLine(Proc.ProcessName);
}
Run Code Online (Sandbox Code Playgroud)
哪个列表有窗口的应用程序,有没有办法进一步过滤它以仅显示音频进程?
谢谢你!