添加项目文件。
This commit is contained in:
146
Szmedi.RvKits/MEPTools/ClashReportWin.xaml
Normal file
146
Szmedi.RvKits/MEPTools/ClashReportWin.xaml
Normal file
@@ -0,0 +1,146 @@
|
||||
<controls:MaterialWindow
|
||||
x:Class="Szmedi.RvKits.MEPTools.ClashReportWin"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:controls="clr-namespace:Szmedi.RvKits.Controls"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:Szmedi.RvKits.MEPTools"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
Title="碰撞报告"
|
||||
Width="700"
|
||||
Height="450"
|
||||
d:DataContext="{d:DesignInstance local:ClashReportViewModel}"
|
||||
|
||||
mc:Ignorable="d">
|
||||
<controls:MaterialWindow.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/Szmedi.RvKits;component/WPFUI.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</controls:MaterialWindow.Resources>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<DataGrid
|
||||
x:Name="dataGrid"
|
||||
Margin="5,5,5,5"
|
||||
AutoGenerateColumns="True"
|
||||
CanUserAddRows="True"
|
||||
IsReadOnly="True"
|
||||
ItemsSource="{Binding}"
|
||||
VerticalScrollBarVisibility="Visible">
|
||||
<b:Interaction.Triggers>
|
||||
<b:EventTrigger EventName="MouseDoubleClick">
|
||||
<b:InvokeCommandAction Command="{Binding LocationCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=DataGrid}}" />
|
||||
</b:EventTrigger>
|
||||
</b:Interaction.Triggers>
|
||||
<!--<ItemsPanelTemplate>
|
||||
<ScrollViewer
|
||||
x:Name="scr"
|
||||
HorizontalScrollBarVisibility="Disabled"
|
||||
VerticalScrollBarVisibility="Auto">
|
||||
<b:Interaction.Triggers>
|
||||
<b:EventTrigger EventName="ScrollChanged">
|
||||
<b:InvokeCommandAction Command="{Binding LvScrollCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ScrollViewer}}" />
|
||||
</b:EventTrigger>
|
||||
</b:Interaction.Triggers>
|
||||
<StackPanel IsItemsHost="True" ScrollViewer.CanContentScroll="True" />
|
||||
</ScrollViewer>
|
||||
</ItemsPanelTemplate>-->
|
||||
<DataGrid.Template>
|
||||
<ControlTemplate>
|
||||
<!--<ScrollViewer
|
||||
x:Name="scr"
|
||||
HorizontalScrollBarVisibility="Disabled"
|
||||
VerticalScrollBarVisibility="Auto">
|
||||
<b:Interaction.Triggers>
|
||||
<b:EventTrigger EventName="ScrollChanged">
|
||||
<b:InvokeCommandAction Command="{Binding LvScrollCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ScrollViewer}}" />
|
||||
</b:EventTrigger>
|
||||
</b:Interaction.Triggers>
|
||||
<StackPanel IsItemsHost="True" ScrollViewer.CanContentScroll="True" />
|
||||
</ScrollViewer>-->
|
||||
<Border
|
||||
Padding="{TemplateBinding Padding}"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
SnapsToDevicePixels="True">
|
||||
<ScrollViewer x:Name="DG_ScrollViewer" CanContentScroll="True" Focusable="false">
|
||||
<b:Interaction.Triggers>
|
||||
<b:EventTrigger EventName="ScrollChanged">
|
||||
<b:InvokeCommandAction Command="{Binding LvScrollCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ScrollViewer}}" />
|
||||
</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
|
||||
Width="{Binding CellsPanelHorizontalOffset, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"
|
||||
Command="{x:Static DataGrid.SelectAllCommand}"
|
||||
Focusable="false"
|
||||
Style="{DynamicResource {ComponentResourceKey ResourceId=DataGridSelectAllButtonStyle,
|
||||
TypeInTargetAssembly={x:Type DataGrid}}}"
|
||||
Visibility="{Binding HeadersVisibility, ConverterParameter={x:Static DataGridHeadersVisibility.All}, Converter={x:Static DataGrid.HeadersVisibilityConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" />
|
||||
<DataGridColumnHeadersPresenter x:Name="PART_ColumnHeadersPresenter" Grid.Column="1" Visibility="{Binding HeadersVisibility, ConverterParameter={x:Static DataGridHeadersVisibility.Column}, Converter={x:Static DataGrid.HeadersVisibilityConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" />
|
||||
<ScrollContentPresenter
|
||||
x:Name="PART_ScrollContentPresenter"
|
||||
Grid.Row="1"
|
||||
Grid.ColumnSpan="2"
|
||||
CanContentScroll="{TemplateBinding CanContentScroll}" />
|
||||
<ScrollBar
|
||||
x:Name="PART_VerticalScrollBar"
|
||||
Grid.Row="1"
|
||||
Grid.Column="2"
|
||||
Maximum="{TemplateBinding ScrollableHeight}"
|
||||
Orientation="Vertical"
|
||||
ViewportSize="{TemplateBinding ViewportHeight}"
|
||||
Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
|
||||
Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource Mode=TemplatedParent}}" />
|
||||
<Grid Grid.Row="2" Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="{Binding NonFrozenColumnsViewportHorizontalOffset, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<ScrollBar
|
||||
x:Name="PART_HorizontalScrollBar"
|
||||
Grid.Column="1"
|
||||
Maximum="{TemplateBinding ScrollableWidth}"
|
||||
Orientation="Horizontal"
|
||||
ViewportSize="{TemplateBinding ViewportWidth}"
|
||||
Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
|
||||
Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource Mode=TemplatedParent}}" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ScrollViewer.Template>
|
||||
<StackPanel IsItemsHost="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</DataGrid.Template>
|
||||
</DataGrid>
|
||||
|
||||
|
||||
<UniformGrid Grid.Row="1" Rows="1">
|
||||
<CheckBox Content="当前视图" IsChecked="{Binding InCurrentView, UpdateSourceTrigger=PropertyChanged}" ToolTip="在当前视图中去定位" />
|
||||
<Button Command="{Binding OpenCommand}" CommandParameter="{Binding ElementName=dataGrid}" Content="打开" />
|
||||
<Button Command="{Binding RefreshCommand}" CommandParameter="{Binding ElementName=dataGrid}" Content="刷新" />
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
</controls:MaterialWindow>
|
||||
Reference in New Issue
Block a user