143 lines
11 KiB
XML
143 lines
11 KiB
XML
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:views="clr-namespace:Intromat.Views"
|
|
xmlns:controls="clr-namespace:NodeNetwork.Views.Controls;assembly=NodeNetwork"
|
|
xmlns:viewModels="clr-namespace:NodeNetwork.ViewModels;assembly=NodeNetwork"
|
|
xmlns:reactiveUi="http://reactiveui.net">
|
|
<Style TargetType="{x:Type views:CodeGenNodeView}">
|
|
<Setter Property="Background" Value="#5D9CEC"/>
|
|
<Setter Property="Foreground" Value="#FFFFFF"/>
|
|
<Setter Property="TitleFontFamily" Value="Segoe UI Semibold"/>
|
|
<Setter Property="TitleFontSize" Value="14"/>
|
|
<Setter Property="BorderBrush" Value="Orange"/>
|
|
<Setter Property="CornerRadius" Value="3,3,0,0"/>
|
|
<Setter Property="ArrowSize" Value="20"/>
|
|
<Setter Property="EndpointsStackingOrientation" Value="Horizontal"/>
|
|
<Setter Property="IsTabStop" Value="False"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="views:CodeGenNodeView">
|
|
<controls:FillPanel>
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup Name="{x:Static views:CodeGenNodeView.SelectedVisualStatesGroup}">
|
|
<VisualState Name="{x:Static views:CodeGenNodeView.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:CodeGenNodeView.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}">
|
|
<controls:FillPanel x:Name="Container">
|
|
<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>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<Grid Grid.Row="0" Margin="0,3,0,0">
|
|
<Border Margin="0,-3,0,0" CornerRadius="{TemplateBinding CornerRadius}" Background="#20000000" BorderThickness="0" />
|
|
<DockPanel HorizontalAlignment="Center" Margin="0,0,0,3">
|
|
<Image x:Name="HeaderIcon" MaxWidth="{TemplateBinding ArrowSize}" MaxHeight="{TemplateBinding ArrowSize}" DockPanel.Dock="Left" HorizontalAlignment="Left" VerticalAlignment="Center" />
|
|
<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="3,0,0,0"/>
|
|
</DockPanel>
|
|
</Grid>
|
|
|
|
<Grid Grid.Row="1" Margin="3,0">
|
|
<reactiveUi:ViewModelViewHost x:Name="Preview" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch" VerticalAlignment="Stretch" VerticalContentAlignment="Stretch" />
|
|
<ItemsControl x:Name="LeftList" IsTabStop="False" HorizontalAlignment="Left">
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate DataType="viewModels:Endpoint">
|
|
<reactiveUi:ViewModelViewHost ViewModel="{Binding}" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" IsTabStop="False"/>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
<ItemsControl x:Name="RightList" IsTabStop="False" HorizontalAlignment="Right">
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate DataType="viewModels:Endpoint">
|
|
<reactiveUi:ViewModelViewHost ViewModel="{Binding}" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" IsTabStop="False"/>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</Grid>
|
|
|
|
<ContentPresenter x:Name="TrailingControlPresenter" Style="{TemplateBinding TrailingControlPresenterStyle}" Margin="0,3,0,0" Grid.Row="2" />
|
|
</Grid>
|
|
</controls:FillPanel>
|
|
</Border>
|
|
</controls:FillPanel>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</ResourceDictionary> |