port from perforce
This commit is contained in:
175
intromat/NodeNetwork/Themes/NodeView.xaml
Normal file
175
intromat/NodeNetwork/Themes/NodeView.xaml
Normal file
@@ -0,0 +1,175 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:views="clr-namespace:NodeNetwork.Views"
|
||||
xmlns:controls="clr-namespace:NodeNetwork.Views.Controls"
|
||||
xmlns:viewModels="clr-namespace:NodeNetwork.ViewModels"
|
||||
xmlns:reactiveUi="http://reactiveui.net">
|
||||
<Style TargetType="{x:Type views:NodeView}">
|
||||
<Setter Property="Background" Value="#5D9CEC"/>
|
||||
<Setter Property="Foreground" Value="#FFFFFF"/>
|
||||
<Setter Property="TitleFontFamily" Value="Segoe UI Semibold"/>
|
||||
<Setter Property="TitleFontSize" Value="18"/>
|
||||
<Setter Property="BorderBrush" Value="Orange"/>
|
||||
<Setter Property="CornerRadius" Value="4"/>
|
||||
<Setter Property="ArrowSize" Value="20"/>
|
||||
<Setter Property="EndpointsStackingOrientation" Value="Vertical"/>
|
||||
<Setter Property="IsTabStop" Value="False"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="views:NodeView">
|
||||
<controls:FillPanel x:Name="Container">
|
||||
<VisualStateManager.VisualStateGroups>
|
||||
<VisualStateGroup Name="{x:Static views:NodeView.SelectedVisualStatesGroup}">
|
||||
<VisualState Name="{x:Static views:NodeView.SelectedState}">
|
||||
<Storyboard>
|
||||
<ThicknessAnimation Duration="0" To="-3"
|
||||
Storyboard.TargetName="Container" Storyboard.TargetProperty="Margin"/>
|
||||
<ThicknessAnimation Duration="0" To="3" Storyboard.TargetName="Border" Storyboard.TargetProperty="BorderThickness"/>
|
||||
</Storyboard>
|
||||
</VisualState>
|
||||
<VisualState Name="{x:Static views:NodeView.UnselectedState}">
|
||||
<Storyboard>
|
||||
<ThicknessAnimation Duration="0" To="0" Storyboard.TargetName="Container" Storyboard.TargetProperty="Margin"/>
|
||||
<ThicknessAnimation Duration="0" To="0" Storyboard.TargetName="Border" Storyboard.TargetProperty="BorderThickness"/>
|
||||
</Storyboard>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateManager.VisualStateGroups>
|
||||
|
||||
<Border x:Name="Border" Margin="10,0,10,0" CornerRadius="{TemplateBinding CornerRadius}"
|
||||
MinWidth="100" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}">
|
||||
<Grid>
|
||||
<Thumb VerticalAlignment="Bottom" Height="10" x:Name="ResizeVerticalThumb" Cursor="SizeNS">
|
||||
<Thumb.Template>
|
||||
<ControlTemplate>
|
||||
<Canvas Background="White" Opacity="0"/>
|
||||
</ControlTemplate>
|
||||
</Thumb.Template>
|
||||
<Thumb.Style>
|
||||
<Style TargetType="Thumb">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Resizable}" Value="Horizontal">
|
||||
<Setter Property="Visibility" Value="Collapsed" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Resizable}" Value="None">
|
||||
<Setter Property="Visibility" Value="Collapsed" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Thumb.Style>
|
||||
</Thumb>
|
||||
<Thumb HorizontalAlignment="Right" Width="10" x:Name="ResizeHorizontalThumb" Cursor="SizeWE">
|
||||
<Thumb.Template>
|
||||
<ControlTemplate>
|
||||
<Canvas Background="White" Opacity="0"/>
|
||||
</ControlTemplate>
|
||||
</Thumb.Template>
|
||||
<Thumb.Style>
|
||||
<Style TargetType="Thumb">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Resizable}" Value="Vertical">
|
||||
<Setter Property="Visibility" Value="Collapsed" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Resizable}" Value="None">
|
||||
<Setter Property="Visibility" Value="Collapsed" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Thumb.Style>
|
||||
</Thumb>
|
||||
<Thumb HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="10" Height="10" x:Name="ResizeDiagonalThumb" Cursor="SizeNWSE">
|
||||
<Thumb.Template>
|
||||
<ControlTemplate>
|
||||
<Canvas Background="White" Opacity="0"/>
|
||||
</ControlTemplate>
|
||||
</Thumb.Template>
|
||||
<Thumb.Style>
|
||||
<Style TargetType="Thumb">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Resizable}" Value="Vertical">
|
||||
<Setter Property="Visibility" Value="Collapsed" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Resizable}" Value="Horizontal">
|
||||
<Setter Property="Visibility" Value="Collapsed" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Resizable}" Value="None">
|
||||
<Setter Property="Visibility" Value="Collapsed" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Thumb.Style>
|
||||
</Thumb>
|
||||
<StackPanel>
|
||||
<Canvas x:Name="HeaderTopMargin" Width="auto" Height="10"/>
|
||||
<DockPanel>
|
||||
<Image x:Name="HeaderIcon" MaxWidth="{TemplateBinding ArrowSize}" MaxHeight="{TemplateBinding ArrowSize}" DockPanel.Dock="Left" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="10,0,0,0"/>
|
||||
<TextBlock x:Name="NameLabel" TextWrapping="Wrap" Background="Transparent" Foreground="{TemplateBinding Foreground}" DockPanel.Dock="Left" HorizontalAlignment="Left" VerticalAlignment="Center" TextAlignment="Center"
|
||||
FontFamily="{TemplateBinding TitleFontFamily}" FontSize="{TemplateBinding TitleFontSize}" Margin="10,0,0,0"/>
|
||||
<controls:ArrowToggleButton x:Name="CollapseButton" Width="{TemplateBinding ArrowSize}" Height="{TemplateBinding ArrowSize}" DockPanel.Dock="Right" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="20,0,10,0"/>
|
||||
</DockPanel>
|
||||
<Canvas x:Name="HeaderBottomMargin" Width="auto" Height="3"/>
|
||||
|
||||
<ContentPresenter x:Name="LeadingControlPresenter" Style="{TemplateBinding LeadingControlPresenterStyle}"/>
|
||||
|
||||
<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>
|
||||
<ContentPresenter x:Name="TrailingControlPresenter" Style="{TemplateBinding TrailingControlPresenterStyle}"/>
|
||||
|
||||
<Canvas x:Name="BottomMargin" Width="auto" Height="5"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
</controls:FillPanel>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
Reference in New Issue
Block a user