зеркало из https://github.com/stride3d/GraphX.git
+ Added new property GrphArea::ControlsDrawOrder which defines vertex or edges should be drawn topmost [WPF, METRO]
This commit is contained in:
Родитель
e650c3c29a
Коммит
1c2880cf2c
|
@ -20,6 +20,7 @@ DETAILED CHANGELOG:
|
|||
+ Added VertexShape::None enum option, currently affecting only VCP logic [ALL]
|
||||
+ Added different layout options to EfficientSugiyama algorithm using new Direction param [ALL]
|
||||
+ Added true orthogonal edge routing for EfficientSugiyama algorithm using EdgeRouting param [ALL]
|
||||
+ Added new property GrphArea::ControlsDrawOrder which defines vertex or edges should be drawn topmost [WPF, METRO]
|
||||
+ Fixed layout algorithm calculations to always receive actual vertex positions as input parameter
|
||||
This will fix VAESPS for default algorithms. [WPF, METRO]
|
||||
+ Fixed edge pointer positioning bug [METRO]
|
||||
|
|
|
@ -6,6 +6,7 @@ using Windows.UI.Xaml;
|
|||
using Windows.UI.Xaml.Controls;
|
||||
using Windows.UI.Xaml.Input;
|
||||
using Windows.UI.Xaml.Navigation;
|
||||
using GraphX.METRO.Controls;
|
||||
using GraphX.METRO.Controls.Animations;
|
||||
using GraphX.METRO.Controls.Models;
|
||||
using GraphX.PCL.Common.Enums;
|
||||
|
@ -41,6 +42,7 @@ namespace METRO.SimpleGraph
|
|||
graph.GenerateGraphFinished += OnFinishedLayout;
|
||||
graph.RelayoutFinished += OnFinishedLayout;
|
||||
graph.AlignAllEdgesLabels();
|
||||
graph.ControlsDrawOrder = ControlDrawOrder.EdgesOnTop;
|
||||
Loaded += MainPage_Loaded;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@ using System.Linq;
|
|||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
using GraphX;
|
||||
using GraphX.PCL.Common.Enums;
|
||||
using GraphX.WPF.Controls;
|
||||
using Microsoft.Win32;
|
||||
|
|
|
@ -33,6 +33,10 @@ namespace GraphX.WPF.Controls
|
|||
|
||||
#region My properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets in which order GraphX controls are drawn
|
||||
/// </summary>
|
||||
public ControlDrawOrder ControlsDrawOrder { get; set; }
|
||||
|
||||
public static readonly DependencyProperty LogicCoreProperty =
|
||||
DependencyProperty.Register("LogicCore", typeof(IGXLogicCore<TVertex, TEdge, TGraph>), typeof(GraphArea<TVertex, TEdge, TGraph>), new UIPropertyMetadata(null, logic_core_changed));
|
||||
|
@ -418,7 +422,9 @@ namespace GraphX.WPF.Controls
|
|||
_edgeslist.Add(edgeData, edgeControl);
|
||||
try
|
||||
{
|
||||
base.Children.Insert(num, edgeControl);
|
||||
if (ControlsDrawOrder == ControlDrawOrder.VerticesOnTop || num != 0)
|
||||
base.Children.Insert(num, edgeControl);
|
||||
else base.Children.Add(edgeControl);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
namespace GraphX.WPF.Controls
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines in which order GraphX controls are drawn
|
||||
/// </summary>
|
||||
public enum ControlDrawOrder
|
||||
{
|
||||
VerticesOnTop = 1,
|
||||
EdgesOnTop
|
||||
}
|
||||
}
|
|
@ -95,6 +95,7 @@
|
|||
<Compile Include="Behaviours\DragBehaviour.cs" />
|
||||
<Compile Include="Behaviours\HighlightBehaviour.cs" />
|
||||
<Compile Include="Controls\EdgePointers\EdgePointerPath.cs" />
|
||||
<Compile Include="Controls\Misc\ControlDrawOrder.cs" />
|
||||
<Compile Include="Controls\Misc\IVertexConnectionPoint.cs" />
|
||||
<Compile Include="Controls\VertexConnectionPoints\StaticVertexConnectionPoint.cs" />
|
||||
<Compile Include="Controls\EdgePointers\EdgePointerImage.cs" />
|
||||
|
|
|
@ -29,6 +29,11 @@ namespace GraphX.METRO.Controls
|
|||
|
||||
#region My properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets in which order GraphX controls are drawn
|
||||
/// </summary>
|
||||
public ControlDrawOrder ControlsDrawOrder { get; set; }
|
||||
|
||||
public static readonly DependencyProperty LogicCoreProperty =
|
||||
DependencyProperty.Register("LogicCore", typeof(IGXLogicCore<TVertex, TEdge, TGraph>), typeof(GraphArea<TVertex, TEdge, TGraph>), new PropertyMetadata(null, logic_core_changed));
|
||||
|
||||
|
@ -401,7 +406,9 @@ namespace GraphX.METRO.Controls
|
|||
_edgeslist.Add(edgeData, edgeControl);
|
||||
try
|
||||
{
|
||||
base.Children.Insert(num, edgeControl);
|
||||
if (ControlsDrawOrder == ControlDrawOrder.VerticesOnTop || num != 0)
|
||||
base.Children.Insert(num, edgeControl);
|
||||
else base.Children.Add(edgeControl);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
namespace GraphX.METRO.Controls
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines in which order GraphX controls are drawn
|
||||
/// </summary>
|
||||
public enum ControlDrawOrder
|
||||
{
|
||||
VerticesOnTop = 1,
|
||||
EdgesOnTop
|
||||
}
|
||||
}
|
|
@ -132,6 +132,7 @@
|
|||
<Compile Include="Controls\EdgePointers\EdgePointerPath.cs" />
|
||||
<Compile Include="Controls\GraphArea.cs" />
|
||||
<Compile Include="Controls\GraphAreaBase.cs" />
|
||||
<Compile Include="Controls\Misc\ControlDrawOrder.cs" />
|
||||
<Compile Include="Controls\Misc\IEdgeLabelControl.cs" />
|
||||
<Compile Include="Controls\Misc\IEdgePointer.cs" />
|
||||
<Compile Include="Controls\Misc\IPositionChangeNotify.cs" />
|
||||
|
|
Загрузка…
Ссылка в новой задаче