feat: support multi-select and batch export in path list
- DataGrid: SelectionMode Extended with RowStyle IsSelected binding - PathRouteViewModel: add IsSelected property - Export: iterates selected paths, saves each to separate file - Ctrl/Shift+click to multi-select, then Export button batches them
This commit is contained in:
parent
c0714a5180
commit
ac2de23e32
@ -183,6 +183,7 @@ namespace NavisworksTransport.UI.WPF.ViewModels
|
||||
private string _name;
|
||||
private ObservableCollection<PathPointViewModel> _points;
|
||||
private bool _isActive;
|
||||
private bool _isSelected;
|
||||
private string _description;
|
||||
private DateTime _createdTime;
|
||||
private DateTime _lastModifiedTime;
|
||||
@ -313,6 +314,15 @@ namespace NavisworksTransport.UI.WPF.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 是否被选中(DataGrid多选绑定)
|
||||
/// </summary>
|
||||
public bool IsSelected
|
||||
{
|
||||
get => _isSelected;
|
||||
set => SetProperty(ref _isSelected, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 路径描述
|
||||
/// </summary>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -42,6 +42,11 @@ NavisworksTransport 路径编辑页签视图 - 采用与动画控制和分层管
|
||||
<Setter Property="Foreground" Value="{StaticResource NavisworksSecondaryBrush}"/>
|
||||
<Setter Property="Height" Value="20"/>
|
||||
</Style>
|
||||
|
||||
<!-- 可多选的DataGrid行样式 -->
|
||||
<Style x:Key="SelectableRowStyle" TargetType="DataGridRow">
|
||||
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
|
||||
@ -241,7 +246,8 @@ NavisworksTransport 路径编辑页签视图 - 采用与动画控制和分层管
|
||||
AutoGenerateColumns="False"
|
||||
CanUserAddRows="False"
|
||||
CanUserDeleteRows="False"
|
||||
SelectionMode="Single"
|
||||
SelectionMode="Extended"
|
||||
RowStyle="{StaticResource SelectableRowStyle}"
|
||||
HeadersVisibility="Column"
|
||||
GridLinesVisibility="Horizontal"
|
||||
Height="340"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user