大量更新
This commit is contained in:
@@ -1,12 +1,7 @@
|
||||
<ui:NeoWindow
|
||||
Height="600"
|
||||
Icon="{DynamicResource RevitIcon}"
|
||||
Title="重命名族"
|
||||
Width="900"
|
||||
d:DataContext="{d:DesignInstance local:RenameFamilyViewModel}"
|
||||
mc:Ignorable="d"
|
||||
x:Class="ShrlAlgoToolkit.RevitAddins.RvFamily.RenameFamilyView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:attach="clr-namespace:ShrlAlgoToolkit.Mvvm.Attach;assembly=ShrlAlgoToolkit.Mvvm"
|
||||
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:conv="clr-namespace:ShrlAlgoToolkit.RevitAddins.Converters"
|
||||
@@ -15,7 +10,12 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:ui="https://github.com/ShrlAlgo/NeoUI"
|
||||
xmlns:validationRules="clr-namespace:ShrlAlgoToolkit.Mvvm.ValidationRules;assembly=ShrlAlgoToolkit.Mvvm"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
Title="重命名族"
|
||||
Width="900"
|
||||
Height="600"
|
||||
d:DataContext="{d:DesignInstance local:RenameFamilyViewModel}"
|
||||
Icon="{DynamicResource RevitIcon}"
|
||||
mc:Ignorable="d">
|
||||
<Window.Resources>
|
||||
<ResourceDictionary Source="pack://application:,,,/ShrlAlgoToolkit.RevitAddins;component/WPFUI.xaml" />
|
||||
</Window.Resources>
|
||||
@@ -24,17 +24,17 @@
|
||||
Columns="250,*,*,*"
|
||||
Rows="*,Auto">
|
||||
<ui:Grid
|
||||
Columns="*"
|
||||
Grid.RowSpan="2"
|
||||
Columns="*"
|
||||
Rows="*,Auto,Auto">
|
||||
<GroupBox Header="族类别">
|
||||
<ListBox
|
||||
x:Name="LbCategories"
|
||||
d:ItemsSource="{d:SampleData ItemCount=5}"
|
||||
DisplayMemberPath="Key"
|
||||
ItemsSource="{Binding Collection, Mode=OneWay}"
|
||||
SelectionMode="Multiple"
|
||||
Style="{StaticResource ChipListBoxStyle}"
|
||||
d:ItemsSource="{d:SampleData ItemCount=5}"
|
||||
x:Name="LbCategories">
|
||||
Style="{StaticResource ChipListBoxStyle}">
|
||||
<b:Interaction.Triggers>
|
||||
<b:EventTrigger EventName="SelectionChanged">
|
||||
<b:InvokeCommandAction Command="{Binding GetRenameItemsCommand}" CommandParameter="{Binding SelectedItems, RelativeSource={RelativeSource AncestorType={x:Type ListBox}, Mode=FindAncestor}}" />
|
||||
@@ -55,23 +55,23 @@
|
||||
</CheckBox>
|
||||
<TextBlock
|
||||
HorizontalAlignment="Right"
|
||||
Text="{Binding CategoryCount, StringFormat=类别数:{}{0:D}}"
|
||||
VerticalAlignment="Center" />
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding CategoryCount, StringFormat=类别数:{}{0:D}}" />
|
||||
</DockPanel>
|
||||
<TextBox Text="{Binding SearchText, UpdateSourceTrigger=PropertyChanged}" ui:InputAssist.Placeholder="过滤族类别" />
|
||||
<TextBox ui:InputAssist.PlaceholderText="过滤族类别" Text="{Binding SearchText, UpdateSourceTrigger=PropertyChanged}" />
|
||||
</ui:Grid>
|
||||
<DataGrid
|
||||
AutoGenerateColumns="False"
|
||||
CanUserAddRows="False"
|
||||
x:Name="DgRename"
|
||||
Grid.Row="0"
|
||||
Grid.Column="1"
|
||||
Grid.ColumnSpan="3"
|
||||
Grid.Row="0"
|
||||
attach:TextSearchAssist.SearchValue="{Binding Text, ElementName=TbFound, UpdateSourceTrigger=PropertyChanged}"
|
||||
AutoGenerateColumns="False"
|
||||
CanUserAddRows="False"
|
||||
HeadersVisibility="Column"
|
||||
IsEnabled="{Binding CanInput}"
|
||||
ItemsSource="{Binding RenameItems}"
|
||||
SelectionUnit="Cell"
|
||||
attach:TextSearchAssist.SearchValue="{Binding Text, ElementName=TbFound, UpdateSourceTrigger=PropertyChanged}"
|
||||
x:Name="DgRename">
|
||||
SelectionUnit="Cell">
|
||||
<DataGrid.Resources>
|
||||
<Style BasedOn="{StaticResource DefaultDataGridCellStyle}" TargetType="{x:Type DataGridCell}">
|
||||
<!-- <Setter Property="HorizontalAlignment" Value="Center" />
|
||||
@@ -99,15 +99,15 @@
|
||||
</DataGrid.ColumnHeaderStyle>
|
||||
<DataGrid.Columns>
|
||||
<DataGridCheckBoxColumn
|
||||
MinWidth="80"
|
||||
Binding="{Binding IsSelected, UpdateSourceTrigger=PropertyChanged}"
|
||||
EditingElementStyle="{StaticResource DataGridCheckBoxStyle}"
|
||||
ElementStyle="{StaticResource DataGridCheckBoxStyle}"
|
||||
MinWidth="80">
|
||||
ElementStyle="{StaticResource DataGridCheckBoxStyle}">
|
||||
<DataGridCheckBoxColumn.Header>
|
||||
<Border Background="Transparent">
|
||||
<CheckBox
|
||||
Content="全选"
|
||||
HorizontalAlignment="Center"
|
||||
Content="全选"
|
||||
IsChecked="{Binding DataContext.IsAllItemsSelected, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" />
|
||||
</Border>
|
||||
</DataGridCheckBoxColumn.Header>
|
||||
@@ -118,10 +118,10 @@
|
||||
</DataGridCheckBoxColumn.HeaderStyle>-->
|
||||
</DataGridCheckBoxColumn>
|
||||
<DataGridTextColumn
|
||||
MinWidth="80"
|
||||
Binding="{Binding CategoryName}"
|
||||
Header="族类别"
|
||||
IsReadOnly="True"
|
||||
MinWidth="80">
|
||||
IsReadOnly="True">
|
||||
<DataGridTextColumn.ElementStyle>
|
||||
<Style TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="HorizontalAlignment" Value="Center" />
|
||||
@@ -130,10 +130,10 @@
|
||||
</DataGridTextColumn.ElementStyle>
|
||||
</DataGridTextColumn>
|
||||
<DataGridTextColumn
|
||||
MinWidth="80"
|
||||
Binding="{Binding OldFamilyName}"
|
||||
Header="族名称"
|
||||
IsReadOnly="True"
|
||||
MinWidth="80">
|
||||
IsReadOnly="True">
|
||||
<DataGridTextColumn.ElementStyle>
|
||||
<Style TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="HorizontalAlignment" Value="Center" />
|
||||
@@ -142,10 +142,10 @@
|
||||
</DataGridTextColumn.ElementStyle>
|
||||
</DataGridTextColumn>
|
||||
<DataGridTextColumn
|
||||
MinWidth="80"
|
||||
Binding="{Binding NewFamilyName, UpdateSourceTrigger=PropertyChanged}"
|
||||
EditingElementStyle="{StaticResource DefaultTextBoxStyle}"
|
||||
Header="新族名称"
|
||||
MinWidth="80">
|
||||
Header="新族名称">
|
||||
<DataGridTextColumn.ElementStyle>
|
||||
<Style TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="HorizontalAlignment" Value="Center" />
|
||||
@@ -158,9 +158,9 @@
|
||||
<GroupBox Header="前/后缀">
|
||||
<UniformGrid Columns="1">
|
||||
<TextBox
|
||||
IsEnabled="{Binding CanInput}"
|
||||
Margin="5"
|
||||
ui:InputAssist.Placeholder="前缀">
|
||||
ui:InputAssist.PlaceholderText="前缀"
|
||||
IsEnabled="{Binding CanInput}">
|
||||
<Binding Path="PrefixText" UpdateSourceTrigger="PropertyChanged">
|
||||
<Binding.ValidationRules>
|
||||
<validationRules:UndefinedCharRules ValidatesOnTargetUpdated="True" />
|
||||
@@ -180,9 +180,9 @@
|
||||
</TextBox.Text>
|
||||
</TextBox>-->
|
||||
<TextBox
|
||||
IsEnabled="{Binding CanInput}"
|
||||
Margin="5"
|
||||
ui:InputAssist.Placeholder="后缀">
|
||||
ui:InputAssist.PlaceholderText="后缀"
|
||||
IsEnabled="{Binding CanInput}">
|
||||
<Binding Path="SuffixText" UpdateSourceTrigger="PropertyChanged">
|
||||
<Binding.ValidationRules>
|
||||
<validationRules:UndefinedCharRules ValidatesOnTargetUpdated="True" />
|
||||
@@ -194,10 +194,10 @@
|
||||
<GroupBox Header="查找/替换">
|
||||
<StackPanel>
|
||||
<TextBox
|
||||
IsEnabled="{Binding CanInput}"
|
||||
x:Name="TbFound"
|
||||
Margin="5"
|
||||
ui:InputAssist.Placeholder="查找"
|
||||
x:Name="TbFound">
|
||||
ui:InputAssist.PlaceholderText="查找"
|
||||
IsEnabled="{Binding CanInput}">
|
||||
<Binding Path="FoundText" UpdateSourceTrigger="PropertyChanged">
|
||||
<Binding.ValidationRules>
|
||||
<validationRules:UndefinedCharRules ValidatesOnTargetUpdated="True" />
|
||||
@@ -205,10 +205,10 @@
|
||||
</Binding>
|
||||
</TextBox>
|
||||
<TextBox
|
||||
IsEnabled="{Binding CanInput}"
|
||||
x:Name="TbReplace"
|
||||
Margin="5"
|
||||
ui:InputAssist.Placeholder="替换"
|
||||
x:Name="TbReplace">
|
||||
ui:InputAssist.PlaceholderText="替换"
|
||||
IsEnabled="{Binding CanInput}">
|
||||
<Binding Path="ReplaceText" UpdateSourceTrigger="PropertyChanged">
|
||||
<Binding.ValidationRules>
|
||||
<validationRules:UndefinedCharRules ValidatesOnTargetUpdated="True" />
|
||||
@@ -223,7 +223,7 @@
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<GroupBox Grid.Row="0" Header="连接符">
|
||||
<TextBox IsEnabled="{Binding CanInput}" x:Name="TbSeparator">
|
||||
<TextBox x:Name="TbSeparator" IsEnabled="{Binding CanInput}">
|
||||
<Binding Path="Separator" UpdateSourceTrigger="PropertyChanged">
|
||||
<Binding.ValidationRules>
|
||||
<validationRules:UndefinedCharRules ValidatesOnTargetUpdated="True" />
|
||||
@@ -232,10 +232,10 @@
|
||||
</TextBox>
|
||||
</GroupBox>
|
||||
<Button
|
||||
Command="{Binding ModifyNameCommand}"
|
||||
Content="修改名称"
|
||||
Grid.Row="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
Command="{Binding ModifyNameCommand}"
|
||||
Content="修改名称"
|
||||
ToolTip="勾选要修改的项进行修改" />
|
||||
</Grid>
|
||||
</ui:Grid>
|
||||
|
||||
Reference in New Issue
Block a user