2025-02-10 20:53:40 +08:00
|
|
|
<ui:FluentWindowEx
|
2025-04-24 20:56:44 +08:00
|
|
|
Height="450"
|
|
|
|
|
MinHeight="450"
|
|
|
|
|
Title="碰撞报告"
|
|
|
|
|
Width="700"
|
|
|
|
|
d:DataContext="{d:DesignInstance Type=local:ClashReportViewModel}"
|
|
|
|
|
mc:Ignorable="d"
|
|
|
|
|
x:Class="ShrlAlgoToolkit.RevitAddins.RvMEP.ClashReportView"
|
2024-09-22 11:05:41 +08:00
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
|
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
|
|
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
2025-04-24 20:56:44 +08:00
|
|
|
xmlns:local="clr-namespace:ShrlAlgoToolkit.RevitAddins.RvMEP"
|
2024-09-22 11:05:41 +08:00
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
2025-02-10 20:53:40 +08:00
|
|
|
xmlns:ui="https://github.com/ShrlAlgo/WPFluent"
|
2025-04-24 20:56:44 +08:00
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
2024-09-22 11:05:41 +08:00
|
|
|
<Window.Resources>
|
|
|
|
|
<ResourceDictionary>
|
|
|
|
|
<ResourceDictionary.MergedDictionaries>
|
2025-04-24 20:56:10 +08:00
|
|
|
<ResourceDictionary Source="pack://application:,,,/ShrlAlgoToolkit.RevitAddins;component/WPFUI.xaml" />
|
2024-09-22 11:05:41 +08:00
|
|
|
</ResourceDictionary.MergedDictionaries>
|
|
|
|
|
</ResourceDictionary>
|
|
|
|
|
</Window.Resources>
|
2025-04-24 20:56:10 +08:00
|
|
|
<ui:AutoGrid
|
2024-09-22 11:05:41 +08:00
|
|
|
ChildMargin="5"
|
|
|
|
|
Columns="*"
|
|
|
|
|
Rows="*,Auto">
|
|
|
|
|
<DataGrid
|
|
|
|
|
AutoGenerateColumns="True"
|
|
|
|
|
CanUserAddRows="True"
|
|
|
|
|
IsReadOnly="True"
|
|
|
|
|
ItemsSource="{Binding CurrentViewItems.DefaultView}"
|
|
|
|
|
VerticalScrollBarVisibility="Visible">
|
|
|
|
|
<b:Interaction.Triggers>
|
|
|
|
|
<b:EventTrigger EventName="MouseDoubleClick">
|
|
|
|
|
<b:InvokeCommandAction Command="{Binding LocationCommand}" CommandParameter="{Binding SelectedItem, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}, Mode=FindAncestor}}" />
|
|
|
|
|
</b:EventTrigger>
|
|
|
|
|
</b:Interaction.Triggers>
|
|
|
|
|
<DataGrid.Template>
|
|
|
|
|
<ControlTemplate>
|
|
|
|
|
<Border
|
|
|
|
|
Background="{TemplateBinding Background}"
|
|
|
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
|
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
2025-04-24 20:56:44 +08:00
|
|
|
Padding="{TemplateBinding Padding}"
|
2024-09-22 11:05:41 +08:00
|
|
|
SnapsToDevicePixels="True">
|
|
|
|
|
<ScrollViewer
|
|
|
|
|
CanContentScroll="True"
|
2025-04-24 20:56:44 +08:00
|
|
|
Focusable="false"
|
|
|
|
|
x:Name="DG_ScrollViewer">
|
2024-09-22 11:05:41 +08:00
|
|
|
<b:Interaction.Triggers>
|
|
|
|
|
<b:EventTrigger EventName="ScrollChanged">
|
|
|
|
|
<b:InvokeCommandAction Command="{Binding LvScrollCommand}" CommandParameter="{Binding RelativeSource={RelativeSource AncestorType={x:Type ScrollViewer}, Mode=FindAncestor}}" />
|
|
|
|
|
</b:EventTrigger>
|
|
|
|
|
</b:Interaction.Triggers>
|
|
|
|
|
<ScrollViewer.Template>
|
|
|
|
|
<ControlTemplate TargetType="{x:Type ScrollViewer}">
|
|
|
|
|
<Grid>
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="Auto" />
|
|
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
|
<ColumnDefinition Width="Auto" />
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
|
<RowDefinition Height="*" />
|
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
<Button
|
|
|
|
|
Command="{x:Static DataGrid.SelectAllCommand}"
|
|
|
|
|
Focusable="false"
|
|
|
|
|
Style="{DynamicResource {ComponentResourceKey ResourceId=DataGridSelectAllButtonStyle,
|
|
|
|
|
TypeInTargetAssembly={x:Type DataGrid}}}"
|
2025-04-24 20:56:44 +08:00
|
|
|
Visibility="{Binding HeadersVisibility, ConverterParameter={x:Static DataGridHeadersVisibility.All}, Converter={x:Static DataGrid.HeadersVisibilityConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"
|
|
|
|
|
Width="{Binding CellsPanelHorizontalOffset, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" />
|
2024-09-22 11:05:41 +08:00
|
|
|
<DataGridColumnHeadersPresenter
|
|
|
|
|
Grid.Column="1"
|
2025-04-24 20:56:44 +08:00
|
|
|
Visibility="{Binding HeadersVisibility, ConverterParameter={x:Static DataGridHeadersVisibility.Column}, Converter={x:Static DataGrid.HeadersVisibilityConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"
|
|
|
|
|
x:Name="PART_ColumnHeadersPresenter" />
|
2024-09-22 11:05:41 +08:00
|
|
|
<ScrollContentPresenter
|
2025-04-24 20:56:44 +08:00
|
|
|
CanContentScroll="{TemplateBinding CanContentScroll}"
|
2024-09-22 11:05:41 +08:00
|
|
|
Grid.ColumnSpan="2"
|
|
|
|
|
Grid.Row="1"
|
2025-04-24 20:56:44 +08:00
|
|
|
x:Name="PART_ScrollContentPresenter" />
|
|
|
|
|
<ScrollBar
|
2024-09-22 11:05:41 +08:00
|
|
|
Grid.Column="2"
|
2025-04-24 20:56:44 +08:00
|
|
|
Grid.Row="1"
|
2024-09-22 11:05:41 +08:00
|
|
|
Maximum="{TemplateBinding ScrollableHeight}"
|
|
|
|
|
Orientation="Vertical"
|
2025-04-24 20:56:44 +08:00
|
|
|
Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource Mode=TemplatedParent}}"
|
2024-09-22 11:05:41 +08:00
|
|
|
ViewportSize="{TemplateBinding ViewportHeight}"
|
|
|
|
|
Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
|
2025-04-24 20:56:44 +08:00
|
|
|
x:Name="PART_VerticalScrollBar" />
|
|
|
|
|
<Grid Grid.Column="1" Grid.Row="2">
|
2024-09-22 11:05:41 +08:00
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="{Binding NonFrozenColumnsViewportHorizontalOffset, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" />
|
|
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<ScrollBar
|
|
|
|
|
Grid.Column="1"
|
|
|
|
|
Maximum="{TemplateBinding ScrollableWidth}"
|
|
|
|
|
Orientation="Horizontal"
|
2025-04-24 20:56:44 +08:00
|
|
|
Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource Mode=TemplatedParent}}"
|
2024-09-22 11:05:41 +08:00
|
|
|
ViewportSize="{TemplateBinding ViewportWidth}"
|
|
|
|
|
Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
|
2025-04-24 20:56:44 +08:00
|
|
|
x:Name="PART_HorizontalScrollBar" />
|
2024-09-22 11:05:41 +08:00
|
|
|
</Grid>
|
|
|
|
|
</Grid>
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</ScrollViewer.Template>
|
|
|
|
|
<StackPanel IsItemsHost="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
|
|
|
|
</ScrollViewer>
|
|
|
|
|
</Border>
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</DataGrid.Template>
|
|
|
|
|
</DataGrid>
|
2025-04-24 20:56:10 +08:00
|
|
|
<ui:StackPanel
|
2024-09-22 11:05:41 +08:00
|
|
|
Grid.Row="1"
|
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
|
Orientation="Horizontal"
|
|
|
|
|
Spacing="5">
|
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
|
<CheckBox
|
|
|
|
|
Content="当前视图"
|
|
|
|
|
IsChecked="{Binding InCurrentView, UpdateSourceTrigger=PropertyChanged}"
|
|
|
|
|
ToolTip="在当前视图中去定位" />
|
|
|
|
|
<CheckBox
|
|
|
|
|
Content="修改剖面框"
|
|
|
|
|
IsChecked="{Binding IsSetSectionBox, UpdateSourceTrigger=PropertyChanged}"
|
|
|
|
|
ToolTip="只选中构件,不修改剖面框" />
|
|
|
|
|
</StackPanel>
|
|
|
|
|
<Button
|
|
|
|
|
Command="{Binding OpenFileCommand}"
|
2025-04-24 20:56:44 +08:00
|
|
|
Content="打开"
|
|
|
|
|
Width="75" />
|
2024-09-22 11:05:41 +08:00
|
|
|
<Button
|
|
|
|
|
Command="{Binding RefreshCommand}"
|
2025-04-24 20:56:44 +08:00
|
|
|
Content="刷新"
|
|
|
|
|
Width="75" />
|
2025-04-24 20:56:10 +08:00
|
|
|
</ui:StackPanel>
|
|
|
|
|
</ui:AutoGrid>
|
2025-02-10 20:53:40 +08:00
|
|
|
</ui:FluentWindowEx>
|