A basic mutable implementation of an IEdgeStyle, that is based on IUIElementStyle<(Of <(<'TModelItem>)>)>
Namespace: yWorks.yFiles.UI.DrawingAssembly: yWorks.yFilesWPF.Viewer (in yWorks.yFilesWPF.Viewer.dll) Version: 2.2.0.2 (2.2.0.2)
Syntax
| C# |
|---|
[ObfuscationAttribute(StripAfterObfuscation = false, Exclude = true, ApplyToMembers = false)] public class UIElementEdgeStyle : UIElementStyle<IEdge>, IUIElementEdgeStyle, IUIElementStyle<IEdge>, ITaggedStyleBase<IEdge>, IEdgeStyle, IVisualStyle<IEdge>, IModelItemInstaller<IEdge>, ICloneable |
| Visual Basic |
|---|
<ObfuscationAttribute(StripAfterObfuscation := False, Exclude := True, _ ApplyToMembers := False)> _ Public Class UIElementEdgeStyle _ Inherits UIElementStyle(Of IEdge) _ Implements IUIElementEdgeStyle, IUIElementStyle(Of IEdge), _ ITaggedStyleBase(Of IEdge), IEdgeStyle, IVisualStyle(Of IEdge), _ IModelItemInstaller(Of IEdge), ICloneable |
Remarks
This style uses the WPF templating mechanisms
to create the visual appearance of the IEdges segments in a CanvasControl.
The FrameworkElements that will be instanciated by the template for each
polyline segment will be assigned
an instance of UIElementEdgeStyleSegmentDataContext as the DataContext
so that data binding can be performed.
Examples
This example shows how this style can be used from within XAML.
CopyXML
<y:UIElementEdgeStyle SegmentWidth="5"> <DataTemplate > <y:UIElementEdgeStyle.PathStyle> <y:PolylineEdgeStyle> <y:PolylineEdgeStyle.Pen> <Pen Brush="Black" Thickness="5"/> </y:PolylineEdgeStyle.Pen> </y:PolylineEdgeStyle> </y:UIElementEdgeStyle.PathStyle> <DataTemplate DataType="{x:Type y:UIElementEdgeStyleSegmentDataContext}"> <Rectangle RadiusX="2.5" RadiusY="2.5" Margin="-2.5,0,-2.5,0"> <Rectangle.Fill> <LinearGradientBrush EndPoint="0.5, 0" StartPoint="0.5,1"> <GradientStop Color="#FFA6A1FF" Offset="0"/> <GradientStop Color="#FFCCD7FF" Offset="0.424"/> <GradientStop Color="#FFFFFFFF" Offset="0.464"/> <GradientStop Color="#FFFFFFFF" Offset="0.562"/> <GradientStop Color="#FFCCD7FF" Offset="0.607"/> <GradientStop Color="#FFA6A1FF" Offset="1"/> </LinearGradientBrush> </Rectangle.Fill> </Rectangle> </DataTemplate> </y:UIElementEdgeStyle>
Inheritance Hierarchy
System..::..Object
yWorks.yFiles.UI.Drawing..::..UIElementStyle<(Of <(<'IEdge>)>)>
yWorks.yFiles.UI.Drawing..::..UIElementEdgeStyle
yWorks.yFiles.UI.Drawing..::..UIElementStyle<(Of <(<'IEdge>)>)>
yWorks.yFiles.UI.Drawing..::..UIElementEdgeStyle