feat: testing and fixes

This commit is contained in:
2026-07-08 08:25:09 +03:00
parent 72ae26eee7
commit 5b6abc045b
6 changed files with 730 additions and 606 deletions
+374 -404
View File
@@ -185,9 +185,8 @@
IsReadOnly="True"
IsVisible="{Binding !IsNewRecord}"
PlaceholderText="Тип сепаратора"
>
<!-- <Run Text="{Binding Record.SeparatorType}" /> -->
</TextBox>
Text="{Binding Record.SeparatorType}"
/>
<!-- BrandComboBox (подпись) -->
<TextBlock
Grid.Row="2"
@@ -229,12 +228,13 @@
IsVisible="{Binding !IsNewRecord}"
PlaceholderText="Марка пробы"
>
<!-- <Run Text="{Binding Record.BrandName}" />
<Run Text=" - " />
<Run Text="{Binding Record.MixtureName}" />
<Run Text=" (" />
<Run Text="{Binding Record.MixtureNormalRate}" />
<Run Text=" кг/т)" /> -->
<TextBox.Text>
<MultiBinding StringFormat="{}{0} - {1} ({2} кг/т)" Mode="OneWay">
<Binding Path="Record.BrandName" />
<Binding Path="Record.MixtureName" />
<Binding Path="Record.MixtureNormalRate" />
</MultiBinding>
</TextBox.Text>
</TextBox>
<!-- SampleName (подпись) -->
@@ -365,234 +365,238 @@
<TextBlock Text="3"/>
</Button>
<!-- Изображения -->
<!-- Изображения -->
<Grid Grid.Column="0" Grid.Row="0" Grid.RowSpan="3">
<!-- Изображения -->
<Grid>
<!-- Изображения -->
<!-- Image -->
<Grid IsVisible="{Binding ImageIsVisible}">
<!-- Изображение -->
<core:ZoomPanImage
Background="Black"
HorizontalAlignment="Stretch"
ImageSource="{Binding Record.Image.Image}"
VerticalAlignment="Stretch"
>
<core:ZoomPanImage.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Converter="{x:Static StringConverters.IsNotNullOrEmpty}" Path="Record.Image.Data" />
<Binding Converter="{x:Static BoolConverters.Not}" Path="Record.Image.IsLoading" />
<Binding Converter="{x:Static BoolConverters.Not}" Path="ImagesIsCapturing" />
</MultiBinding>
</core:ZoomPanImage.IsVisible>
</core:ZoomPanImage>
<!-- Оверлей "Изображение загружается" -->
<StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Center" >
<StackPanel.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Path="Record.Image.IsLoading" />
<Binding Converter="{x:Static BoolConverters.Not}" Path="ImagesIsCapturing" />
</MultiBinding>
</StackPanel.IsVisible>
<ProgressBar IsIndeterminate="True" />
<TextBlock HorizontalAlignment="Center" Text="Изображение загружается" />
</StackPanel>
<!-- Оверлей "Изображение отсутствует" -->
<TextBlock
HorizontalAlignment="Center"
Text="Изображение отсутствует"
VerticalAlignment="Center"
>
<TextBlock.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Converter="{x:Static StringConverters.IsNullOrEmpty}" Path="Record.Image.Data" />
<Binding Converter="{x:Static BoolConverters.Not}" Path="Record.Image.IsLoading" />
<Binding Converter="{x:Static BoolConverters.Not}" Path="ImagesIsCapturing" />
</MultiBinding>
</TextBlock.IsVisible>
</TextBlock>
<!-- Оверлей прогресс -->
<StackPanel
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
>
<StackPanel.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Converter="{x:Static StringConverters.IsNullOrEmpty}" Path="Record.Image.Data" />
<Binding Converter="{x:Static BoolConverters.Not}" Path="Record.Image.IsLoading" />
<Binding Path="ImagesIsCapturing" />
</MultiBinding>
</StackPanel.IsVisible>
<ProgressBar IsIndeterminate="True" />
<TextBlock HorizontalAlignment="Center" Text="{Binding ImagesCapturingProgress}" />
</StackPanel>
</Grid>
<!-- Image -->
<Grid IsVisible="{Binding ImageIsVisible}" IsEnabled="{Binding ImageIsVisible}">
<!-- MaskImage -->
<Grid IsVisible="{Binding MaskImageIsVisible}">
<!-- Изображение -->
<core:ZoomPanImage
Background="Black"
HorizontalAlignment="Stretch"
ImageSource="{Binding Record.Image.Image}"
PanX="{Binding ImagesPanX, Mode=TwoWay}"
PanY="{Binding ImagesPanY, Mode=TwoWay}"
VerticalAlignment="Stretch"
Zoom="{Binding ImagesZoom, Mode=TwoWay}"
>
<core:ZoomPanImage.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Converter="{x:Static StringConverters.IsNotNullOrEmpty}" Path="Record.Image.Data" />
<Binding Converter="{x:Static BoolConverters.Not}" Path="Record.Image.IsLoading" />
<Binding Converter="{x:Static BoolConverters.Not}" Path="ImagesIsCapturing" />
</MultiBinding>
</core:ZoomPanImage.IsVisible>
<!-- Изображение -->
<core:ZoomPanImage
Background="Black"
HorizontalAlignment="Stretch"
ImageSource="{Binding Record.MaskImage.Image}"
VerticalAlignment="Stretch"
>
</core:ZoomPanImage>
<core:ZoomPanImage.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Converter="{x:Static StringConverters.IsNotNullOrEmpty}" Path="Record.MaskImage.Data" />
<Binding Converter="{x:Static BoolConverters.Not}" Path="Record.MaskImage.IsLoading" />
<Binding Converter="{x:Static BoolConverters.Not}" Path="ImagesIsCapturing" />
</MultiBinding>
</core:ZoomPanImage.IsVisible>
<!-- Оверлей "Изображение загружается" -->
<StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Center" >
</core:ZoomPanImage>
<StackPanel.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Path="Record.Image.IsLoading" />
<Binding Converter="{x:Static BoolConverters.Not}" Path="ImagesIsCapturing" />
</MultiBinding>
</StackPanel.IsVisible>
<!-- Оверлей "Изображение загружается" -->
<StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Center" >
<StackPanel.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Path="Record.MaskImage.IsLoading" />
<Binding Converter="{x:Static BoolConverters.Not}" Path="ImagesIsCapturing" />
</MultiBinding>
</StackPanel.IsVisible>
<ProgressBar IsIndeterminate="True" />
<TextBlock HorizontalAlignment="Center" Text="Изображение загружается" />
</StackPanel>
<!-- Оверлей "Изображение отсутствует" -->
<TextBlock
HorizontalAlignment="Center"
Text="Изображение отсутствует"
VerticalAlignment="Center"
>
<TextBlock.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Converter="{x:Static StringConverters.IsNullOrEmpty}" Path="Record.MaskImage.Data" />
<Binding Converter="{x:Static BoolConverters.Not}" Path="Record.MaskImage.IsLoading" />
<Binding Converter="{x:Static BoolConverters.Not}" Path="ImagesIsCapturing" />
</MultiBinding>
</TextBlock.IsVisible>
</TextBlock>
<!-- Оверлей прогресс -->
<StackPanel
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
>
<ProgressBar IsIndeterminate="True" />
<StackPanel.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Converter="{x:Static StringConverters.IsNullOrEmpty}" Path="Record.MaskImage.Data" />
<Binding Converter="{x:Static BoolConverters.Not}" Path="Record.MaskImage.IsLoading" />
<Binding Path="ImagesIsCapturing" />
</MultiBinding>
</StackPanel.IsVisible>
<TextBlock HorizontalAlignment="Center" Text="Изображение загружается" />
<ProgressBar IsIndeterminate="True" />
</StackPanel>
<TextBlock HorizontalAlignment="Center" Text="{Binding ImagesCapturingProgress}" />
<!-- Оверлей "Изображение отсутствует" -->
<TextBlock
HorizontalAlignment="Center"
Text="Изображение отсутствует"
VerticalAlignment="Center"
>
<TextBlock.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Converter="{x:Static StringConverters.IsNullOrEmpty}" Path="Record.Image.Data" />
<Binding Converter="{x:Static BoolConverters.Not}" Path="Record.Image.IsLoading" />
<Binding Converter="{x:Static BoolConverters.Not}" Path="ImagesIsCapturing" />
</MultiBinding>
</TextBlock.IsVisible>
</TextBlock>
</StackPanel>
</Grid>
<!-- Оверлей прогресс -->
<StackPanel
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
>
<!-- ResultImage -->
<Grid IsVisible="{Binding ResultImageIsVisible}">
<StackPanel.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Converter="{x:Static StringConverters.IsNullOrEmpty}" Path="Record.Image.Data" />
<Binding Converter="{x:Static BoolConverters.Not}" Path="Record.Image.IsLoading" />
<Binding Path="ImagesIsCapturing" />
</MultiBinding>
</StackPanel.IsVisible>
<ProgressBar IsIndeterminate="True" />
<TextBlock HorizontalAlignment="Center" Text="{Binding ImagesCapturingProgress}" />
</StackPanel>
</Grid>
<!-- MaskImage -->
<Grid IsVisible="{Binding MaskImageIsVisible}" IsEnabled="{Binding MaskImageIsVisible}">
<!-- Изображение -->
<core:ZoomPanImage
Background="Black"
HorizontalAlignment="Stretch"
ImageSource="{Binding Record.MaskImage.Image}"
PanX="{Binding ImagesPanX, Mode=TwoWay}"
PanY="{Binding ImagesPanY, Mode=TwoWay}"
VerticalAlignment="Stretch"
Zoom="{Binding ImagesZoom, Mode=TwoWay}"
>
<core:ZoomPanImage.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Converter="{x:Static StringConverters.IsNotNullOrEmpty}" Path="Record.MaskImage.Data" />
<Binding Converter="{x:Static BoolConverters.Not}" Path="Record.MaskImage.IsLoading" />
<Binding Converter="{x:Static BoolConverters.Not}" Path="ImagesIsCapturing" />
</MultiBinding>
</core:ZoomPanImage.IsVisible>
</core:ZoomPanImage>
<!-- Оверлей "Изображение загружается" -->
<StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Center" >
<StackPanel.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Path="Record.MaskImage.IsLoading" />
<Binding Converter="{x:Static BoolConverters.Not}" Path="ImagesIsCapturing" />
</MultiBinding>
</StackPanel.IsVisible>
<ProgressBar IsIndeterminate="True" />
<!-- Изображение -->
<core:ZoomPanImage
Background="Black"
HorizontalAlignment="Stretch"
ImageSource="{Binding Record.ResultImage.Image}"
VerticalAlignment="Stretch"
>
<TextBlock HorizontalAlignment="Center" Text="Изображение загружается" />
<core:ZoomPanImage.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Converter="{x:Static StringConverters.IsNotNullOrEmpty}" Path="Record.ResultImage.Data" />
<Binding Converter="{x:Static BoolConverters.Not}" Path="Record.ResultImage.IsLoading" />
<Binding Converter="{x:Static BoolConverters.Not}" Path="ImagesIsCapturing" />
</MultiBinding>
</core:ZoomPanImage.IsVisible>
</StackPanel>
</core:ZoomPanImage>
<!-- Оверлей "Изображение отсутствует" -->
<TextBlock
HorizontalAlignment="Center"
Text="Изображение отсутствует"
VerticalAlignment="Center"
>
<TextBlock.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Converter="{x:Static StringConverters.IsNullOrEmpty}" Path="Record.MaskImage.Data" />
<Binding Converter="{x:Static BoolConverters.Not}" Path="Record.MaskImage.IsLoading" />
<Binding Converter="{x:Static BoolConverters.Not}" Path="ImagesIsCapturing" />
</MultiBinding>
</TextBlock.IsVisible>
</TextBlock>
<!-- Оверлей "Изображение загружается" -->
<StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Center" >
<!-- Оверлей прогресс -->
<StackPanel
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
>
<StackPanel.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Converter="{x:Static StringConverters.IsNullOrEmpty}" Path="Record.MaskImage.Data" />
<Binding Converter="{x:Static BoolConverters.Not}" Path="Record.MaskImage.IsLoading" />
<Binding Path="ImagesIsCapturing" />
</MultiBinding>
</StackPanel.IsVisible>
<StackPanel.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Path="Record.ResultImage.IsLoading" />
<Binding Converter="{x:Static BoolConverters.Not}" Path="ImagesIsCapturing" />
</MultiBinding>
</StackPanel.IsVisible>
<ProgressBar IsIndeterminate="True" />
<ProgressBar IsIndeterminate="True" />
<TextBlock HorizontalAlignment="Center" Text="Изображение загружается" />
<TextBlock HorizontalAlignment="Center" Text="{Binding ImagesCapturingProgress}" />
</StackPanel>
</StackPanel>
<!-- Оверлей "Изображение отсутствует" -->
<TextBlock
HorizontalAlignment="Center"
Text="Изображение отсутствует"
VerticalAlignment="Center"
>
<TextBlock.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Converter="{x:Static StringConverters.IsNullOrEmpty}" Path="Record.ResultImage.Data" />
<Binding Converter="{x:Static BoolConverters.Not}" Path="Record.ResultImage.IsLoading" />
<Binding Converter="{x:Static BoolConverters.Not}" Path="ImagesIsCapturing" />
</MultiBinding>
</TextBlock.IsVisible>
</TextBlock>
</Grid>
<!-- ResultImage -->
<Grid IsVisible="{Binding ResultImageIsVisible}" IsEnabled="{Binding ResultImageIsVisible}">
<!-- Изображение -->
<core:ZoomPanImage
Background="Black"
HorizontalAlignment="Stretch"
ImageSource="{Binding Record.ResultImage.Image}"
PanX="{Binding ImagesPanX, Mode=TwoWay}"
PanY="{Binding ImagesPanY, Mode=TwoWay}"
VerticalAlignment="Stretch"
Zoom="{Binding ImagesZoom, Mode=TwoWay}"
>
<!-- Оверлей прогресс -->
<StackPanel
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
>
<core:ZoomPanImage.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Converter="{x:Static StringConverters.IsNotNullOrEmpty}" Path="Record.ResultImage.Data" />
<Binding Converter="{x:Static BoolConverters.Not}" Path="Record.ResultImage.IsLoading" />
<Binding Converter="{x:Static BoolConverters.Not}" Path="ImagesIsCapturing" />
</MultiBinding>
</core:ZoomPanImage.IsVisible>
</core:ZoomPanImage>
<!-- Оверлей "Изображение загружается" -->
<StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Center" >
<StackPanel.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Path="Record.ResultImage.IsLoading" />
<Binding Converter="{x:Static BoolConverters.Not}" Path="ImagesIsCapturing" />
</MultiBinding>
</StackPanel.IsVisible>
<ProgressBar IsIndeterminate="True" />
<StackPanel.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Converter="{x:Static StringConverters.IsNullOrEmpty}" Path="Record.ResultImage.Data" />
<Binding Converter="{x:Static BoolConverters.Not}" Path="Record.ResultImage.IsLoading" />
<Binding Path="ImagesIsCapturing" />
</MultiBinding>
</StackPanel.IsVisible>
<TextBlock HorizontalAlignment="Center" Text="Изображение загружается" />
<ProgressBar IsIndeterminate="True" />
</StackPanel>
<TextBlock HorizontalAlignment="Center" Text="{Binding ImagesCapturingProgress}" />
<!-- Оверлей "Изображение отсутствует" -->
<TextBlock
HorizontalAlignment="Center"
Text="Изображение отсутствует"
VerticalAlignment="Center"
>
<TextBlock.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Converter="{x:Static StringConverters.IsNullOrEmpty}" Path="Record.ResultImage.Data" />
<Binding Converter="{x:Static BoolConverters.Not}" Path="Record.ResultImage.IsLoading" />
<Binding Converter="{x:Static BoolConverters.Not}" Path="ImagesIsCapturing" />
</MultiBinding>
</TextBlock.IsVisible>
</TextBlock>
</StackPanel>
<!-- Оверлей прогресс -->
<StackPanel
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
>
<StackPanel.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Converter="{x:Static StringConverters.IsNullOrEmpty}" Path="Record.ResultImage.Data" />
<Binding Converter="{x:Static BoolConverters.Not}" Path="Record.ResultImage.IsLoading" />
<Binding Path="ImagesIsCapturing" />
</MultiBinding>
</StackPanel.IsVisible>
</Grid>
<ProgressBar IsIndeterminate="True" />
<TextBlock HorizontalAlignment="Center" Text="{Binding ImagesCapturingProgress}" />
</StackPanel>
</Grid>
@@ -657,7 +661,7 @@
Grid.Row="1"
IsReadOnly="True"
PlaceholderText="Средняя норм. обр. площадь"
Text="{Binding Record.MeanProcessedArea}"
Text="{Binding Record.MeanProcessedArea, StringFormat={}{0:F4}}"
/>
<!-- ProcessedAreaP50 (подпись) -->
<TextBlock
@@ -673,7 +677,7 @@
Grid.Row="1"
IsReadOnly="True"
PlaceholderText="XXX"
Text="{Binding Record.ProcessedAreaP50}"
Text="{Binding Record.ProcessedAreaP50, StringFormat={}{0:F4}}"
/>
<!-- ProcessedAreaP10 (подпись) -->
<TextBlock
@@ -689,7 +693,7 @@
Grid.Row="3"
IsReadOnly="True"
PlaceholderText="10-й процентиль"
Text="{Binding Record.ProcessedAreaP10}"
Text="{Binding Record.ProcessedAreaP10, StringFormat={}{0:F4}}"
/>
<!-- ProcessedAreaP90 (подпись) -->
<TextBlock
@@ -705,7 +709,7 @@
Grid.Row="3"
IsReadOnly="True"
PlaceholderText="90-й процентиль"
Text="{Binding Record.ProcessedAreaP90}"
Text="{Binding Record.ProcessedAreaP90, StringFormat={}{0:F4}}"
/>
<!-- ProcessedAreaDeltaP90P10 (подпись) -->
<TextBlock
@@ -721,7 +725,7 @@
Grid.Row="3"
IsReadOnly="True"
PlaceholderText="Ширина центрального диапазона"
Text="{Binding Record.ProcessedAreaDeltaP90P10}"
Text="{Binding Record.ProcessedAreaDeltaP90P10, StringFormat={}{0:F4}}"
/>
<!-- ProcessedAreaStdDev (подпись) -->
<TextBlock
@@ -737,7 +741,7 @@
Grid.Row="5"
IsReadOnly="True"
PlaceholderText="Межгранульное СКО"
Text="{Binding Record.ProcessedAreaStdDev}"
Text="{Binding Record.ProcessedAreaStdDev, StringFormat={}{0:F4}}"
/>
<!-- InterHeterogeneity (подпись) -->
<TextBlock
@@ -753,7 +757,7 @@
Grid.Row="5"
IsReadOnly="True"
PlaceholderText="Межгранульная неоднородность"
Text="{Binding Record.InterHeterogeneity}"
Text="{Binding Record.InterHeterogeneity, StringFormat={}{0:F4}}"
/>
<!-- UnprocessedFraction (подпись) -->
<TextBlock
@@ -769,7 +773,7 @@
Grid.Row="5"
IsReadOnly="True"
PlaceholderText="Доля необработанных гранул"
Text="{Binding Record.UnprocessedFraction}"
Text="{Binding Record.UnprocessedFraction, StringFormat={}{0:F4}}"
/>
<!-- MeanInnerHeterogeneity (подпись) -->
<TextBlock
@@ -785,7 +789,7 @@
Grid.Row="7"
IsReadOnly="True"
PlaceholderText="Ср. внутригранульная однородность"
Text="{Binding Record.MeanInnerHeterogeneity}"
Text="{Binding Record.MeanInnerHeterogeneity, StringFormat={}{0:F4}}"
/>
<!-- MeanHotspotArea (подпись) -->
<TextBlock
@@ -801,7 +805,7 @@
Grid.Row="7"
IsReadOnly="True"
PlaceholderText="Ср. горячая площадь"
Text="{Binding Record.MeanHotspotArea}"
Text="{Binding Record.MeanHotspotArea, StringFormat={}{0:F4}}"
/>
<!-- MeanOpticalIntegral (подпись) -->
<TextBlock
@@ -817,7 +821,7 @@
Grid.Row="7"
IsReadOnly="True"
PlaceholderText="Ср. инт. опт. показатель"
Text="{Binding Record.MeanOpticalIntegral}"
Text="{Binding Record.MeanOpticalIntegral, StringFormat={}{0:F4}}"
/>
</Grid>
@@ -856,30 +860,6 @@
</Grid>
<!-- Гистограмма нормированных необработанных площадей -->
<Grid>
<!-- Гистограмма -->
<lvc:CartesianChart
HorizontalAlignment="Stretch"
IsVisible="{Binding Path=Record.ParticlesCount, Converter={StaticResource GreaterThanConverter}, ConverterParameter=0}"
Series="{Binding Record.UnprocessedAreasHistogram.Series, Mode=OneWay}"
VerticalAlignment="Stretch"
x:Name="UnprocessedAreasHistogram"
XAxes="{Binding Record.UnprocessedAreasHistogram.XAxis, Mode=OneWay}"
YAxes="{Binding Record.UnprocessedAreasHistogram.YAxis, Mode=OneWay}"
/>
<!-- Оверлей "Нет информации" -->
<TextBlock
HorizontalAlignment="Center"
IsVisible="{Binding Path=Record.ParticlesCount, Converter={StaticResource LessThanOrEqualConverter}, ConverterParameter=0}"
Text="Нет информации"
VerticalAlignment="Center"
/>
</Grid>
<!-- Гистограмма нормированных площадей хотспотов -->
<Grid>
@@ -1133,192 +1113,182 @@
</Grid>
<!-- Изображения -->
<Grid Grid.Column="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/> <!-- Изображения -->
<ColumnDefinition Width="Auto"/> <!-- Кнопки -->
</Grid.ColumnDefinitions>
<Grid.ColumnSpacing>5</Grid.ColumnSpacing>
<Grid.RowDefinitions>
<RowDefinition Height="*" /> <!-- Изображения -->
<RowDefinition Height="*" /> <!-- Гистограмма -->
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.RowSpacing>5</Grid.RowSpacing>
<!-- Изображения -->
<Grid Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/> <!-- Изображения -->
<ColumnDefinition Width="Auto"/> <!-- Кнопки -->
</Grid.ColumnDefinitions>
<!-- Кнопки переключения -->
<!-- ParticleImage -->
<Button
Classes="vertical"
Command="{Binding Record.SwitchToImageCommand}"
Grid.Column="1"
Grid.Row="0"
VerticalAlignment="Stretch"
>
<TextBlock Text="1"/>
</Button>
<Grid.ColumnSpacing>5</Grid.ColumnSpacing>
<!-- ParticleMaskImage -->
<Button
Classes="vertical"
Command="{Binding Record.SwitchToMaskImageCommand}"
Grid.Column="1"
Grid.Row="1"
VerticalAlignment="Stretch"
>
<TextBlock Text="2"/>
</Button>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!-- ParticleResultImage -->
<Button
Classes="vertical"
Command="{Binding Record.SwitchToResultImageCommand}"
Grid.Column="1"
Grid.Row="2"
VerticalAlignment="Stretch"
>
<TextBlock Text="3"/>
</Button>
<Grid.RowSpacing>5</Grid.RowSpacing>
<!-- Изображения -->
<Grid Grid.Column="0" Grid.Row="0" Grid.RowSpan="3">
<!-- Кнопки переключения -->
<!-- ParticleImage -->
<Button
Classes="vertical"
Command="{Binding Record.SwitchToImageCommand}"
Grid.Column="1"
Grid.Row="0"
VerticalAlignment="Stretch"
>
<TextBlock Text="1"/>
</Button>
<!-- ParticleMaskImage -->
<Button
Classes="vertical"
Command="{Binding Record.SwitchToMaskImageCommand}"
Grid.Column="1"
Grid.Row="1"
VerticalAlignment="Stretch"
>
<TextBlock Text="2"/>
</Button>
<!-- ParticleResultImage -->
<Button
Classes="vertical"
Command="{Binding Record.SwitchToResultImageCommand}"
Grid.Column="1"
Grid.Row="2"
VerticalAlignment="Stretch"
>
<TextBlock Text="3"/>
</Button>
<!-- Изображения -->
<Grid Grid.Column="0" Grid.Row="0" Grid.RowSpan="3">
<!-- Изображения -->
<Grid x:Name="PraticleImagesGrid" Bounds="{Binding Record.ParticleImagesBounds, Mode=OneWayToSource, UpdateSourceTrigger=PropertyChanged}">
<!-- Изображения -->
<Grid>
<!-- Изображения -->
<!-- ParticleImage -->
<Grid IsVisible="{Binding Record.ParticleImageIsVisible}">
<!-- Изображение -->
<core:ZoomPanImage
Background="Black"
HorizontalAlignment="Stretch"
ImageSource="{Binding Record.ParticleImage.Image}"
VerticalAlignment="Stretch"
>
<core:ZoomPanImage.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Converter="{x:Static StringConverters.IsNotNullOrEmpty}" Path="Record.ParticleImage.Data" />
</MultiBinding>
</core:ZoomPanImage.IsVisible>
</core:ZoomPanImage>
<!-- Оверлей "Изображение отсутствует" -->
<TextBlock
HorizontalAlignment="Center"
Text="Изображение отсутствует"
VerticalAlignment="Center"
>
<TextBlock.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Converter="{x:Static StringConverters.IsNullOrEmpty}" Path="Record.ParticleImage.Data" />
</MultiBinding>
</TextBlock.IsVisible>
</TextBlock>
</Grid>
<!-- ParticleImage -->
<Grid IsVisible="{Binding Record.ParticleImageIsVisible}">
<!-- ParticleMaskImage -->
<Grid IsVisible="{Binding Record.ParticleMaskImageIsVisible}">
<!-- Изображение -->
<core:ZoomPanImage
Background="Black"
HorizontalAlignment="Stretch"
ImageSource="{Binding Record.ParticleMaskImage.Image}"
VerticalAlignment="Stretch"
>
<!-- Изображение -->
<core:ZoomPanImage
Background="Black"
CanUserZoomPan="False"
HorizontalAlignment="Stretch"
ImageSource="{Binding Record.Image.Image}"
PanX="{Binding Record.ParticleImagesPanX}"
PanY="{Binding Record.ParticleImagesPanY}"
VerticalAlignment="Stretch"
Zoom="{Binding Record.ParticleImagesZoom}"
>
<core:ZoomPanImage.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Converter="{x:Static StringConverters.IsNotNullOrEmpty}" Path="Record.ParticleMaskImage.Data" />
</MultiBinding>
</core:ZoomPanImage.IsVisible>
<core:ZoomPanImage.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Converter="{x:Static StringConverters.IsNotNullOrEmpty}" Path="Record.Image.Data" />
</MultiBinding>
</core:ZoomPanImage.IsVisible>
</core:ZoomPanImage>
</core:ZoomPanImage>
<!-- Оверлей "Изображение отсутствует" -->
<TextBlock
HorizontalAlignment="Center"
Text="Изображение отсутствует"
VerticalAlignment="Center"
>
<TextBlock.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Converter="{x:Static StringConverters.IsNullOrEmpty}" Path="Record.Image.Data" />
</MultiBinding>
</TextBlock.IsVisible>
</TextBlock>
<!-- Оверлей "Изображение отсутствует" -->
<TextBlock
HorizontalAlignment="Center"
Text="Изображение отсутствует"
VerticalAlignment="Center"
>
<TextBlock.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Converter="{x:Static StringConverters.IsNullOrEmpty}" Path="Record.ParticleMaskImage.Data" />
</MultiBinding>
</TextBlock.IsVisible>
</TextBlock>
</Grid>
</Grid>
<!-- ParticleMaskImage -->
<Grid IsVisible="{Binding Record.ParticleMaskImageIsVisible}">
<!-- ParticleResultImage -->
<Grid IsVisible="{Binding Record.ParticleResultImageIsVisible}">
<!-- Изображение -->
<core:ZoomPanImage
Background="Black"
HorizontalAlignment="Stretch"
ImageSource="{Binding Record.ParticleResultImage.Image}"
VerticalAlignment="Stretch"
>
<!-- Изображение -->
<core:ZoomPanImage
Background="Black"
CanUserZoomPan="False"
HorizontalAlignment="Stretch"
ImageSource="{Binding Record.MaskImage.Image}"
PanX="{Binding Record.ParticleImagesPanX}"
PanY="{Binding Record.ParticleImagesPanY}"
VerticalAlignment="Stretch"
Zoom="{Binding Record.ParticleImagesZoom}"
>
<core:ZoomPanImage.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Converter="{x:Static StringConverters.IsNotNullOrEmpty}" Path="Record.ParticleResultImage.Data" />
</MultiBinding>
</core:ZoomPanImage.IsVisible>
<core:ZoomPanImage.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Converter="{x:Static StringConverters.IsNotNullOrEmpty}" Path="Record.MaskImage.Data" />
</MultiBinding>
</core:ZoomPanImage.IsVisible>
</core:ZoomPanImage>
</core:ZoomPanImage>
<!-- Оверлей "Изображение отсутствует" -->
<TextBlock
HorizontalAlignment="Center"
Text="Изображение отсутствует"
VerticalAlignment="Center"
>
<TextBlock.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Converter="{x:Static StringConverters.IsNullOrEmpty}" Path="Record.ParticleResultImage.Data" />
</MultiBinding>
</TextBlock.IsVisible>
</TextBlock>
<!-- Оверлей "Изображение отсутствует" -->
<TextBlock
HorizontalAlignment="Center"
Text="Изображение отсутствует"
VerticalAlignment="Center"
>
<TextBlock.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Converter="{x:Static StringConverters.IsNullOrEmpty}" Path="Record.MaskImage.Data" />
</MultiBinding>
</TextBlock.IsVisible>
</TextBlock>
</Grid>
</Grid>
<!-- ParticleResultImage -->
<Grid IsVisible="{Binding Record.ParticleResultImageIsVisible}">
<!-- Изображение -->
<core:ZoomPanImage
Background="Black"
CanUserZoomPan="False"
HorizontalAlignment="Stretch"
ImageSource="{Binding Record.ResultImage.Image}"
PanX="{Binding Record.ParticleImagesPanX}"
PanY="{Binding Record.ParticleImagesPanY}"
VerticalAlignment="Stretch"
Zoom="{Binding Record.ParticleImagesZoom}"
>
<core:ZoomPanImage.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Converter="{x:Static StringConverters.IsNotNullOrEmpty}" Path="Record.ResultImage.Data" />
</MultiBinding>
</core:ZoomPanImage.IsVisible>
</core:ZoomPanImage>
<!-- Оверлей "Изображение отсутствует" -->
<TextBlock
HorizontalAlignment="Center"
Text="Изображение отсутствует"
VerticalAlignment="Center"
>
<TextBlock.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Converter="{x:Static StringConverters.IsNullOrEmpty}" Path="Record.ResultImage.Data" />
</MultiBinding>
</TextBlock.IsVisible>
</TextBlock>
</Grid>
</Grid>
</Grid>
<lvc:CartesianChart
Grid.Row="1"
HorizontalAlignment="Stretch"
IsVisible="{Binding Path=Record.ParticlesCount, Converter={StaticResource GreaterThanConverter}, ConverterParameter=0}"
Series="{Binding Record.ParticleValuesHistogram.Series, Mode=OneWay}"
VerticalAlignment="Stretch"
x:Name="ParticleValuesHistogram"
XAxes="{Binding Record.ParticleValuesHistogram.XAxis, Mode=OneWay}"
YAxes="{Binding Record.ParticleValuesHistogram.YAxis, Mode=OneWay}"
/>
</Grid>