mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-22 01:16:36 +08:00
页边距修改
This commit is contained in:
@@ -85,7 +85,21 @@ namespace AIStudio.Wpf.DiagramApp.Models
|
||||
public PageSizeType PageSizeType { get; set; }
|
||||
|
||||
[XmlAttribute]
|
||||
public double GridMargin { get; set; }
|
||||
public Size GridMarginSize { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
[XmlAttribute("GridMarginSize")]
|
||||
public string XmlGridMarginSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return SerializeHelper.SerializeSize(GridMarginSize);
|
||||
}
|
||||
set
|
||||
{
|
||||
GridMarginSize = SerializeHelper.DeserializeSize(value);
|
||||
}
|
||||
}
|
||||
|
||||
[XmlIgnore]
|
||||
public Color GridColor { get; set; }
|
||||
|
||||
@@ -250,7 +250,7 @@ namespace AIStudio.Wpf.DiagramApp.ViewModels
|
||||
viewModel.PageSizeOrientation = diagramItem.PageSizeOrientation;
|
||||
viewModel.PageSize = diagramItem.PageSize;
|
||||
viewModel.PageSizeType = diagramItem.PageSizeType;
|
||||
viewModel.GridMargin = diagramItem.GridMargin;
|
||||
viewModel.GridMarginSize = diagramItem.GridMarginSize;
|
||||
viewModel.GridColor = diagramItem.GridColor;
|
||||
|
||||
foreach (DesignerItemBase diagramItemData in diagramItem.AllDesignerItems)
|
||||
@@ -321,7 +321,7 @@ namespace AIStudio.Wpf.DiagramApp.ViewModels
|
||||
diagramItem.PageSizeOrientation = viewModel.PageSizeOrientation;
|
||||
diagramItem.PageSize = viewModel.PageSize;
|
||||
diagramItem.PageSizeType = viewModel.PageSizeType;
|
||||
diagramItem.GridMargin = viewModel.GridMargin;
|
||||
diagramItem.GridMarginSize = viewModel.GridMarginSize;
|
||||
diagramItem.GridColor = viewModel.GridColor;
|
||||
|
||||
diagramItem.AddItems(DiagramViewModel.Items);
|
||||
@@ -496,7 +496,7 @@ namespace AIStudio.Wpf.DiagramApp.ViewModels
|
||||
diagramItem.PageSizeOrientation = viewModel.PageSizeOrientation;
|
||||
diagramItem.PageSize = viewModel.PageSize;
|
||||
diagramItem.PageSizeType = viewModel.PageSizeType;
|
||||
diagramItem.GridMargin = viewModel.GridMargin;
|
||||
diagramItem.GridMarginSize = viewModel.GridMarginSize;
|
||||
diagramItem.GridColor = viewModel.GridColor;
|
||||
|
||||
diagramItem.AddItems(DiagramViewModel.Items);
|
||||
@@ -523,7 +523,7 @@ namespace AIStudio.Wpf.DiagramApp.ViewModels
|
||||
viewModel.PageSizeOrientation = diagramItem.PageSizeOrientation;
|
||||
viewModel.PageSize = diagramItem.PageSize;
|
||||
viewModel.PageSizeType = diagramItem.PageSizeType;
|
||||
viewModel.GridMargin = diagramItem.GridMargin;
|
||||
viewModel.GridMarginSize = diagramItem.GridMarginSize;
|
||||
viewModel.GridColor = diagramItem.GridColor;
|
||||
|
||||
foreach (DesignerItemBase diagramItemData in diagramItem.AllDesignerItems)
|
||||
|
||||
@@ -1518,7 +1518,13 @@
|
||||
<TextBlock Margin="5" Text="高度" VerticalAlignment="Center"/>
|
||||
<Fluent:Spinner Margin="5" Width="60" Size="Small" Value="{Binding DiagramsViewModel.DiagramViewModel.GridCellHeight,Mode=TwoWay}" Minimum="0" Format="0" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Margin="5" Text="左右边距" VerticalAlignment="Center"/>
|
||||
<Fluent:Spinner Margin="5" Width="60" Size="Small" Value="{Binding DiagramsViewModel.DiagramViewModel.GridMarginWidth,Mode=TwoWay}" Minimum="0" Format="0" />
|
||||
<TextBlock Margin="5" Text="上下边距" VerticalAlignment="Center"/>
|
||||
<Fluent:Spinner Margin="5" Width="60" Size="Small" Value="{Binding DiagramsViewModel.DiagramViewModel.GridMarginHeight,Mode=TwoWay}" Minimum="0" Format="0" />
|
||||
</StackPanel>
|
||||
|
||||
<Fluent:SplitButton.ToolTip>
|
||||
<Fluent:ScreenTip Title="ShowGrid"
|
||||
Text="显示网格"
|
||||
|
||||
Reference in New Issue
Block a user