|
@@ -6,29 +6,46 @@
|
|
|
xmlns:ui="clr-namespace:PixiEditor.Extensions.UI;assembly=PixiEditor.Extensions"
|
|
|
xmlns:converters="clr-namespace:PixiEditor.AvaloniaUI.Helpers.Converters"
|
|
|
xmlns:input="clr-namespace:PixiEditor.AvaloniaUI.Views.Input"
|
|
|
+ xmlns:system="clr-namespace:System;assembly=System.Runtime"
|
|
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
|
|
x:Class="PixiEditor.AvaloniaUI.Views.Nodes.Properties.KernelPropertyView">
|
|
|
-
|
|
|
- <StackPanel HorizontalAlignment="{Binding IsInput, Converter={converters:BoolToValueConverter FalseValue='Right', TrueValue='Stretch'}}">
|
|
|
- <TextBlock ui:Translator.Key="{Binding DisplayName}" />
|
|
|
-
|
|
|
- <ItemsControl ItemsSource="{Binding ReferenceCollections}" HorizontalAlignment="Stretch">
|
|
|
+
|
|
|
+ <StackPanel Margin="0,2">
|
|
|
+ <Grid ColumnDefinitions="*,*,*" Margin="0,0,0,2">
|
|
|
+ <TextBlock ui:Translator.Key="{Binding DisplayName}" VerticalAlignment="Center"/>
|
|
|
+ <StackPanel Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
|
|
|
+ <Button Padding="0" Content="-" Width="35" Command="{Binding AdjustSizeCommand}">
|
|
|
+ <Button.CommandParameter>
|
|
|
+ <system:Int32>-1</system:Int32>
|
|
|
+ </Button.CommandParameter>
|
|
|
+ </Button>
|
|
|
+ <Button Padding="0" Content="+" Width="35" Command="{Binding AdjustSizeCommand}">
|
|
|
+ <Button.CommandParameter>
|
|
|
+ <system:Int32>1</system:Int32>
|
|
|
+ </Button.CommandParameter>
|
|
|
+ </Button>
|
|
|
+ </StackPanel>
|
|
|
+ <StackPanel Grid.Column="2" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right">
|
|
|
+ <TextBlock ui:Translator.Key="KERNEL_VIEW_SUM" Padding="0,0,2,0"
|
|
|
+ ui:Translator.TooltipKey="KERNEL_VIEW_SUM_TOOLTIP"
|
|
|
+ TextAlignment="Right"/>
|
|
|
+ <TextBlock Text="{Binding Sum, StringFormat='0.###'}"
|
|
|
+ ui:Translator.TooltipKey="KERNEL_VIEW_SUM_TOOLTIP"
|
|
|
+ TextAlignment="Right"/>
|
|
|
+ </StackPanel>
|
|
|
+ </Grid>
|
|
|
+
|
|
|
+ <ItemsControl ItemsSource="{Binding ReferenceCollections}" Margin="0,1">
|
|
|
<ItemsControl.ItemTemplate>
|
|
|
<DataTemplate>
|
|
|
- <ItemsControl ItemsSource="{Binding .}">
|
|
|
- <ItemsControl.ItemTemplate>
|
|
|
- <DataTemplate>
|
|
|
- <input:NumberInput Value="{Binding Value, Mode=TwoWay}"/>
|
|
|
- </DataTemplate>
|
|
|
- </ItemsControl.ItemTemplate>
|
|
|
- <ItemsControl.ItemsPanel>
|
|
|
- <ItemsPanelTemplate>
|
|
|
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch"/>
|
|
|
- </ItemsPanelTemplate>
|
|
|
- </ItemsControl.ItemsPanel>
|
|
|
- </ItemsControl>
|
|
|
+ <input:NumberInput Value="{Binding Value, Mode=TwoWay}" Decimals="4" />
|
|
|
</DataTemplate>
|
|
|
</ItemsControl.ItemTemplate>
|
|
|
+ <ItemsControl.ItemsPanel>
|
|
|
+ <ItemsPanelTemplate>
|
|
|
+ <UniformGrid Columns="{Binding Width}" Rows="{Binding Height}" />
|
|
|
+ </ItemsPanelTemplate>
|
|
|
+ </ItemsControl.ItemsPanel>
|
|
|
</ItemsControl>
|
|
|
</StackPanel>
|
|
|
-</properties:NodePropertyView>
|
|
|
+</properties:NodePropertyView>
|