port from perforce
This commit is contained in:
24
intromat/Intromat/Themes/CodeGenNodeInputView.xaml
Normal file
24
intromat/Intromat/Themes/CodeGenNodeInputView.xaml
Normal file
@@ -0,0 +1,24 @@
|
||||
<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;assembly=NodeNetwork"
|
||||
xmlns:viewModels="clr-namespace:NodeNetwork.ViewModels;assembly=NodeNetwork">
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="Endpoint.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<Style TargetType="{x:Type views:NodeInputView}">
|
||||
<Setter Property="IsTabStop" Value="False"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Path=PortPosition}" Value="{x:Static viewModels:PortPosition.Left}">
|
||||
<DataTrigger.Setters>
|
||||
<Setter Property="Template" Value="{StaticResource LeftAlignedEndpoint}"/>
|
||||
</DataTrigger.Setters>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Path=PortPosition}" Value="{x:Static viewModels:PortPosition.Right}">
|
||||
<DataTrigger.Setters>
|
||||
<Setter Property="Template" Value="{StaticResource RightAlignedEndpoint}"/>
|
||||
</DataTrigger.Setters>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
24
intromat/Intromat/Themes/CodeGenNodeOutputView.xaml
Normal file
24
intromat/Intromat/Themes/CodeGenNodeOutputView.xaml
Normal file
@@ -0,0 +1,24 @@
|
||||
<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;assembly=NodeNetwork"
|
||||
xmlns:viewModels="clr-namespace:NodeNetwork.ViewModels;assembly=NodeNetwork">
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="Endpoint.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<Style TargetType="{x:Type views:NodeOutputView}">
|
||||
<Setter Property="IsTabStop" Value="False"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Path=PortPosition}" Value="{x:Static viewModels:PortPosition.Left}">
|
||||
<DataTrigger.Setters>
|
||||
<Setter Property="Template" Value="{StaticResource LeftAlignedEndpoint}"/>
|
||||
</DataTrigger.Setters>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Path=PortPosition}" Value="{x:Static viewModels:PortPosition.Right}">
|
||||
<DataTrigger.Setters>
|
||||
<Setter Property="Template" Value="{StaticResource RightAlignedEndpoint}"/>
|
||||
</DataTrigger.Setters>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
143
intromat/Intromat/Themes/CodeGenNodeView.xaml
Normal file
143
intromat/Intromat/Themes/CodeGenNodeView.xaml
Normal file
@@ -0,0 +1,143 @@
|
||||
<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>
|
||||
5294
intromat/Intromat/Themes/ColorfulDarkTheme.xaml
Normal file
5294
intromat/Intromat/Themes/ColorfulDarkTheme.xaml
Normal file
File diff suppressed because it is too large
Load Diff
63
intromat/Intromat/Themes/ColorfulDarkTheme.xaml.cs
Normal file
63
intromat/Intromat/Themes/ColorfulDarkTheme.xaml.cs
Normal file
@@ -0,0 +1,63 @@
|
||||
using System.Windows;
|
||||
|
||||
namespace Intromat.Themes
|
||||
{
|
||||
public partial class ColorfulDarkTheme
|
||||
{
|
||||
private void CloseWindow_Event(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (e.Source != null)
|
||||
try
|
||||
{
|
||||
CloseWind(Window.GetWindow((FrameworkElement)e.Source)!);
|
||||
}
|
||||
catch
|
||||
{
|
||||
// ignored
|
||||
}
|
||||
}
|
||||
|
||||
private void AutoMinimize_Event(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (e.Source != null)
|
||||
try
|
||||
{
|
||||
MaximizeRestore(Window.GetWindow((FrameworkElement)e.Source)!);
|
||||
}
|
||||
catch
|
||||
{
|
||||
// ignored
|
||||
}
|
||||
}
|
||||
|
||||
private void Minimize_Event(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (e.Source != null)
|
||||
try
|
||||
{
|
||||
MinimizeWind(Window.GetWindow((FrameworkElement)e.Source)!);
|
||||
}
|
||||
catch
|
||||
{
|
||||
// ignored
|
||||
}
|
||||
}
|
||||
|
||||
public void CloseWind(Window window)
|
||||
{
|
||||
window.Close();
|
||||
}
|
||||
|
||||
public void MaximizeRestore(Window window)
|
||||
{
|
||||
if (window.WindowState == WindowState.Maximized)
|
||||
window.WindowState = WindowState.Normal;
|
||||
else if (window.WindowState == WindowState.Normal) window.WindowState = WindowState.Maximized;
|
||||
}
|
||||
|
||||
public void MinimizeWind(Window window)
|
||||
{
|
||||
window.WindowState = WindowState.Minimized;
|
||||
}
|
||||
}
|
||||
}
|
||||
169
intromat/Intromat/Themes/EditorStyles.xaml
Normal file
169
intromat/Intromat/Themes/EditorStyles.xaml
Normal file
@@ -0,0 +1,169 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:editors="clr-namespace:Intromat.Views.Editors">
|
||||
|
||||
<ControlTemplate TargetType="ContentControl" x:Key="BooleanEditorTemplate">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<editors:EditorHeader Grid.Row="0" x:Name="_header" />
|
||||
<Grid Grid.Row="1" x:Name="_content">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<CheckBox Grid.Column="0" x:Name="_checkBoxValue" />
|
||||
<TextBlock Grid.Column="1" x:Name="_textBlockValue" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
|
||||
<Style TargetType="editors:BooleanExpressionEditorView">
|
||||
<Setter Property="Template" Value="{StaticResource BooleanEditorTemplate}" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="editors:BooleanValueEditorView">
|
||||
<Setter Property="Template" Value="{StaticResource BooleanEditorTemplate}" />
|
||||
</Style>
|
||||
|
||||
<ControlTemplate TargetType="ContentControl" x:Key="IntegerEditorTemplate">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<editors:EditorHeader Grid.Row="0" x:Name="_header" />
|
||||
<Grid Grid.Row="1" x:Name="_content">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Slider Grid.Column="0" x:Name="_sliderValue" />
|
||||
<TextBox Grid.Column="1" x:Name="_textBoxValue" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
|
||||
<Style TargetType="editors:IntegerExpressionEditorView">
|
||||
<Setter Property="Template" Value="{StaticResource IntegerEditorTemplate}" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="editors:IntegerValueEditorView">
|
||||
<Setter Property="Template" Value="{StaticResource IntegerEditorTemplate}" />
|
||||
</Style>
|
||||
|
||||
<ControlTemplate TargetType="ContentControl" x:Key="FloatEditorTemplate">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<editors:EditorHeader Grid.Row="0" x:Name="_header" />
|
||||
<Grid Grid.Row="1" x:Name="_content">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Slider Grid.Column="0" x:Name="_sliderValue" TickFrequency="0.001" />
|
||||
<TextBox Grid.Column="1" x:Name="_textBoxValue" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
|
||||
<Style TargetType="editors:FloatExpressionEditorView">
|
||||
<Setter Property="Template" Value="{StaticResource FloatEditorTemplate}" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="editors:FloatValueEditorView">
|
||||
<Setter Property="Template" Value="{StaticResource FloatEditorTemplate}" />
|
||||
</Style>
|
||||
|
||||
<ControlTemplate TargetType="ContentControl" x:Key="DimensionEditorTemplate">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<editors:EditorHeader Grid.Row="0" x:Name="_header" />
|
||||
<Grid Grid.Row="1" x:Name="_content">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="40" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Slider Grid.Column="0" x:Name="_sliderValue" />
|
||||
<TextBlock Grid.Column="1" x:Name="_textBlockValue" HorizontalAlignment="Center" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
|
||||
<Style TargetType="editors:DimensionEditorView">
|
||||
<Setter Property="Template" Value="{StaticResource DimensionEditorTemplate}" />
|
||||
</Style>
|
||||
|
||||
<ControlTemplate TargetType="ContentControl" x:Key="StringEditorTemplate">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<editors:EditorHeader Grid.Row="0" x:Name="_header" />
|
||||
<Grid Grid.Row="1" x:Name="_content">
|
||||
<TextBox x:Name="_textBoxValue"
|
||||
TextWrapping="Wrap"
|
||||
AcceptsReturn="True"
|
||||
VerticalScrollBarVisibility="Auto" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
|
||||
<Style TargetType="editors:StringExpressionEditorView">
|
||||
<Setter Property="Template" Value="{StaticResource StringEditorTemplate}" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="editors:StringValueEditorView">
|
||||
<Setter Property="Template" Value="{StaticResource StringEditorTemplate}" />
|
||||
</Style>
|
||||
|
||||
<ControlTemplate TargetType="ContentControl" x:Key="EnumEditorTemplate">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<editors:EditorHeader Grid.Row="0" x:Name="_header" />
|
||||
<Grid Grid.Row="1" x:Name="_content">
|
||||
<ComboBox x:Name="_comboBoxValue" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
|
||||
<Style TargetType="editors:EnumEditorView">
|
||||
<Setter Property="Template" Value="{StaticResource EnumEditorTemplate}" />
|
||||
</Style>
|
||||
|
||||
<ControlTemplate TargetType="ContentControl" x:Key="SamplerEditorTemplate">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<editors:EditorHeader Grid.Row="0" x:Name="_header" />
|
||||
<Grid Grid.Row="1" x:Name="_content">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition Width="5" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<ComboBox Grid.Column="0" x:Name="_comboBoxAddress" />
|
||||
<ComboBox Grid.Column="2" x:Name="_comboBoxFilter" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
|
||||
<Style TargetType="editors:SamplerEditorView">
|
||||
<Setter Property="Template" Value="{StaticResource SamplerEditorTemplate}" />
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
||||
48
intromat/Intromat/Themes/Endpoint.xaml
Normal file
48
intromat/Intromat/Themes/Endpoint.xaml
Normal file
@@ -0,0 +1,48 @@
|
||||
<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:wpf="clr-namespace:NodeNetwork.Utilities.WPF;assembly=NodeNetwork"
|
||||
xmlns:converters="clr-namespace:Intromat.Converters">
|
||||
<wpf:NullVisibilityConverter x:Key="NullConverter"/>
|
||||
<converters:WidthToMarginConverter x:Key="WidthToLeftMarginConverter" Side="False" />
|
||||
<converters:WidthToMarginConverter x:Key="WidthToRightMarginConverter" Side="True" />
|
||||
<ControlTemplate x:Key="LeftAlignedEndpoint">
|
||||
<Grid Margin="-10, 0, 0, 5">
|
||||
<Grid Margin="-35, 0, 0, 0">
|
||||
<Canvas VerticalAlignment="Center" Height="{Binding ActualHeight, ElementName=NameLabel}" Width="{Binding ActualWidth, ElementName=NameLabel}" Margin="{Binding ActualWidth, ElementName=NameLabel, Converter={StaticResource WidthToRightMarginConverter}}">
|
||||
<Canvas.Effect>
|
||||
<DropShadowEffect Opacity="1" ShadowDepth="0" BlurRadius="5" Color="Black" />
|
||||
</Canvas.Effect>
|
||||
<TextBlock x:Name="NameLabel" FontFamily="Segoe UI Semibold" FontSize="14" Width="auto" Foreground="White" VerticalAlignment="Center" Visibility="Collapsed" />
|
||||
</Canvas>
|
||||
</Grid>
|
||||
<reactiveUi:ViewModelViewHost x:Name="EndpointHost" Margin="0,0,10,0" Width="20" Height="20"
|
||||
HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" IsTabStop="False"/>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<DataTrigger Binding="{Binding IsMouseOver}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible" TargetName="NameLabel" />
|
||||
</DataTrigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
|
||||
<ControlTemplate x:Key="RightAlignedEndpoint">
|
||||
<Grid Margin="0, 0, -10, 5">
|
||||
<Grid Margin="0, 0, -35, 0">
|
||||
<Canvas VerticalAlignment="Center" Height="{Binding ActualHeight, ElementName=NameLabel}" Width="{Binding ActualWidth, ElementName=NameLabel}" Margin="{Binding ActualWidth, ElementName=NameLabel, Converter={StaticResource WidthToLeftMarginConverter}}">
|
||||
<Canvas.Effect>
|
||||
<DropShadowEffect Opacity="1" ShadowDepth="0" BlurRadius="5" Color="Black" />
|
||||
</Canvas.Effect>
|
||||
<TextBlock x:Name="NameLabel" FontFamily="Segoe UI Semibold" FontSize="14" Width="auto" Foreground="White" VerticalAlignment="Center" Visibility="Collapsed" />
|
||||
</Canvas>
|
||||
</Grid>
|
||||
<reactiveUi:ViewModelViewHost x:Name="EndpointHost" Margin="10,0,0,0" Width="20" Height="20"
|
||||
HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" IsTabStop="False"/>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<DataTrigger Binding="{Binding IsMouseOver}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible" TargetName="NameLabel" />
|
||||
</DataTrigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</ResourceDictionary>
|
||||
371
intromat/Intromat/Themes/ExtendedWpfToolkit.xaml
Normal file
371
intromat/Intromat/Themes/ExtendedWpfToolkit.xaml
Normal file
@@ -0,0 +1,371 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:xtk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<xtk:ColorToSolidColorBrushConverter x:Key="ColorToSolidColorBrushConverter" />
|
||||
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
|
||||
<DrawingBrush x:Key="CheckerBrush" Viewport="0,0,10,10" ViewportUnits="Absolute" TileMode="Tile">
|
||||
<DrawingBrush.Drawing>
|
||||
<DrawingGroup>
|
||||
<GeometryDrawing Brush="White">
|
||||
<GeometryDrawing.Geometry>
|
||||
<RectangleGeometry Rect="0,0 100,100" />
|
||||
</GeometryDrawing.Geometry>
|
||||
</GeometryDrawing>
|
||||
<GeometryDrawing Brush="LightGray">
|
||||
<GeometryDrawing.Geometry>
|
||||
<GeometryGroup>
|
||||
<RectangleGeometry Rect="0,0 50,50" />
|
||||
<RectangleGeometry Rect="50,50 50,50" />
|
||||
</GeometryGroup>
|
||||
</GeometryDrawing.Geometry>
|
||||
</GeometryDrawing>
|
||||
</DrawingGroup>
|
||||
</DrawingBrush.Drawing>
|
||||
</DrawingBrush>
|
||||
<xtk:InverseBoolConverter x:Key="InverseBoolConverter" />
|
||||
|
||||
|
||||
<!-- generic stuff-->
|
||||
<Geometry x:Key="UpArrowGeometry">M 0 4 L 4 0 L 8 4 Z</Geometry>
|
||||
<Geometry x:Key="DownArrowGeometry">M 0 0 L 4 4 L 8 0 Z</Geometry>
|
||||
|
||||
<DataTemplate x:Key="IncreaseGlyphNormalKey">
|
||||
<Path Width="7" Height="4" Data="{StaticResource UpArrowGeometry}" Fill="{DynamicResource ControlGlyphColor}"
|
||||
SnapsToDevicePixels="True" HorizontalAlignment="Center" VerticalAlignment="Center" Focusable="False" />
|
||||
</DataTemplate>
|
||||
<DataTemplate x:Key="IncreaseGlyphDisabledKey">
|
||||
<Path Width="7" Height="4" Data="{StaticResource UpArrowGeometry}" Fill="{DynamicResource ContainerBorder}"
|
||||
SnapsToDevicePixels="True" HorizontalAlignment="Center" VerticalAlignment="Center" Focusable="False" />
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="DecreaseGlyphNormalKey">
|
||||
<Path Width="7" Height="4" Data="{StaticResource DownArrowGeometry}" Fill="{DynamicResource ControlGlyphColor}"
|
||||
SnapsToDevicePixels="True" HorizontalAlignment="Center" VerticalAlignment="Center" Focusable="False" />
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="DecreaseGlyphDisabledKey">
|
||||
<Path Width="7" Height="4" Data="{StaticResource DownArrowGeometry}" Fill="{DynamicResource ContainerBorder}"
|
||||
SnapsToDevicePixels="True" HorizontalAlignment="Center" VerticalAlignment="Center" Focusable="False" />
|
||||
</DataTemplate>
|
||||
|
||||
<xtk:SelectedObjectConverter x:Key="objectConverter" />
|
||||
|
||||
<ControlTemplate x:Key="ExpanderToggleButton" TargetType="{x:Type ToggleButton}">
|
||||
<Grid>
|
||||
<Rectangle Margin="0,0,0,0" x:Name="Rectangle" Fill="Transparent" />
|
||||
<Path HorizontalAlignment="Center" x:Name="Up_Arrow" VerticalAlignment="Center" Fill="{DynamicResource ControlGlyphColor}" Data="M 0 0 L 4 4 L 8 0 Z" RenderTransformOrigin="0.5,0.5">
|
||||
<Path.RenderTransform>
|
||||
<TransformGroup>
|
||||
<ScaleTransform ScaleX="1" ScaleY="1" />
|
||||
<SkewTransform AngleX="0" AngleY="0" />
|
||||
<RotateTransform Angle="-90" />
|
||||
<TranslateTransform X="0" Y="0" />
|
||||
</TransformGroup>
|
||||
</Path.RenderTransform>
|
||||
</Path>
|
||||
<Path Visibility="Collapsed" HorizontalAlignment="Center" x:Name="Down_Arrow" VerticalAlignment="Center" Fill="{DynamicResource ControlGlyphColor}" Data="M 0 4 L 4 0 L 8 4 Z" RenderTransformOrigin="0.5,0.5">
|
||||
<Path.RenderTransform>
|
||||
<TransformGroup>
|
||||
<ScaleTransform ScaleX="1" ScaleY="1" />
|
||||
<SkewTransform AngleX="0" AngleY="0" />
|
||||
<RotateTransform Angle="135" />
|
||||
<TranslateTransform X="0" Y="0" />
|
||||
</TransformGroup>
|
||||
</Path.RenderTransform>
|
||||
</Path>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsChecked" Value="true">
|
||||
<Setter Property="Visibility" Value="Visible" TargetName="Down_Arrow" />
|
||||
<Setter Property="Visibility" Value="Collapsed" TargetName="Up_Arrow" />
|
||||
<Setter Property="OpacityMask" TargetName="Down_Arrow" Value="#FF000000" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Fill" TargetName="Up_Arrow" Value="{DynamicResource ControlDefaultBorderBrush}" />
|
||||
<Setter Property="Fill" TargetName="Down_Arrow" Value="{DynamicResource ControlDefaultBorderBrush}" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
|
||||
<Style x:Key="ExpanderStyle" TargetType="{x:Type Expander}">
|
||||
<Setter Property="Padding" Value="0" />
|
||||
<Setter Property="Background" Value="{DynamicResource ControlBrightDefaultBackground}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource ControlDefaultForeground}" />
|
||||
<Setter Property="IsExpanded" Value="True" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Expander}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" x:Name="ContentRow" />
|
||||
</Grid.RowDefinitions>
|
||||
<Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="Transparent" Margin="0,0,0,2">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="20" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<ToggleButton Template="{StaticResource ExpanderToggleButton}" IsChecked="{Binding Path=IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" OverridesDefaultStyle="True" />
|
||||
<ContentPresenter Grid.Column="1" Margin="1" RecognizesAccessKey="True" ContentSource="Header" TextElement.FontWeight="Bold" />
|
||||
</Grid>
|
||||
</Border>
|
||||
<Border Visibility="Collapsed" Grid.Row="1" x:Name="ExpandSite" Background="{DynamicResource ControlDefaultBackground}">
|
||||
<Border BorderThickness="0" Margin="0" Padding="0" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
|
||||
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Focusable="False" />
|
||||
</Border>
|
||||
</Border>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsExpanded" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible" TargetName="ExpandSite" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Background" Value="{DynamicResource ControlDisabledBackground}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource ControlDisabledGlyphColor}" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="{x:Type xtk:PropertyGrid}">
|
||||
<Setter Property="Background" Value="{DynamicResource BackgroundColor}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ContainerBorder}" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="SelectedObjectType"
|
||||
Value="{Binding RelativeSource={RelativeSource Self}, Path=SelectedObject, Converter={StaticResource objectConverter}, ConverterParameter=Type}" />
|
||||
<Setter Property="SelectedObjectTypeName"
|
||||
Value="{Binding RelativeSource={RelativeSource Self}, Path=SelectedObject, Converter={StaticResource objectConverter}, ConverterParameter=TypeName}" />
|
||||
<Setter Property="SelectedObjectName"
|
||||
Value="{Binding RelativeSource={RelativeSource Self}, Path=SelectedObject, Converter={StaticResource objectConverter}, ConverterParameter=SelectedObjectName}" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type xtk:PropertyGrid}">
|
||||
<Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="0">
|
||||
<Grid Margin="{TemplateBinding Padding}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="5" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="6,2,0,4"
|
||||
Visibility="{Binding ShowTitle, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}">
|
||||
<TextBlock Text="{TemplateBinding SelectedObjectTypeName}" FontWeight="Bold" />
|
||||
<TextBlock Text="{TemplateBinding SelectedObjectName}" Margin="5,0,0,0" />
|
||||
</StackPanel>
|
||||
|
||||
<Grid x:Name="toolsContainer" Grid.Row="1" Margin="4,0,4,4">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid x:Name="sortButtonContainer" Margin="4"
|
||||
Visibility="{Binding ShowSortOptions, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}">
|
||||
<StackPanel Orientation="Horizontal" Margin="1">
|
||||
<RadioButton
|
||||
IsChecked="{Binding IsCategorized, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
VerticalAlignment="Center"
|
||||
ToolTip="Categorized">
|
||||
<Image
|
||||
Source="pack://application:,,,/Xceed.Wpf.Toolkit;component/PropertyGrid/Images/Categorize16.png"
|
||||
Width="16" Height="16" />
|
||||
</RadioButton>
|
||||
<RadioButton
|
||||
IsChecked="{Binding IsCategorized, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InverseBoolConverter}, Mode=OneWay}"
|
||||
VerticalAlignment="Center"
|
||||
ToolTip="Alphabetical">
|
||||
<Image
|
||||
Source="pack://application:,,,/Xceed.Wpf.Toolkit;component/PropertyGrid/Images/SortAscending16.png"
|
||||
Width="16" Height="16" />
|
||||
</RadioButton>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
<Border x:Name="searchBoxContainer" Grid.Column="1" Margin="4,4,0,4"
|
||||
BorderBrush="{DynamicResource ContainerBorder}" BorderThickness="0"
|
||||
Visibility="{Binding ShowSearchBox, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<xtk:WatermarkTextBox x:Name="_txtFilter"
|
||||
Background="{DynamicResource ControlDarkerBackground}"
|
||||
Text="{Binding Filter, RelativeSource={RelativeSource TemplatedParent}, UpdateSourceTrigger=PropertyChanged}"
|
||||
Watermark="{TemplateBinding FilterWatermark}" />
|
||||
|
||||
<Button Grid.Column="1" Command="xtk:PropertyGridCommands.ClearFilter"
|
||||
HorizontalAlignment="Left">
|
||||
<Image
|
||||
Source="pack://application:,,,/Xceed.Wpf.Toolkit;component/PropertyGrid/Images/ClearFilter16.png"
|
||||
Width="16" Height="16" />
|
||||
</Button>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="2" Background="{DynamicResource ControlDefaultBackground}">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
||||
<xtk:PropertyItemsControl x:Name="PART_PropertyItemsControl" IsTabStop="False"
|
||||
Focusable="False"
|
||||
ItemsSource="{Binding Properties, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
ItemContainerStyle="{Binding PropertyContainerStyle, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
Background="{DynamicResource ControlDefaultBackground}"
|
||||
VerticalAlignment="Top">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<VirtualizingStackPanel />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
|
||||
<ItemsControl.GroupStyle>
|
||||
<GroupStyle>
|
||||
<GroupStyle.ContainerStyle>
|
||||
<Style TargetType="{x:Type GroupItem}">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Border>
|
||||
<Expander Header="{Binding Name}" Style="{StaticResource ExpanderStyle}">
|
||||
<ItemsPresenter />
|
||||
</Expander>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</GroupStyle.ContainerStyle>
|
||||
</GroupStyle>
|
||||
</ItemsControl.GroupStyle>
|
||||
|
||||
</xtk:PropertyItemsControl>
|
||||
</ScrollViewer>
|
||||
|
||||
<Thumb x:Name="PART_DragThumb" HorizontalAlignment="Left" Width="5" Margin="6,0,0,0"
|
||||
Cursor="SizeWE">
|
||||
<Thumb.Template>
|
||||
<ControlTemplate>
|
||||
<Border Background="Transparent" />
|
||||
</ControlTemplate>
|
||||
</Thumb.Template>
|
||||
</Thumb>
|
||||
|
||||
</Grid>
|
||||
|
||||
<GridSplitter Height="3" Grid.Row="3" HorizontalAlignment="Stretch"
|
||||
Visibility="{Binding ShowSummary, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}" />
|
||||
<StackPanel Grid.Row="4" Margin="0,0,0,5"
|
||||
Visibility="{Binding ShowSummary, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}">
|
||||
<TextBlock Padding="2 2 2 0" FontWeight="Bold"
|
||||
Text="{Binding SelectedPropertyItem.DisplayName, RelativeSource={RelativeSource TemplatedParent}}" />
|
||||
<TextBlock Padding="5 2 2 0" TextWrapping="WrapWithOverflow"
|
||||
Text="{Binding SelectedPropertyItem.Description, RelativeSource={RelativeSource TemplatedParent}}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition SourceName="searchBoxContainer" Property="Visibility" Value="Collapsed" />
|
||||
<Condition SourceName="sortButtonContainer" Property="Visibility" Value="Collapsed" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter TargetName="toolsContainer" Property="Visibility" Value="Collapsed" />
|
||||
</MultiTrigger>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Background" Value="{DynamicResource ControlDefaultBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ControlDisabledBorderBrush}" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<xtk:ExpandableObjectMarginConverter x:Key="ExpandableObjectMarginConverter" />
|
||||
|
||||
<Style x:Key="PropertyExpanderStyle" TargetType="{x:Type Expander}">
|
||||
<Setter Property="Padding" Value="0 0 0 0" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Expander}">
|
||||
<Grid>
|
||||
<Border Visibility="Collapsed" x:Name="ExpandSite" Padding="0 0 0 0">
|
||||
<Border BorderThickness="0" Margin="0" Padding="0" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
|
||||
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Focusable="False" />
|
||||
</Border>
|
||||
</Border>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsExpanded" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible" TargetName="ExpandSite" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="{x:Type xtk:PropertyItem}">
|
||||
<Setter Property="Background" Value="{DynamicResource ControlDefaultBackground}" />
|
||||
<!-- Set the margin at 1 pixel bottom to let the horizontal "line" effect appear. -->
|
||||
<Setter Property="Margin" Value="0,0,0,1" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="SnapsToDevicePixels" Value="True" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type xtk:PropertyItem}">
|
||||
<Border ContextMenu="{Binding AdvancedOptionsMenu, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=xtk:PropertyGrid}}" ContextMenuService.Placement="Bottom">
|
||||
<Grid VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="5,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ToggleButton x:Name="_expandableButton" Grid.Column="0" Template="{StaticResource ExpanderToggleButton}" OverridesDefaultStyle="True" IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding IsExpandable, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}" />
|
||||
|
||||
<Border Grid.Row="0" x:Name="PART_Editor" Grid.Column="1" Background="{TemplateBinding Background}" KeyboardNavigation.DirectionalNavigation="None" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
|
||||
<ContentControl x:Name="PART_ValueContainer" Content="{TemplateBinding Editor}" Focusable="False" IsTabStop="False" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" IsEnabled="{Binding IsReadOnly, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=xtk:PropertyGrid}, Converter={StaticResource InverseBoolConverter}}">
|
||||
</ContentControl>
|
||||
</Border>
|
||||
|
||||
<Expander Grid.Column="0" x:Name="_propertyExpander" Grid.ColumnSpan="2" Grid.Row="1" IsExpanded="{TemplateBinding IsExpanded}" Style="{StaticResource PropertyExpanderStyle}" IsEnabled="True">
|
||||
<xtk:PropertyItemsControl x:Name="PART_PropertyItemsControl" IsTabStop="False" Focusable="False" ItemsSource="{Binding Properties, RelativeSource={RelativeSource TemplatedParent}}" ItemContainerStyle="{Binding PropertyContainerStyle, RelativeSource={RelativeSource TemplatedParent}}" >
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<VirtualizingStackPanel />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
</xtk:PropertyItemsControl>
|
||||
</Expander>
|
||||
</Grid>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Foreground" TargetName="PART_ValueContainer" Value="{DynamicResource ControlDisabledGlyphColor}" />
|
||||
</Trigger>
|
||||
<Trigger Property="Validation.HasError" Value="true">
|
||||
<Setter Property="ToolTip" Value="{Binding RelativeSource={x:Static RelativeSource.Self}, Path=(Validation.Errors)[0].ErrorContent}" />
|
||||
</Trigger>
|
||||
<Trigger Property="Visibility" Value="Visible" SourceName="_expandableButton">
|
||||
<Setter Property="Focusable" Value="False" />
|
||||
</Trigger>
|
||||
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
||||
182
intromat/Intromat/Themes/Icons.xaml
Normal file
182
intromat/Intromat/Themes/Icons.xaml
Normal file
@@ -0,0 +1,182 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<DrawingImage x:Key="LogoImageSource" x:Shared="True">
|
||||
<DrawingImage.Drawing>
|
||||
<DrawingGroup>
|
||||
<GeometryDrawing Brush="#FF806040">
|
||||
<GeometryDrawing.Geometry>
|
||||
<PathGeometry Figures="M34,0 L67,0 L99,27 Z M34,0 L76,93 L99,27 L9,69 Z M9,69 L76,93 L33,99 Z" FillRule="Nonzero"/>
|
||||
</GeometryDrawing.Geometry>
|
||||
</GeometryDrawing>
|
||||
<GeometryDrawing Brush="#D040A0FF">
|
||||
<GeometryDrawing.Geometry>
|
||||
<PathGeometry Figures="M0,31 L34,0 L30,17 Z M30,17 L67,0 L78,36 Z M78,36 L99,27 L96,67 Z M30,17 L60,83 L78,36 L13,67 Z M0,31 L13,67 L9,69 Z M13,67 L60,83 L33,99 Z M60,83 L96,67 L76,93 Z" FillRule="Nonzero"/>
|
||||
</GeometryDrawing.Geometry>
|
||||
</GeometryDrawing>
|
||||
</DrawingGroup>
|
||||
</DrawingImage.Drawing>
|
||||
</DrawingImage>
|
||||
<Image x:Key="LogoImage" x:Shared="True" Source="{StaticResource LogoImageSource}" />
|
||||
|
||||
<DrawingImage x:Key="ProjectImageSource" x:Shared="True">
|
||||
<DrawingImage.Drawing>
|
||||
<DrawingGroup>
|
||||
<GeometryDrawing Brush="{DynamicResource ControlDefaultForeground}" >
|
||||
<GeometryDrawing.Pen>
|
||||
<Pen LineJoin="Miter" StartLineCap="Square" EndLineCap="Square" Thickness="2" Brush="{DynamicResource ControlDefaultForeground}" />
|
||||
</GeometryDrawing.Pen>
|
||||
<GeometryDrawing.Geometry>
|
||||
<GeometryGroup>
|
||||
<PathGeometry Figures="M0,20 L0,0 L100,0 L100,20 Z" FillRule="Nonzero"/>
|
||||
<PathGeometry Figures="M0,70 L0,20 L100,20 L100,100 L50,100 L50,98 L98,98 L98,22 L2,22 L2,70 Z" />
|
||||
</GeometryGroup>
|
||||
</GeometryDrawing.Geometry>
|
||||
</GeometryDrawing>
|
||||
<GeometryDrawing Brush="#80FFA0">
|
||||
<GeometryDrawing.Pen>
|
||||
<Pen LineJoin="Miter" StartLineCap="Square" EndLineCap="Square" Brush="#80FFA0" />
|
||||
</GeometryDrawing.Pen>
|
||||
<GeometryDrawing.Geometry>
|
||||
<GeometryGroup>
|
||||
<EllipseGeometry Center="5,80" RadiusX="5" RadiusY="5" />
|
||||
<EllipseGeometry Center="40,65" RadiusX="5" RadiusY="5" />
|
||||
<EllipseGeometry Center="40,80" RadiusX="5" RadiusY="5" />
|
||||
<EllipseGeometry Center="40,95" RadiusX="5" RadiusY="5" />
|
||||
<PathGeometry Figures="M10,79 L35,79 L35,81 L10,81 M22,64 L35,64 L35,66 L22,66 M22,94 L35,94 L35,96 L22,96 M22,66 L24,66 L24,94 L22,94" FillRule="Nonzero" />
|
||||
</GeometryGroup>
|
||||
</GeometryDrawing.Geometry>
|
||||
</GeometryDrawing>
|
||||
</DrawingGroup>
|
||||
</DrawingImage.Drawing>
|
||||
</DrawingImage>
|
||||
<Image x:Key="ProjectImage" x:Shared="True" Source="{StaticResource ProjectImageSource}" />
|
||||
|
||||
<DrawingImage x:Key="ModuleImageSource" x:Shared="True">
|
||||
<DrawingImage.Drawing>
|
||||
<DrawingGroup>
|
||||
<GeometryDrawing>
|
||||
<GeometryDrawing.Pen>
|
||||
<Pen LineJoin="Miter" StartLineCap="Square" EndLineCap="Square" Brush="#80FFA0" Thickness="4" />
|
||||
</GeometryDrawing.Pen>
|
||||
<GeometryDrawing.Geometry>
|
||||
<GeometryGroup>
|
||||
<PathGeometry Figures="M10,80 L10,20 L90,20 L90,80 Z" />
|
||||
</GeometryGroup>
|
||||
</GeometryDrawing.Geometry>
|
||||
</GeometryDrawing>
|
||||
<GeometryDrawing Brush="{DynamicResource ControlDefaultForeground}">
|
||||
<GeometryDrawing.Pen>
|
||||
<Pen LineJoin="Miter" StartLineCap="Square" EndLineCap="Square" Brush="{DynamicResource ControlDefaultForeground}" />
|
||||
</GeometryDrawing.Pen>
|
||||
<GeometryDrawing.Geometry>
|
||||
<GeometryGroup>
|
||||
<EllipseGeometry Center="32,50" RadiusX="5" RadiusY="5" />
|
||||
<EllipseGeometry Center="68,34" RadiusX="5" RadiusY="5" />
|
||||
<EllipseGeometry Center="68,50" RadiusX="5" RadiusY="5" />
|
||||
<EllipseGeometry Center="68,66" RadiusX="5" RadiusY="5" />
|
||||
<PathGeometry Figures="M37,49 L63,49 L63,51 L37,51 Z M49,33 L63,33 L63,35 L49,35 Z M49,65 L63,65 L63,67 L49,67 Z M49,36 L51,36 L51,65 L49,65 Z" FillRule="Nonzero" />
|
||||
</GeometryGroup>
|
||||
</GeometryDrawing.Geometry>
|
||||
</GeometryDrawing>
|
||||
</DrawingGroup>
|
||||
</DrawingImage.Drawing>
|
||||
</DrawingImage>
|
||||
<Image x:Key="ModuleImage" x:Shared="True" Source="{StaticResource ModuleImageSource}" />
|
||||
|
||||
<DrawingImage x:Key="GraphImageSource" x:Shared="True">
|
||||
<DrawingImage.Drawing>
|
||||
<DrawingGroup>
|
||||
<GeometryDrawing Brush="{DynamicResource ControlDefaultForeground}">
|
||||
<GeometryDrawing.Pen>
|
||||
<Pen LineJoin="Miter" StartLineCap="Square" EndLineCap="Square" Thickness="2" Brush="{DynamicResource ControlDefaultForeground}" />
|
||||
</GeometryDrawing.Pen>
|
||||
<GeometryDrawing.Geometry>
|
||||
<GeometryGroup>
|
||||
<PathGeometry Figures="M10,70 L10,0 L50,0 L70,20 L70,100 L50,100 L50,98 L68,98 L68,20 L48,20 L48,2 L12,2 L12,70 Z " FillRule="Nonzero" />
|
||||
</GeometryGroup>
|
||||
</GeometryDrawing.Geometry>
|
||||
</GeometryDrawing>
|
||||
<GeometryDrawing Brush="#80FFA0">
|
||||
<GeometryDrawing.Pen>
|
||||
<Pen LineJoin="Miter" StartLineCap="Square" EndLineCap="Square" Brush="#80FFA0" Thickness="4" />
|
||||
</GeometryDrawing.Pen>
|
||||
<GeometryDrawing.Geometry>
|
||||
<GeometryGroup>
|
||||
<EllipseGeometry Center="30,85" RadiusX="5" RadiusY="5" />
|
||||
<PathGeometry Figures="M20,80 L15,85 L20,90 Z" />
|
||||
<PathGeometry Figures="M40,80 L45,85 L40,90 Z" />
|
||||
</GeometryGroup>
|
||||
</GeometryDrawing.Geometry>
|
||||
</GeometryDrawing>
|
||||
</DrawingGroup>
|
||||
</DrawingImage.Drawing>
|
||||
</DrawingImage>
|
||||
<Image x:Key="GraphImage" x:Shared="True" Source="{StaticResource GraphImageSource}" />
|
||||
|
||||
<DrawingImage x:Key="FolderClosedImageSource" x:Shared="True">
|
||||
<DrawingImage.Drawing>
|
||||
<GeometryDrawing Brush="#C0A020">
|
||||
<GeometryDrawing.Pen>
|
||||
<Pen LineJoin="Miter" StartLineCap="Square" EndLineCap="Square" Thickness="2" Brush="#C0A020" />
|
||||
</GeometryDrawing.Pen>
|
||||
<GeometryDrawing.Geometry>
|
||||
<GeometryGroup>
|
||||
<PathGeometry Figures="M0,10 L100,10 L100,80 L0,80 Z" />
|
||||
<PathGeometry Figures="M0,10 L0,0 L50,0 L55,10 L53,10 L48,2 L2,2 L2,10 Z" />
|
||||
</GeometryGroup>
|
||||
</GeometryDrawing.Geometry>
|
||||
</GeometryDrawing>
|
||||
</DrawingImage.Drawing>
|
||||
</DrawingImage>
|
||||
<Image x:Key="FolderClosedImage" x:Shared="True" Source="{StaticResource FolderClosedImageSource}" />
|
||||
|
||||
<DrawingImage x:Key="FolderOpenImageSource" x:Shared="True">
|
||||
<DrawingImage.Drawing>
|
||||
<GeometryDrawing Brush="#C0A020">
|
||||
<GeometryDrawing.Pen>
|
||||
<Pen LineJoin="Miter" StartLineCap="Square" EndLineCap="Square" Thickness="2" Brush="#C0A020" />
|
||||
</GeometryDrawing.Pen>
|
||||
<GeometryDrawing.Geometry>
|
||||
<GeometryGroup>
|
||||
<PathGeometry Figures="M20,35 L100,35 L80,80 L00,80 Z" />
|
||||
<PathGeometry Figures="M0,80 L0,0 L50,0 L55,10 L80,10 L80,50 L78,50 L78,12 L54,12 L53,10 L48,2 L2,2 L2,80 Z" />
|
||||
</GeometryGroup>
|
||||
</GeometryDrawing.Geometry>
|
||||
</GeometryDrawing>
|
||||
</DrawingImage.Drawing>
|
||||
</DrawingImage>
|
||||
<Image x:Key="FolderOpenImage" x:Shared="True" Source="{StaticResource FolderOpenImageSource}" />
|
||||
|
||||
<DrawingImage x:Key="DeleteImageSource" x:Shared="True">
|
||||
<DrawingImage.Drawing>
|
||||
<GeometryDrawing>
|
||||
<GeometryDrawing.Pen>
|
||||
<Pen LineJoin="Miter" StartLineCap="Square" EndLineCap="Square" Thickness="20" Brush="#FF8080" />
|
||||
</GeometryDrawing.Pen>
|
||||
<GeometryDrawing.Geometry>
|
||||
<GeometryGroup>
|
||||
<PathGeometry Figures="M0,0 L100,100 M0,100 L100,0" />
|
||||
</GeometryGroup>
|
||||
</GeometryDrawing.Geometry>
|
||||
</GeometryDrawing>
|
||||
</DrawingImage.Drawing>
|
||||
</DrawingImage>
|
||||
<Image x:Key="DeleteImage" x:Shared="True" Source="{StaticResource DeleteImageSource}" />
|
||||
|
||||
<DrawingImage x:Key="RenameImageSource" x:Shared="True">
|
||||
<DrawingImage.Drawing>
|
||||
<GeometryDrawing>
|
||||
<GeometryDrawing.Pen>
|
||||
<Pen LineJoin="Miter" StartLineCap="Square" EndLineCap="Square" Thickness="5" Brush="{StaticResource ControlDefaultForeground}" />
|
||||
</GeometryDrawing.Pen>
|
||||
<GeometryDrawing.Geometry>
|
||||
<GeometryGroup>
|
||||
<PathGeometry Figures="M0,20 L100,20 L100,80 L0,80 Z M20,30 L20,70" />
|
||||
</GeometryGroup>
|
||||
</GeometryDrawing.Geometry>
|
||||
</GeometryDrawing>
|
||||
</DrawingImage.Drawing>
|
||||
</DrawingImage>
|
||||
<Image x:Key="RenameImage" x:Shared="True" Source="{StaticResource RenameImageSource}" />
|
||||
|
||||
</ResourceDictionary>
|
||||
61
intromat/Intromat/Themes/Resources.xaml
Normal file
61
intromat/Intromat/Themes/Resources.xaml
Normal file
@@ -0,0 +1,61 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Style x:Key="IconToolButton" TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Padding" Value="3" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ControlDefaultBackground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource ControlDefaultBackground}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource ControlGlyphColor}" />
|
||||
<Setter Property="SnapsToDevicePixels" Value="True" />
|
||||
<Setter Property="UseLayoutRounding" Value="true" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Button}">
|
||||
<Border x:Name="border"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
Background="{TemplateBinding Background}"
|
||||
SnapsToDevicePixels="true"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch">
|
||||
<TextBlock x:Name="contentPresenter" Text="{TemplateBinding Content}"
|
||||
Focusable="False"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
||||
UseLayoutRounding="{TemplateBinding UseLayoutRounding}"
|
||||
FontSize="12"
|
||||
FontFamily="Segoe MDL2 Assets"
|
||||
Foreground="{TemplateBinding TextElement.Foreground}"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center" />
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsDefaulted" Value="true">
|
||||
<Setter Property="BorderBrush" TargetName="border"
|
||||
Value="{StaticResource ControlMouseOverBorderBrush}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsMouseOver" Value="true">
|
||||
<Setter Property="Background" TargetName="border"
|
||||
Value="{StaticResource ControlPrimaryMouseOverBackground}" />
|
||||
<Setter Property="BorderBrush" TargetName="border"
|
||||
Value="{StaticResource ControlPrimaryMouseOverBorderBrush}" />
|
||||
<Setter Property="Foreground" TargetName="contentPresenter"
|
||||
Value="{StaticResource ControlMouseOverGlyphColor}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="true">
|
||||
<Setter Property="Background" TargetName="border"
|
||||
Value="{StaticResource ControlPrimarySelectedBackground}" />
|
||||
<Setter Property="BorderBrush" TargetName="border"
|
||||
Value="{StaticResource ControlPrimarySelectedBorderBrush}" />
|
||||
<Setter Property="Foreground" TargetName="contentPresenter"
|
||||
Value="{StaticResource ControlSelectedGlyphColor}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Foreground" TargetName="contentPresenter"
|
||||
Value="{StaticResource ControlDisabledGlyphColor}" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
Reference in New Issue
Block a user