mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-11 19:56:36 +08:00
查找与替换完成
This commit is contained in:
@@ -20,12 +20,15 @@ namespace AIStudio.Wpf.Mind.Controls
|
||||
/// </summary>
|
||||
[TemplatePart(Name = PART_DiagramControl, Type = typeof(DiagramControl))]
|
||||
[TemplatePart(Name = PART_ContentControl, Type = typeof(ContentControl))]
|
||||
[TemplatePart(Name = PART_SearchControl, Type = typeof(Border))]
|
||||
public partial class MindEditor : UserControl
|
||||
{
|
||||
public const string PART_DiagramControl = "PART_DiagramControl";
|
||||
public const string PART_ContentControl = "PART_ContentControl";
|
||||
public const string PART_SearchControl = "PART_SearchControl";
|
||||
private DiagramControl _diagramControl;
|
||||
private ContentControl _contentControl;
|
||||
private Border _searchborder;
|
||||
|
||||
private MindDiagramViewModel _diagramViewModel;
|
||||
|
||||
@@ -56,7 +59,16 @@ namespace AIStudio.Wpf.Mind.Controls
|
||||
_diagramControl.DataContext = _diagramViewModel;
|
||||
|
||||
_contentControl = GetTemplateChild(PART_ContentControl) as ContentControl;
|
||||
_contentControl.DataContext = _diagramViewModel;
|
||||
if (_contentControl != null)
|
||||
{
|
||||
_contentControl.DataContext = _diagramViewModel;
|
||||
}
|
||||
|
||||
_searchborder = GetTemplateChild(PART_SearchControl) as Border;
|
||||
if (_searchborder != null)
|
||||
{
|
||||
_searchborder.DataContext = _diagramViewModel;
|
||||
}
|
||||
|
||||
GetDataFunc = GetData;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user