更新整理
This commit is contained in:
@@ -1,21 +1,20 @@
|
||||
<ui:FluentWindowEx
|
||||
x:Class="ShrlAlgo.RvKits.RvFamily.FamilyLibrary.FamilyLibraryView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:local="clr-namespace:ShrlAlgo.RvKits.RvFamily.FamilyLibrary"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:ui="https://github.com/ShrlAlgo/WPFluent"
|
||||
Height="600"
|
||||
MinHeight="600"
|
||||
MinWidth="1050"
|
||||
ResizeMode="CanResizeWithGrip"
|
||||
Title="本地族库"
|
||||
Width="1050"
|
||||
Height="600"
|
||||
MinWidth="1050"
|
||||
MinHeight="600"
|
||||
d:DataContext="{d:DesignInstance Type=local:FamilyLibraryViewModel}"
|
||||
ResizeMode="CanResizeWithGrip"
|
||||
mc:Ignorable="d">
|
||||
mc:Ignorable="d"
|
||||
x:Class="ShrlAlgoToolkit.RevitAddins.RvFamily.FamilyLibrary.FamilyLibraryView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:local="clr-namespace:ShrlAlgoToolkit.RevitAddins.RvFamily.FamilyLibrary"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:ui="https://github.com/ShrlAlgo/WPFluent"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Window.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
@@ -37,20 +36,20 @@
|
||||
<ColumnDefinition Width="220" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<ui:Button
|
||||
Grid.Row="0"
|
||||
Margin="5"
|
||||
HorizontalAlignment="Stretch"
|
||||
Command="{Binding SelectPathCommand}"
|
||||
Content="打开族目录"
|
||||
FontFamily="{StaticResource BoxIcons}"
|
||||
Grid.Row="0"
|
||||
HorizontalAlignment="Stretch"
|
||||
Icon="{ui:FontIcon Glyph=,
|
||||
FontFamily={StaticResource BoxIcons}}"
|
||||
Margin="5"
|
||||
ToolTip="{Binding FamilyPath, Mode=OneWay, StringFormat=族目录:{}{0}}" />
|
||||
<TreeView
|
||||
x:Name="FolderTreeView"
|
||||
Grid.Row="1"
|
||||
ItemsSource="{Binding FolderTreeViewItems}"
|
||||
d:ItemsSource="{d:SampleData}"
|
||||
ItemsSource="{Binding FolderTreeViewItems}">
|
||||
x:Name="FolderTreeView">
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="SelectedItemChanged">
|
||||
<i:InvokeCommandAction Command="{Binding SelectDirTreeNodeCommand}" CommandParameter="{Binding SelectedItem, RelativeSource={RelativeSource AncestorType={x:Type TreeView}, Mode=FindAncestor}}" />
|
||||
@@ -59,18 +58,18 @@
|
||||
</i:Interaction.Triggers>
|
||||
</TreeView>
|
||||
<GridSplitter
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Width="1"
|
||||
Grid.Row="1"
|
||||
HorizontalAlignment="Center"
|
||||
ShowsPreview="True" />
|
||||
ShowsPreview="True"
|
||||
Width="1" />
|
||||
<ui:TextBox
|
||||
x:Name="SearchBox"
|
||||
Grid.Row="0"
|
||||
Grid.Column="2"
|
||||
Margin="5"
|
||||
Cursor="IBeam"
|
||||
PlaceholderText="请输入搜索关键词">
|
||||
Grid.Column="2"
|
||||
Grid.Row="0"
|
||||
Margin="5"
|
||||
PlaceholderText="请输入搜索关键词"
|
||||
x:Name="SearchBox">
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="KeyDown">
|
||||
<i:InvokeCommandAction Command="{Binding SearchFamilyCommand}" CommandParameter="{Binding Text, RelativeSource={RelativeSource AncestorType={x:Type TextBox}, Mode=FindAncestor}}" />
|
||||
@@ -78,12 +77,12 @@
|
||||
</i:Interaction.Triggers>
|
||||
</ui:TextBox>
|
||||
<ui:ListView
|
||||
Grid.Column="2"
|
||||
Grid.Row="1"
|
||||
Grid.RowSpan="2"
|
||||
Grid.Column="2"
|
||||
d:ItemsSource="{d:SampleData}"
|
||||
ItemsSource="{Binding FamilyPageListViewItems}"
|
||||
SelectedItem="{Binding SelectedFamily}">
|
||||
SelectedItem="{Binding SelectedFamily}"
|
||||
d:ItemsSource="{d:SampleData}">
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="SelectionChanged">
|
||||
<i:InvokeCommandAction Command="{Binding LvSelectionChangedCommand}" CommandParameter="{Binding SelectedItem, RelativeSource={RelativeSource AncestorType={x:Type ListView}, Mode=FindAncestor}}" />
|
||||
@@ -129,12 +128,12 @@
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ListViewItem}">
|
||||
<Border
|
||||
x:Name="border"
|
||||
Margin="5"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="Transparent"
|
||||
BorderThickness="2"
|
||||
CornerRadius="5">
|
||||
CornerRadius="5"
|
||||
Margin="5"
|
||||
x:Name="border">
|
||||
<ContentPresenter />
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
@@ -143,10 +142,10 @@
|
||||
<Condition Property="IsMouseOver" Value="True" />
|
||||
<Condition Property="IsSelected" Value="False" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter TargetName="border" Property="BorderBrush" Value="Gray" />
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="Gray" />
|
||||
</MultiTrigger>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter TargetName="border" Property="BorderBrush" Value="LightSkyBlue" />
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="LightSkyBlue" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
@@ -162,23 +161,23 @@
|
||||
<ui:ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<ui:Card Padding="0">
|
||||
<Grid Width="170" Height="210">
|
||||
<Grid Height="210" Width="170">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="170" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Image
|
||||
Grid.Row="0"
|
||||
Width="128"
|
||||
Height="128"
|
||||
Source="{Binding ImageData}"
|
||||
Stretch="Uniform"
|
||||
ToolTip="{Binding ToolTip}" />
|
||||
ToolTip="{Binding ToolTip}"
|
||||
Width="128" />
|
||||
<StackPanel
|
||||
Grid.Row="0"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Bottom"
|
||||
Orientation="Horizontal">
|
||||
Orientation="Horizontal"
|
||||
VerticalAlignment="Bottom">
|
||||
<StackPanel.Style>
|
||||
<Style TargetType="{x:Type StackPanel}">
|
||||
<Setter Property="Visibility" Value="Collapsed" />
|
||||
@@ -210,10 +209,10 @@
|
||||
</StackPanel>
|
||||
<TextBlock
|
||||
Grid.Row="1"
|
||||
Width="128"
|
||||
Text="{Binding Title}"
|
||||
TextAlignment="Center"
|
||||
TextWrapping="WrapWithOverflow" />
|
||||
TextWrapping="WrapWithOverflow"
|
||||
Width="128" />
|
||||
</Grid>
|
||||
</ui:Card>
|
||||
</DataTemplate>
|
||||
@@ -221,9 +220,9 @@
|
||||
<ui:ListView.Template>
|
||||
<ControlTemplate TargetType="{x:Type ListView}">
|
||||
<ScrollViewer
|
||||
x:Name="scr"
|
||||
HorizontalScrollBarVisibility="Disabled"
|
||||
VerticalScrollBarVisibility="Auto">
|
||||
VerticalScrollBarVisibility="Auto"
|
||||
x:Name="scr">
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="ScrollChanged">
|
||||
<i:InvokeCommandAction Command="{Binding LvScrollCommand}" CommandParameter="{Binding RelativeSource={RelativeSource AncestorType={x:Type ScrollViewer}, Mode=FindAncestor}}" />
|
||||
@@ -235,20 +234,20 @@
|
||||
</ui:ListView.Template>
|
||||
</ui:ListView>
|
||||
<GridSplitter
|
||||
Grid.Row="1"
|
||||
Grid.Column="3"
|
||||
Width="1"
|
||||
HorizontalAlignment="Center"
|
||||
ShowsPreview="True" />
|
||||
<ui:DataGrid
|
||||
Grid.Row="1"
|
||||
Grid.Column="4"
|
||||
Margin="5"
|
||||
d:ItemsSource="{d:SampleData}"
|
||||
HorizontalAlignment="Center"
|
||||
ShowsPreview="True"
|
||||
Width="1" />
|
||||
<ui:DataGrid
|
||||
AutoGenerateColumns="False"
|
||||
CanUserAddRows="False"
|
||||
Grid.Column="4"
|
||||
Grid.Row="1"
|
||||
IsReadOnly="True"
|
||||
ItemsSource="{Binding SelectedItem.Parameters, ElementName=CbbSymbols, Mode=TwoWay}">
|
||||
ItemsSource="{Binding SelectedItem.Parameters, ElementName=CbbSymbols, Mode=TwoWay}"
|
||||
Margin="5"
|
||||
d:ItemsSource="{d:SampleData}">
|
||||
<ui:DataGrid.Columns>
|
||||
<DataGridTextColumn Binding="{Binding Name}" Header="属性名" />
|
||||
<DataGridTextColumn Binding="{Binding Value}" Header="属性值" />
|
||||
@@ -278,38 +277,38 @@
|
||||
</hc:ButtonGroup>
|
||||
</StackPanel>-->
|
||||
<ui:StackPanel
|
||||
Grid.Row="0"
|
||||
Grid.Column="4"
|
||||
Grid.Row="0"
|
||||
Orientation="Horizontal">
|
||||
<ui:ComboBoxEx
|
||||
x:Name="CbbSymbols"
|
||||
ui:StackPanel.Fill="Fill"
|
||||
DisplayMemberPath="Name"
|
||||
ItemsSource="{Binding SymbolTypes, Mode=TwoWay}"
|
||||
PlaceholderText="选择族类型"
|
||||
SelectedItem="{Binding SelectedSymbolType, UpdateSourceTrigger=PropertyChanged}" />
|
||||
SelectedItem="{Binding SelectedSymbolType, UpdateSourceTrigger=PropertyChanged}"
|
||||
ui:StackPanel.Fill="Fill"
|
||||
x:Name="CbbSymbols" />
|
||||
<Button
|
||||
Grid.Column="1"
|
||||
Margin="5"
|
||||
ui:StackPanel.Fill="Auto"
|
||||
Command="{Binding ImportFamilySymbolCommand}"
|
||||
Content=""
|
||||
FontFamily="{StaticResource BoxIcons}"
|
||||
ToolTip="载入类型" />
|
||||
Grid.Column="1"
|
||||
Margin="5"
|
||||
ToolTip="载入类型"
|
||||
ui:StackPanel.Fill="Auto" />
|
||||
</ui:StackPanel>
|
||||
<TextBlock
|
||||
Grid.Row="2"
|
||||
Grid.Column="0"
|
||||
Grid.Row="2"
|
||||
Margin="5"
|
||||
Text="{Binding FamilyCount, Mode=OneWay, StringFormat=共计{}{0}个}" />
|
||||
<ui:InfoBar
|
||||
Grid.Row="2"
|
||||
Grid.Column="2"
|
||||
Grid.Row="2"
|
||||
IsOpen="{Binding ActiveSnackbar}"
|
||||
Message="{Binding Message}" />
|
||||
<TextBlock
|
||||
Grid.Row="2"
|
||||
Grid.Column="4"
|
||||
Grid.Row="2"
|
||||
Text="{Binding RevitVersion, Mode=OneWay, StringFormat=当前文件版本:Revit \{0\}}" />
|
||||
</Grid>
|
||||
</ui:FluentWindowEx>
|
||||
Reference in New Issue
Block a user