风光大葬
This commit is contained in:
@@ -103,6 +103,32 @@ namespace Ramitta
|
||||
AddNode(node, parent);
|
||||
return node;
|
||||
}
|
||||
|
||||
public RadioButtonTreeNode AddRadioButtonNode(string text, string? tag = null,string? GroupName = null, bool isChecked = false, TreeNode? parent = null)
|
||||
{
|
||||
|
||||
var RadioButton = new RadioButton()
|
||||
{
|
||||
Visibility = Visibility.Visible,
|
||||
|
||||
GroupName = GroupName,
|
||||
IsChecked = isChecked,
|
||||
Content = text,
|
||||
Tag = tag ?? text,
|
||||
ToolTip = tag ?? text,
|
||||
Foreground = Brushes.White,
|
||||
VerticalAlignment = VerticalAlignment.Center
|
||||
};
|
||||
|
||||
var node = new RadioButtonTreeNode
|
||||
{
|
||||
Text = text,
|
||||
obj = RadioButton
|
||||
};
|
||||
|
||||
AddNode(node, parent);
|
||||
return node;
|
||||
}
|
||||
public ComboboxTreeNode AddComboboxNode(string text, List<string>? items = null, TreeNode? parent = null)
|
||||
{
|
||||
var combobox = new ComboBox()
|
||||
@@ -598,5 +624,23 @@ namespace Ramitta
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class RadioButtonTreeNode : TreeNode
|
||||
{
|
||||
private RadioButton _obj;
|
||||
|
||||
public RadioButton obj
|
||||
{
|
||||
get => _obj;
|
||||
set
|
||||
{
|
||||
if (_obj != value)
|
||||
{
|
||||
_obj = value;
|
||||
OnPropertyChanged(nameof(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
Reference in New Issue
Block a user