mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-06 09:16:37 +08:00
DiagramOption LayoutOption 参数整理
This commit is contained in:
@@ -106,24 +106,24 @@ namespace AIStudio.Wpf.DiagramApp.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
private bool _showGrid;
|
||||
public bool ShowGrid
|
||||
{
|
||||
get
|
||||
{
|
||||
return _showGrid;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (SetProperty(ref _showGrid, value))
|
||||
{
|
||||
foreach (var item in DiagramViewModels)
|
||||
{
|
||||
item.ShowGrid = _showGrid;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//private bool _showGrid;
|
||||
//public bool ShowGrid
|
||||
//{
|
||||
// get
|
||||
// {
|
||||
// return _showGrid;
|
||||
// }
|
||||
// set
|
||||
// {
|
||||
// if (SetProperty(ref _showGrid, value))
|
||||
// {
|
||||
// foreach (var item in DiagramViewModels)
|
||||
// {
|
||||
// item.DiagramOption.LayoutOption.ShowGrid = _showGrid;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
public DiagramType DiagramType
|
||||
{
|
||||
@@ -369,18 +369,18 @@ namespace AIStudio.Wpf.DiagramApp.ViewModels
|
||||
|
||||
List<DiagramViewModel> viewModels = new List<DiagramViewModel>();
|
||||
foreach (var diagramItem in diagramDocument.DiagramItems)
|
||||
{
|
||||
{
|
||||
var viewModel = GetDiagramViewModel(diagramItem.Name, diagramItem.DiagramType, false);
|
||||
viewModel.ShowGrid = diagramItem.ShowGrid;
|
||||
viewModel.PhysicalGridCellSize = diagramItem.PhysicalGridCellSize;
|
||||
viewModel.CellHorizontalAlignment = diagramItem.CellHorizontalAlignment;
|
||||
viewModel.CellVerticalAlignment = diagramItem.CellVerticalAlignment;
|
||||
viewModel.PageSizeOrientation = diagramItem.PageSizeOrientation;
|
||||
viewModel.PhysicalPageSize = diagramItem.PhysicalPageSize;
|
||||
viewModel.PageSizeType = diagramItem.PageSizeType;
|
||||
viewModel.PhysicalGridMarginSize = diagramItem.PhysicalGridMarginSize;
|
||||
viewModel.GridColor = diagramItem.GridColor;
|
||||
viewModel.AllowDrop = diagramItem.AllowDrop;
|
||||
viewModel.DiagramOption.LayoutOption.ShowGrid = diagramItem.ShowGrid;
|
||||
viewModel.DiagramOption.LayoutOption.PhysicalGridCellSize = diagramItem.PhysicalGridCellSize;
|
||||
viewModel.DiagramOption.LayoutOption.CellHorizontalAlignment = diagramItem.CellHorizontalAlignment;
|
||||
viewModel.DiagramOption.LayoutOption.CellVerticalAlignment = diagramItem.CellVerticalAlignment;
|
||||
viewModel.DiagramOption.LayoutOption.PageSizeOrientation = diagramItem.PageSizeOrientation;
|
||||
viewModel.DiagramOption.LayoutOption.PhysicalPageSize = diagramItem.PhysicalPageSize;
|
||||
viewModel.DiagramOption.LayoutOption.PageSizeType = diagramItem.PageSizeType;
|
||||
viewModel.DiagramOption.LayoutOption.PhysicalGridMarginSize = diagramItem.PhysicalGridMarginSize;
|
||||
viewModel.DiagramOption.LayoutOption.GridColor = diagramItem.GridColor;
|
||||
viewModel.DiagramOption.LayoutOption.AllowDrop = diagramItem.AllowDrop;
|
||||
|
||||
foreach (var diagramItemData in diagramItem.DesignerItems)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user