mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-01 22:56:35 +08:00
修复一个多选框的bug
This commit is contained in:
@@ -9,7 +9,6 @@
|
||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
|
||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
|
||||
<Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
|
||||
<Setter Property="IsSynchronizedWithCurrentItem" Value="True"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="ComboBox">
|
||||
|
||||
@@ -100,6 +100,8 @@ namespace AIStudio.Wpf.DiagramHelper.Controls
|
||||
{
|
||||
MultiSelectComboBox control = (MultiSelectComboBox)d;
|
||||
control.DisplayInControl();
|
||||
control.SelectNodes();
|
||||
control.SetText();
|
||||
}
|
||||
|
||||
private static void OnSelectedItemsChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
@@ -238,13 +240,15 @@ namespace AIStudio.Wpf.DiagramHelper.Controls
|
||||
StringBuilder displayText = new StringBuilder();
|
||||
foreach (Node s in _nodeList)
|
||||
{
|
||||
if (s.IsSelected == true && s.Object.ToString() == "All")
|
||||
{
|
||||
displayText = new StringBuilder();
|
||||
displayText.Append("All");
|
||||
break;
|
||||
}
|
||||
else if (s.IsSelected == true && s.Object.ToString() != "All")
|
||||
//不使用ALl来显示
|
||||
//if (s.IsSelected == true && s.Object.ToString() == "All")
|
||||
//{
|
||||
// displayText = new StringBuilder();
|
||||
// displayText.Append("All");
|
||||
// break;
|
||||
//}
|
||||
//else
|
||||
if (s.IsSelected == true && s.Object.ToString() != "All")
|
||||
{
|
||||
displayText.Append(s.Object);
|
||||
displayText.Append(',');
|
||||
|
||||
Reference in New Issue
Block a user