port from perforce

This commit is contained in:
2026-04-18 22:31:51 +02:00
commit 8d0ab5b7cc
8409 changed files with 3972376 additions and 0 deletions

View File

@@ -0,0 +1,107 @@
<UserControl x:Class="NodeNetwork.Toolkit.NodeList.NodeListView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:controls="clr-namespace:NodeNetwork.Views.Controls;assembly=NodeNetwork"
mc:Ignorable="d"
d:DesignHeight="500" d:DesignWidth="320"
Background="{DynamicResource BackgroundColor}"
x:Name="self">
<UserControl.Resources>
<DataTemplate x:Key="tilesTemplate">
<Grid>
<controls:ViewModelViewHostNoAnimations VerticalAlignment="Top" Margin="0, 5, 0, 5" ViewModel="{Binding}" KeyboardNavigation.TabNavigation="None">
<controls:ViewModelViewHostNoAnimations.LayoutTransform>
<ScaleTransform ScaleX="0.5" ScaleY="0.5"/>
</controls:ViewModelViewHostNoAnimations.LayoutTransform>
</controls:ViewModelViewHostNoAnimations>
<Grid Background="#01000000" MouseMove="OnNodeMouseMove" Cursor="Hand"/>
<!-- Overlay absorbs mouse events -->
</Grid>
</DataTemplate>
<ItemsPanelTemplate x:Key="tilesItemsPanelTemplate">
<WrapPanel />
</ItemsPanelTemplate>
<ControlTemplate x:Key="tilesItemsControlTemplate">
<ItemsPresenter HorizontalAlignment="Stretch"/>
</ControlTemplate>
<DataTemplate x:Key="listTemplate">
<Grid HorizontalAlignment="Stretch" Margin="0, 0, 0, 0" MouseMove="OnNodeMouseMove">
<Grid.Style>
<Style TargetType="Grid">
<Setter Property="Background" Value="{Binding ListEntryBackgroundBrush, ElementName=self}"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{Binding ListEntryBackgroundMouseOverBrush, ElementName=self}"/>
</Trigger>
</Style.Triggers>
</Style>
</Grid.Style>
<TextBlock Margin="10,5,5,5"><Run Text="{Binding Name}"/></TextBlock>
<Viewbox Stretch="Uniform" Width="10" Height="20" HorizontalAlignment="Right" Margin="5" Cursor="SizeAll">
<Canvas Width="12.5" Height="30" Background="#01ffffff">
<Rectangle Canvas.Left="0" Canvas.Top="0" Width="4" Height="4" Fill="{Binding ListEntryHandleBrush, ElementName=self}" StrokeThickness="0" />
<Rectangle Canvas.Left="7.5" Canvas.Top="0" Width="4" Height="4" Fill="{Binding ListEntryHandleBrush, ElementName=self}" StrokeThickness="0" />
<Rectangle Canvas.Left="0" Canvas.Top="7.5" Width="4" Height="4" Fill="{Binding ListEntryHandleBrush, ElementName=self}" StrokeThickness="0" />
<Rectangle Canvas.Left="7.5" Canvas.Top="7.5" Width="4" Height="4" Fill="{Binding ListEntryHandleBrush, ElementName=self}" StrokeThickness="0" />
<Rectangle Canvas.Left="0" Canvas.Top="15" Width="4" Height="4" Fill="{Binding ListEntryHandleBrush, ElementName=self}" StrokeThickness="0" />
<Rectangle Canvas.Left="7.5" Canvas.Top="15" Width="4" Height="4" Fill="{Binding ListEntryHandleBrush, ElementName=self}" StrokeThickness="0" />
<Rectangle Canvas.Left="0" Canvas.Top="22.5" Width="4" Height="4" Fill="{Binding ListEntryHandleBrush, ElementName=self}" StrokeThickness="0" />
<Rectangle Canvas.Left="7.5" Canvas.Top="22.5" Width="4" Height="4" Fill="{Binding ListEntryHandleBrush, ElementName=self}" StrokeThickness="0" />
</Canvas>
</Viewbox>
</Grid>
</DataTemplate>
<ItemsPanelTemplate x:Key="listItemsPanelTemplate">
<StackPanel HorizontalAlignment="Stretch"/>
</ItemsPanelTemplate>
<ControlTemplate x:Key="listItemsControlTemplate">
<ItemsPresenter HorizontalAlignment="Stretch"/>
</ControlTemplate>
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<Grid Row="0">
<TextBlock x:Name="titleLabel" Margin="10, 0, 0, 0" Padding="0, 10, 0, 10" VerticalAlignment="Center" HorizontalAlignment="Left" FontSize="18" FontFamily="Segoe UI Semilight" Text="Test"/>
<ComboBox x:Name="viewComboBox" Margin="0,0,10,0" VerticalAlignment="Center" HorizontalAlignment="Right" Width="65" Height="20" />
</Grid>
<Grid Row="1" x:Name="searchBoxGrid" Margin="25,7,25,0" MaxWidth="300" VerticalAlignment="Top">
<TextBox x:Name="searchBox" TextWrapping="Wrap"/>
<TextBlock Margin="5, 0, 0, 0" x:Name="emptySearchBoxMessage" Text="Search..." IsHitTestVisible="False" Foreground="LightGray"/>
</Grid>
<Grid Row="2" Margin="10,10,10,0" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
<ScrollViewer>
<ItemsControl x:Name="elementsList" IsTabStop="False">
<ItemsControl.GroupStyle>
<GroupStyle>
<GroupStyle.ContainerStyle>
<Style TargetType="{x:Type GroupItem}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<Expander Header="{Binding Name}" IsExpanded="True">
<ItemsPresenter />
</Expander>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</GroupStyle.ContainerStyle>
</GroupStyle>
</ItemsControl.GroupStyle>
</ItemsControl>
</ScrollViewer>
<TextBlock x:Name="emptyMessage" Text="No matching nodes found" HorizontalAlignment="Center" VerticalAlignment="Top"/>
</Grid>
</Grid>
</UserControl>