101 lines
5.2 KiB
XML
101 lines
5.2 KiB
XML
<Window x:Class="Nodify.Calculator.CreateModelDialog"
|
||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
Title="Create New Model"
|
||
Width="500"
|
||
Height="420"
|
||
WindowStartupLocation="CenterOwner"
|
||
ResizeMode="NoResize"
|
||
Background="#2D2D30"
|
||
Foreground="White">
|
||
<Grid Margin="15">
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="*" />
|
||
<RowDefinition Height="Auto" />
|
||
</Grid.RowDefinitions>
|
||
|
||
<!-- Model/Class Name -->
|
||
<TextBlock Text="Model / Class Name:" Grid.Row="0" Margin="0 0 0 4" />
|
||
<TextBox x:Name="ModelNameBox" Grid.Row="1" Margin="0 0 0 10"
|
||
Background="#3E3E42" Foreground="White" Padding="4" />
|
||
|
||
<!-- Properties -->
|
||
<StackPanel Orientation="Horizontal" Grid.Row="2" Margin="0 0 0 4">
|
||
<TextBlock Text="Properties:" FontWeight="Bold" />
|
||
<Button Content="➕ Add" Margin="10 0 0 0" Padding="8 2" Click="AddProperty_Click"
|
||
Background="#3E3E42" Foreground="White" Cursor="Hand" />
|
||
</StackPanel>
|
||
<DataGrid x:Name="PropertiesGrid" Grid.Row="3" Margin="0 0 0 10"
|
||
AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="True"
|
||
Background="#3E3E42" Foreground="White" RowBackground="#3E3E42"
|
||
AlternatingRowBackground="#333337" GridLinesVisibility="None"
|
||
HeadersVisibility="Column" BorderBrush="#555">
|
||
<DataGrid.ColumnHeaderStyle>
|
||
<Style TargetType="DataGridColumnHeader">
|
||
<Setter Property="Background" Value="#2D2D30" />
|
||
<Setter Property="Foreground" Value="White" />
|
||
<Setter Property="Padding" Value="6 4" />
|
||
<Setter Property="BorderBrush" Value="#555" />
|
||
<Setter Property="BorderThickness" Value="0 0 1 1" />
|
||
</Style>
|
||
</DataGrid.ColumnHeaderStyle>
|
||
<DataGrid.Columns>
|
||
<DataGridTextColumn Header="Name" Binding="{Binding Name}" Width="*">
|
||
<DataGridTextColumn.ElementStyle>
|
||
<Style TargetType="TextBlock">
|
||
<Setter Property="Foreground" Value="White" />
|
||
</Style>
|
||
</DataGridTextColumn.ElementStyle>
|
||
<DataGridTextColumn.EditingElementStyle>
|
||
<Style TargetType="TextBox">
|
||
<Setter Property="Foreground" Value="Black" />
|
||
<Setter Property="Background" Value="White" />
|
||
</Style>
|
||
</DataGridTextColumn.EditingElementStyle>
|
||
</DataGridTextColumn>
|
||
<DataGridComboBoxColumn Header="Type" SelectedItemBinding="{Binding Type}" Width="120">
|
||
<DataGridComboBoxColumn.ElementStyle>
|
||
<Style TargetType="ComboBox">
|
||
<Setter Property="Foreground" Value="White" />
|
||
<Setter Property="Background" Value="#3E3E42" />
|
||
</Style>
|
||
</DataGridComboBoxColumn.ElementStyle>
|
||
<DataGridComboBoxColumn.EditingElementStyle>
|
||
<Style TargetType="ComboBox">
|
||
<Setter Property="Foreground" Value="Black" />
|
||
<Setter Property="Background" Value="White" />
|
||
</Style>
|
||
</DataGridComboBoxColumn.EditingElementStyle>
|
||
<DataGridComboBoxColumn.ItemsSource>
|
||
<x:Array Type="sys:String" xmlns:sys="clr-namespace:System;assembly=System.Runtime">
|
||
<sys:String>string</sys:String>
|
||
<sys:String>int</sys:String>
|
||
<sys:String>double</sys:String>
|
||
<sys:String>bool</sys:String>
|
||
<sys:String>float</sys:String>
|
||
<sys:String>decimal</sys:String>
|
||
<sys:String>long</sys:String>
|
||
<sys:String>DateTime</sys:String>
|
||
<sys:String>object</sys:String>
|
||
<sys:String>List<string></sys:String>
|
||
<sys:String>List<int></sys:String>
|
||
<sys:String>List<object></sys:String>
|
||
</x:Array>
|
||
</DataGridComboBoxColumn.ItemsSource>
|
||
</DataGridComboBoxColumn>
|
||
</DataGrid.Columns>
|
||
</DataGrid>
|
||
|
||
<!-- Buttons -->
|
||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="4">
|
||
<Button Content="Create" Width="80" Margin="0 0 10 0" Padding="4"
|
||
Click="OnCreateClick" IsDefault="True" />
|
||
<Button Content="Cancel" Width="80" Padding="4"
|
||
Click="OnCancelClick" IsCancel="True" />
|
||
</StackPanel>
|
||
</Grid>
|
||
</Window>
|