Modifying points works
This commit is contained in:
+27
-28
@@ -8,7 +8,7 @@
|
||||
Width="500" Height="500"
|
||||
x:Class="GazpromApp.Views.NewPointDialog"
|
||||
x:DataType="vm:NewPointDialogViewModel"
|
||||
Title="NewPointDialog"
|
||||
Title="Создание нового объекта"
|
||||
Icon="/Assets/ic_fluent_home_add_24_filled (Custom).png"
|
||||
WindowStartupLocation="CenterOwner">
|
||||
<Design.DataContext>
|
||||
@@ -33,32 +33,28 @@
|
||||
<TextBox Grid.Column="1" Grid.Row="1" Margin="8"
|
||||
Text="{Binding Description}"/>
|
||||
<Panel Grid.Column="1" Grid.Row="2" Margin="8" IsVisible="{Binding !IsImagesEmpty}">
|
||||
<ScrollViewer HorizontalAlignment="Center">
|
||||
<StackPanel Orientation="Vertical" Spacing="6">
|
||||
<ItemsControl ItemsSource="{Binding Images}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<ScrollViewer>
|
||||
<StackPanel>
|
||||
<ItemsRepeater ItemsSource="{Binding Images}" HorizontalAlignment="Center">
|
||||
<ItemsRepeater.Layout>
|
||||
<UniformGridLayout Orientation="Horizontal" MaximumRowsOrColumns="1"/>
|
||||
</ItemsRepeater.Layout>
|
||||
<ItemsRepeater.ItemTemplate>
|
||||
<DataTemplate DataType="vm:ImageViewModel">
|
||||
<Grid Margin="6" Width="200" Height="200" Background="LightGray">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition MaxHeight="8"/>
|
||||
<RowDefinition MaxHeight="20"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition MaxWidth="20"/>
|
||||
<ColumnDefinition MaxWidth="8"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Stretch="Uniform" Width="200" Height="200" Grid.RowSpan="3" Grid.ColumnSpan="3" Source="{Binding FileName}" />
|
||||
<Button Grid.Row="1" Grid.Column="1" Width="20" Height="20"
|
||||
Command="{Binding #Root.((vm:NewPointDialogViewModel)DataContext).DeleteImage}"
|
||||
CommandParameter="{Binding .}">
|
||||
<Image Width="16" Height="16" Source="avares://GazpromApp/Assets/ic_fluent_delete_24_filled (Custom) 16.png"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
<Border Margin="4" CornerRadius="4" Background="LightGray">
|
||||
<Grid Margin="2" Width="200" Height="200" Background="LightGray"
|
||||
ColumnDefinitions="*,20,8" RowDefinitions="8,20,*">
|
||||
<Image Stretch="Uniform" Width="200" Height="200" Grid.RowSpan="3" Grid.ColumnSpan="3" Source="{Binding FileName}" />
|
||||
<Button Grid.Row="1" Grid.Column="1" Width="20" Height="20"
|
||||
Command="{Binding #Root.((vm:NewPointDialogViewModel)DataContext).DeleteImageCommand}"
|
||||
CommandParameter="{Binding .}">
|
||||
<Image Width="16" Height="16" Source="avares://GazpromApp/Assets/ic_fluent_delete_24_filled (Custom) 16.png"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</ItemsRepeater.ItemTemplate>
|
||||
</ItemsRepeater>
|
||||
<Button HorizontalAlignment="Center" IsVisible="True"
|
||||
Command="{Binding AddImageCommand}"
|
||||
CommandParameter="{Binding #Window}">
|
||||
@@ -67,15 +63,18 @@
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</Panel>
|
||||
<Panel Grid.Column="1" Grid.Row="2" Margin="8" IsVisible="{Binding IsImagesEmpty}">
|
||||
<Panel Grid.Column="1" Grid.Row="2" Margin="8"
|
||||
IsVisible="{Binding IsImagesEmpty}">
|
||||
<Button HorizontalAlignment="Center" IsVisible="True"
|
||||
Command="{Binding AddImageCommand}"
|
||||
CommandParameter="{Binding #Window}">
|
||||
<Image Width="24" Source="avares://GazpromApp/Assets/ic_fluent_camera_add_24_filled (Custom).png"/>
|
||||
</Button>
|
||||
</Panel>
|
||||
<Button Grid.Column="0" Grid.Row="3" Margin="8" Content="Отменить"/>
|
||||
<Button Grid.Column="0" Grid.Row="3" Margin="8" Content="Отменить"
|
||||
Command="{Binding CancelEnterPointCommand}"
|
||||
CommandParameter="{Binding #Window}"/>
|
||||
<Button Grid.Column="1" Grid.Row="3" Margin="8" Content="Добавить" HorizontalAlignment="Right"
|
||||
Command="{Binding EnterPoint}"/>
|
||||
Command="{Binding EnterPointCommand}"/>
|
||||
</Grid>
|
||||
</Window>
|
||||
Reference in New Issue
Block a user