port from perforce
This commit is contained in:
102
intromat/NodeNetwork/Themes/EndpointGroupView.xaml
Normal file
102
intromat/NodeNetwork/Themes/EndpointGroupView.xaml
Normal file
@@ -0,0 +1,102 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:reactiveUi="http://reactiveui.net"
|
||||
xmlns:views="clr-namespace:NodeNetwork.Views"
|
||||
xmlns:viewModels="clr-namespace:NodeNetwork.ViewModels">
|
||||
<Style TargetType="{x:Type views:EndpointGroupView}">
|
||||
<Setter Property="Background" Value="#20000000"/>
|
||||
<Setter Property="Foreground" Value="#FFFFFF"/>
|
||||
<Setter Property="TitleFontFamily" Value="Segoe UI SemiLight"/>
|
||||
<Setter Property="TitleFontSize" Value="18"/>
|
||||
<Setter Property="IsTabStop" Value="False" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="views:EndpointGroupView">
|
||||
<Grid Margin="0,5,0,0">
|
||||
<Canvas Background="{TemplateBinding Background}" IsHitTestVisible="False"/>
|
||||
<StackPanel Orientation="Vertical">
|
||||
<DockPanel Margin="0,5,0,0">
|
||||
<TextBlock x:Name="NameLabel" TextTrimming="CharacterEllipsis" FontSize="{TemplateBinding TitleFontSize}" FontFamily="{TemplateBinding TitleFontFamily}"
|
||||
Foreground="{TemplateBinding Foreground}" VerticalAlignment="Center" Margin="20,0,10,0">
|
||||
<TextBlock.Style>
|
||||
<Style TargetType="TextBlock">
|
||||
<Style.Triggers>
|
||||
<Trigger Property="Text" Value="">
|
||||
<Setter Property="Visibility" Value="Collapsed" />
|
||||
</Trigger>
|
||||
<Trigger Property="Text" Value="{x:Null}">
|
||||
<Setter Property="Visibility" Value="Collapsed" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</TextBlock.Style>
|
||||
</TextBlock>
|
||||
</DockPanel>
|
||||
<DockPanel>
|
||||
<ItemsControl x:Name="InputsList" IsTabStop="False">
|
||||
<ItemsControl.Style>
|
||||
<Style TargetType="ItemsControl">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Path=EndpointsStackingOrientation, RelativeSource={RelativeSource AncestorType={x:Type views:NodeView}}}" Value="Vertical">
|
||||
<Setter Property="DockPanel.Dock" Value="Top" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Path=EndpointsStackingOrientation, RelativeSource={RelativeSource AncestorType={x:Type views:NodeView}}}" Value="Horizontal">
|
||||
<Setter Property="DockPanel.Dock" Value="Left" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ItemsControl.Style>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="viewModels:NodeInputViewModel">
|
||||
<reactiveUi:ViewModelViewHost ViewModel="{Binding}"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
VerticalContentAlignment="Stretch"
|
||||
IsTabStop="False" />
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
<ItemsControl x:Name="OutputsList" IsTabStop="False">
|
||||
<ItemsControl.Style>
|
||||
<Style TargetType="ItemsControl">
|
||||
<Style.Triggers>
|
||||
<DataTrigger
|
||||
Binding="{Binding Path=EndpointsStackingOrientation, RelativeSource={RelativeSource AncestorType={x:Type views:NodeView}}}"
|
||||
Value="Vertical">
|
||||
<Setter Property="DockPanel.Dock" Value="Bottom" />
|
||||
</DataTrigger>
|
||||
<DataTrigger
|
||||
Binding="{Binding Path=EndpointsStackingOrientation, RelativeSource={RelativeSource AncestorType={x:Type views:NodeView}}}"
|
||||
Value="Horizontal">
|
||||
<Setter Property="DockPanel.Dock" Value="Right" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ItemsControl.Style>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="viewModels:NodeOutputViewModel">
|
||||
<reactiveUi:ViewModelViewHost ViewModel="{Binding}"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
VerticalContentAlignment="Stretch"
|
||||
IsTabStop="False" />
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</DockPanel>
|
||||
<ItemsControl x:Name="EndpointGroupsList" IsTabStop="False">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="viewModels:EndpointGroupViewModel">
|
||||
<reactiveUi:ViewModelViewHost ViewModel="{Binding}"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
VerticalContentAlignment="Stretch"
|
||||
IsTabStop="False" />
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
|
||||
</Setter>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
Reference in New Issue
Block a user