A basic mutable implementation of an IPortStyle, 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 UIElementPortStyle : UIElementStyle<IPort>, IUIElementPortStyle, IUIElementStyle<IPort>, ITaggedStyleBase<IPort>, IPortStyle, IVisualStyle<IPort>, IModelItemInstaller<IPort>, ICloneable |
| Visual Basic |
|---|
<ObfuscationAttribute(StripAfterObfuscation := False, Exclude := True, _ ApplyToMembers := False)> _ Public Class UIElementPortStyle _ Inherits UIElementStyle(Of IPort) _ Implements IUIElementPortStyle, IUIElementStyle(Of IPort), _ ITaggedStyleBase(Of IPort), IPortStyle, IVisualStyle(Of IPort), _ IModelItemInstaller(Of IPort), ICloneable |
Remarks
This style uses the WPF templating mechanisms
to create the visual appearance of IPorts in a CanvasControl.
The FrameworkElement that will be instanciated by the template will be assigned
an instance of UIElementPortStyleDataContext 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:UIElementPortStyle RenderSize="30.0,30.0"> <DataTemplate DataType="{x:Type y:UIElementPortStyleDataContext}"> <Border BorderThickness="2" CornerRadius="2" Background="Yellow"> <TextBlock Text="Port" HorizontalAlignment="Center" VerticalAlignment="Center"/> </Border> </DataTemplate> </y:UIElementPortStyle>
Inheritance Hierarchy
System..::..Object
yWorks.yFiles.UI.Drawing..::..UIElementStyle<(Of <(<'IPort>)>)>
yWorks.yFiles.UI.Drawing..::..UIElementPortStyle
yWorks.yFiles.UI.Drawing..::..UIElementStyle<(Of <(<'IPort>)>)>
yWorks.yFiles.UI.Drawing..::..UIElementPortStyle