修复错误
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
xmlns:attach="clr-namespace:ShrlAlgoToolkit.Mvvm.Attach;assembly=ShrlAlgoToolkit.Mvvm"
|
||||
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:conv="clr-namespace:ShrlAlgoToolkit.RevitAddins.Converters"
|
||||
xmlns:local="clr-namespace:ShrlAlgoToolkit.RevitAddins.RvFamily"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:ui="https://github.com/ShrlAlgo/NeoUI"
|
||||
@@ -27,43 +28,17 @@
|
||||
Rows="*,Auto,Auto">
|
||||
<GroupBox Header="族类别">
|
||||
<ListBox
|
||||
Style="{StaticResource ChipListBoxStyle}"
|
||||
x:Name="LbCategories"
|
||||
Height="400"
|
||||
d:ItemsSource="{d:SampleData ItemCount=5}"
|
||||
DisplayMemberPath="Key"
|
||||
ItemsSource="{Binding Collection, Mode=OneWay}"
|
||||
SelectionMode="Multiple">
|
||||
<!-- <ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel />
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>-->
|
||||
<!-- <ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel />
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>-->
|
||||
<!-- <ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Border CornerRadius="5" />
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>-->
|
||||
<!-- <ListBox.ItemContainerStyle>
|
||||
<Style />
|
||||
</ListBox.ItemContainerStyle>-->
|
||||
<b:Interaction.Triggers>
|
||||
<b:EventTrigger EventName="SelectionChanged">
|
||||
<b:InvokeCommandAction Command="{Binding GetRenameItemsCommand}" CommandParameter="{Binding SelectedItems, RelativeSource={RelativeSource AncestorType={x:Type ListBox}, Mode=FindAncestor}}" />
|
||||
</b:EventTrigger>
|
||||
</b:Interaction.Triggers>
|
||||
<!-- <ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<CheckBox IsChecked="{Binding IsSelected, RelativeSource={RelativeSource FindAncestor, AncestorType=ListBoxItem}}" />
|
||||
<TextBlock VerticalAlignment="Center" Text="{Binding Value}" />
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>-->
|
||||
</ListBox>
|
||||
</GroupBox>
|
||||
<DockPanel>
|
||||
@@ -97,12 +72,12 @@
|
||||
ItemsSource="{Binding RenameItems}"
|
||||
SelectionUnit="Cell">
|
||||
<DataGrid.Resources>
|
||||
<Style BasedOn="{StaticResource DefaultDataGridCellStyle}" TargetType="{x:Type DataGridCell}">
|
||||
<Style BasedOn="{StaticResource DataGridCellDefault}" TargetType="{x:Type DataGridCell}">
|
||||
<!-- <Setter Property="HorizontalAlignment" Value="Center" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />-->
|
||||
<Setter Property="attach:TextSearchAssist.IsTextMatch">
|
||||
<Setter.Value>
|
||||
<MultiBinding Converter="{StaticResource SearchFamilyValueConverter}">
|
||||
<MultiBinding Converter="{x:Static conv:SearchFamilyValueConverter.Instance}">
|
||||
<Binding Path="Content.Text" RelativeSource="{RelativeSource Mode=Self}" />
|
||||
<Binding Path="(attach:TextSearchAssist.SearchValue)" RelativeSource="{RelativeSource Mode=Self}" />
|
||||
<Binding RelativeSource="{RelativeSource Mode=Self}" />
|
||||
@@ -117,7 +92,7 @@
|
||||
</Style>
|
||||
</DataGrid.Resources>
|
||||
<DataGrid.ColumnHeaderStyle>
|
||||
<Style BasedOn="{StaticResource DefaultDataGridColumnHeaderStyle}" TargetType="{x:Type DataGridColumnHeader}">
|
||||
<Style BasedOn="{StaticResource DataGridColumnHeaderDefault}" TargetType="{x:Type DataGridColumnHeader}">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
||||
</Style>
|
||||
</DataGrid.ColumnHeaderStyle>
|
||||
@@ -125,8 +100,8 @@
|
||||
<DataGridCheckBoxColumn
|
||||
MinWidth="80"
|
||||
Binding="{Binding IsSelected, UpdateSourceTrigger=PropertyChanged}"
|
||||
EditingElementStyle="{StaticResource DataGridCheckBoxEditingElementDefaultStyle}"
|
||||
ElementStyle="{StaticResource DataGridCheckBoxElementDefaultStyle}">
|
||||
EditingElementStyle="{StaticResource DataGridCheckBox}"
|
||||
ElementStyle="{StaticResource DataGridCheckBox}">
|
||||
<DataGridCheckBoxColumn.Header>
|
||||
<Border Background="Transparent">
|
||||
<CheckBox
|
||||
@@ -168,7 +143,7 @@
|
||||
<DataGridTextColumn
|
||||
MinWidth="80"
|
||||
Binding="{Binding NewFamilyName, UpdateSourceTrigger=PropertyChanged}"
|
||||
EditingElementStyle="{StaticResource DefaultTextBoxStyle}"
|
||||
EditingElementStyle="{StaticResource DefaultTextBox}"
|
||||
Header="新族名称">
|
||||
<DataGridTextColumn.ElementStyle>
|
||||
<Style TargetType="{x:Type TextBlock}">
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
Width="900"
|
||||
d:DataContext="{d:DesignInstance local:RenameTypeViewModel}"
|
||||
mc:Ignorable="d"
|
||||
xmlns:conv="clr-namespace:ShrlAlgoToolkit.RevitAddins.Converters"
|
||||
x:Class="ShrlAlgoToolkit.RevitAddins.RvFamily.RenameTypeView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:attach="clr-namespace:ShrlAlgoToolkit.Mvvm.Attach;assembly=ShrlAlgoToolkit.Mvvm"
|
||||
@@ -27,6 +28,7 @@
|
||||
Rows="*,Auto,Auto">
|
||||
<GroupBox Header="族类别">
|
||||
<ListBox
|
||||
Style="{StaticResource ChipListBoxStyle}"
|
||||
DisplayMemberPath="Key"
|
||||
ItemsSource="{Binding Collection, Mode=OneWay}"
|
||||
SelectionMode="Multiple"
|
||||
@@ -86,10 +88,10 @@
|
||||
SelectionUnit="Cell"
|
||||
attach:TextSearchAssist.SearchValue="{Binding Text, ElementName=TbFound, UpdateSourceTrigger=PropertyChanged}">
|
||||
<DataGrid.Resources>
|
||||
<Style BasedOn="{StaticResource DefaultDataGridCellStyle}" TargetType="{x:Type DataGridCell}">
|
||||
<Style BasedOn="{StaticResource DataGridCellDefault}" TargetType="{x:Type DataGridCell}">
|
||||
<Setter Property="attach:TextSearchAssist.IsTextMatch">
|
||||
<Setter.Value>
|
||||
<MultiBinding Converter="{StaticResource SearchTypeValueConverter}">
|
||||
<MultiBinding Converter="{x:Static conv:SearchTypeValueConverter.Instance}">
|
||||
<Binding Path="Content.Text" RelativeSource="{RelativeSource Mode=Self}" />
|
||||
<Binding Path="(attach:TextSearchAssist.SearchValue)" RelativeSource="{RelativeSource Mode=Self}" />
|
||||
<Binding RelativeSource="{RelativeSource Mode=Self}" />
|
||||
@@ -104,7 +106,7 @@
|
||||
</Style>
|
||||
</DataGrid.Resources>
|
||||
<DataGrid.ColumnHeaderStyle>
|
||||
<Style BasedOn="{StaticResource DefaultDataGridColumnHeaderStyle}" TargetType="{x:Type DataGridColumnHeader}">
|
||||
<Style BasedOn="{StaticResource DataGridColumnHeaderDefault}" TargetType="{x:Type DataGridColumnHeader}">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
</Style>
|
||||
@@ -112,8 +114,8 @@
|
||||
<DataGrid.Columns>
|
||||
<DataGridCheckBoxColumn
|
||||
Binding="{Binding IsSelected, UpdateSourceTrigger=PropertyChanged}"
|
||||
EditingElementStyle="{StaticResource DataGridCheckBoxEditingElementDefaultStyle}"
|
||||
ElementStyle="{StaticResource DataGridCheckBoxElementDefaultStyle}">
|
||||
EditingElementStyle="{StaticResource DataGridCheckBox}"
|
||||
ElementStyle="{StaticResource DataGridCheckBox}">
|
||||
<DataGridCheckBoxColumn.Header>
|
||||
<CheckBox
|
||||
Content="全选"
|
||||
@@ -159,7 +161,7 @@
|
||||
</DataGridTextColumn>
|
||||
<DataGridTextColumn
|
||||
Binding="{Binding NewTypeName, UpdateSourceTrigger=PropertyChanged}"
|
||||
EditingElementStyle="{StaticResource DefaultTextBoxStyle}"
|
||||
EditingElementStyle="{StaticResource DefaultTextBox}"
|
||||
Header="新族类型名称"
|
||||
MinWidth="80">
|
||||
<DataGridTextColumn.ElementStyle>
|
||||
@@ -177,7 +179,7 @@
|
||||
IsEnabled="{Binding CanInput}"
|
||||
Margin="5"
|
||||
ui:InputAssist.Placeholder="前缀">
|
||||
<Binding Path="ui:InputAssist.PrefixText" UpdateSourceTrigger="PropertyChanged">
|
||||
<Binding Path="PrefixText" UpdateSourceTrigger="PropertyChanged">
|
||||
<Binding.ValidationRules>
|
||||
<validationRules:UndefinedCharRules ValidatesOnTargetUpdated="True" />
|
||||
</Binding.ValidationRules>
|
||||
@@ -187,7 +189,7 @@
|
||||
IsEnabled="{Binding CanInput}"
|
||||
Margin="5"
|
||||
ui:InputAssist.Placeholder="后缀">
|
||||
<Binding Path="ui:InputAssist.SuffixText" UpdateSourceTrigger="PropertyChanged">
|
||||
<Binding Path="SuffixText" UpdateSourceTrigger="PropertyChanged">
|
||||
<Binding.ValidationRules>
|
||||
<validationRules:UndefinedCharRules ValidatesOnTargetUpdated="True" />
|
||||
</Binding.ValidationRules>
|
||||
|
||||
Reference in New Issue
Block a user