mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-15 13:46:35 +08:00
ReDo Undo Item ItemWidth 和 Angle 等工具栏设置完成
This commit is contained in:
@@ -1020,21 +1020,21 @@
|
||||
<Fluent:Button Margin="5" Command="{Binding PageViewModel.DiagramViewModel.DistributeVerticalCommand}" Size="Small" Icon="/AIStudio.Wpf.DiagramApp;component/Images/DistributeObjectsVertical.png"/>
|
||||
</StackPanel>
|
||||
</Fluent:DropDownButton>
|
||||
<Fluent:SplitButton Header="翻转" Icon="{iconPacks:VaadinIcons Kind=FlipH}" Width="50" VerticalAlignment="Top" IsCheckable="True" IsChecked="{Binding SelectedItem.ShowRotate}">
|
||||
<Fluent:SplitButton Header="翻转" Icon="{iconPacks:VaadinIcons Kind=FlipH}" Width="50" VerticalAlignment="Top" IsCheckable="True" IsChecked="{Binding SelectedItemViewModel.ShowRotate}">
|
||||
<Fluent:SplitButton.LargeIcon>
|
||||
<iconPacks:PackIconVaadinIcons Kind="FlipH" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||
</Fluent:SplitButton.LargeIcon>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Margin="5" Text="镜像" VerticalAlignment="Center"/>
|
||||
<Fluent:ToggleButton IsChecked="{Binding PageViewModel.DiagramViewModel.SelectedItem.ScaleX,Converter={dd:ConverterValueMapToBool Parameter='1'}, ConverterParameter='-1'}"
|
||||
<Fluent:ToggleButton IsChecked="{Binding SelectedItemViewModel.ScaleX,Converter={dd:ConverterValueMapToBool Parameter='1'}, ConverterParameter='-1'}"
|
||||
Margin="5" Size="Small" Icon="{iconPacks:Material Kind=FlipHorizontal}"/>
|
||||
<Fluent:ToggleButton IsChecked="{Binding PageViewModel.DiagramViewModel.SelectedItem.ScaleY,Converter={dd:ConverterValueMapToBool Parameter='1'}, ConverterParameter='-1'}"
|
||||
<Fluent:ToggleButton IsChecked="{Binding SelectedItemViewModel.ScaleY,Converter={dd:ConverterValueMapToBool Parameter='1'}, ConverterParameter='-1'}"
|
||||
Margin="5" Size="Small" Icon="{iconPacks:Material Kind=FlipVertical}"/>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Margin="5" Text="旋转" VerticalAlignment="Center"/>
|
||||
<controls:SliderRotation Value="{Binding PageViewModel.DiagramViewModel.SelectedItem.Angle,Mode=TwoWay}"/>
|
||||
<Fluent:Spinner Margin="5" Width="60" Size="Small" Value="{Binding PageViewModel.DiagramViewModel.SelectedItem.Angle,Mode=TwoWay}" Maximum="359" Minimum="0"
|
||||
<controls:SliderRotation Value="{Binding SelectedItemViewModel.Angle,Mode=TwoWay}"/>
|
||||
<Fluent:Spinner Margin="5" Width="60" Size="Small" Value="{Binding SelectedItemViewModel.Angle,Mode=TwoWay}" Maximum="359" Minimum="0"
|
||||
Format="0 deg" />
|
||||
</StackPanel>
|
||||
</Fluent:SplitButton>
|
||||
@@ -1045,19 +1045,19 @@
|
||||
<TextBlock Margin="5" Text="大小" />
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Margin="5" Text="宽" Width="15" VerticalAlignment="Center"/>
|
||||
<Fluent:Spinner Margin="5" Width="60" Size="Small" Value="{Binding PageViewModel.DiagramViewModel.SelectedItem.ItemWidth,Mode=TwoWay}" Minimum="0"
|
||||
<Fluent:Spinner Margin="5" Width="60" Size="Small" Value="{Binding SelectedItemViewModel.ItemWidth,Mode=TwoWay}" Minimum="0"
|
||||
Format="0" />
|
||||
<TextBlock Margin="5" Text="高" Width="15" VerticalAlignment="Center"/>
|
||||
<Fluent:Spinner Margin="5" Width="60" Size="Small" Value="{Binding PageViewModel.DiagramViewModel.SelectedItem.ItemHeight,Mode=TwoWay}" Minimum="0"
|
||||
<Fluent:Spinner Margin="5" Width="60" Size="Small" Value="{Binding SelectedItemViewModel.ItemHeight,Mode=TwoWay}" Minimum="0"
|
||||
Format="0" />
|
||||
</StackPanel>
|
||||
<TextBlock Margin="5" Text="X/Y位置"/>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Margin="5" Text="X" Width="15" VerticalAlignment="Center"/>
|
||||
<Fluent:Spinner Margin="5" Width="60" Size="Small" Value="{Binding PageViewModel.DiagramViewModel.SelectedItem.Left,Mode=TwoWay}" Minimum="0"
|
||||
<Fluent:Spinner Margin="5" Width="60" Size="Small" Value="{Binding SelectedItemViewModel.Left,Mode=TwoWay}" Minimum="0"
|
||||
Format="0" />
|
||||
<TextBlock Margin="5" Text="Y" Width="15" VerticalAlignment="Center"/>
|
||||
<Fluent:Spinner Margin="5" Width="60" Size="Small" Value="{Binding PageViewModel.DiagramViewModel.SelectedItem.Top,Mode=TwoWay}" Minimum="0"
|
||||
<Fluent:Spinner Margin="5" Width="60" Size="Small" Value="{Binding SelectedItemViewModel.Top,Mode=TwoWay}" Minimum="0"
|
||||
Format="0" />
|
||||
</StackPanel>
|
||||
<Separator />
|
||||
@@ -1328,7 +1328,7 @@
|
||||
ItemWidth="45"
|
||||
ItemHeight="56"
|
||||
ItemsSource="{Binding QuickThemeViewModel.QuickThemes}"
|
||||
SelectedItem="{Binding QuickThemeViewModel.QuickTheme}"
|
||||
SelectedItem="{Binding QuickThemeViewModel.QuickTheme,Delay=100}"
|
||||
ResizeMode="Both"
|
||||
Selectable="False">
|
||||
<Fluent:InRibbonGallery.ItemTemplate>
|
||||
@@ -1349,12 +1349,12 @@
|
||||
<Fluent:RibbonTabItem Header="插入">
|
||||
<Fluent:RibbonGroupBox Header="插入"
|
||||
IsLauncherVisible="True">
|
||||
<Fluent:SplitButton Header="空白页" Width="50" VerticalAlignment="Top" Command="{Binding AddPageCommand}">
|
||||
<Fluent:SplitButton Header="空白页" Width="50" VerticalAlignment="Top" Command="{Binding PageViewModel.AddPageCommand}">
|
||||
<Fluent:SplitButton.LargeIcon>
|
||||
<iconPacks:PackIconMaterial Kind="FileOutline" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||
</Fluent:SplitButton.LargeIcon>
|
||||
<Fluent:MenuItem Header="空白页" Size="Middle" Command="{Binding AddPageCommand}" Icon="{iconPacks:Material Kind=FileOutline}"/>
|
||||
<Fluent:MenuItem Header="复制本页" Size="Middle" Command="{Binding AddCopyPageCommand}" Icon="{iconPacks:Material Kind=ContentCopy}"/>
|
||||
<Fluent:MenuItem Header="空白页" Size="Middle" Command="{Binding PageViewModel.AddPageCommand}" Icon="{iconPacks:Material Kind=FileOutline}"/>
|
||||
<Fluent:MenuItem Header="复制本页" Size="Middle" Command="{Binding PageViewModel.AddCopyPageCommand}" Icon="{iconPacks:Material Kind=ContentCopy}"/>
|
||||
<Fluent:SplitButton.ToolTip>
|
||||
<Fluent:ScreenTip Title="InsertPage"
|
||||
Text="插入页面"
|
||||
@@ -1372,7 +1372,7 @@
|
||||
Width="190" />
|
||||
</Fluent:SplitButton.ToolTip>
|
||||
</Fluent:SplitButton>
|
||||
<Fluent:Button Header="图片" Width="50" VerticalAlignment="Top" Command="{Binding AddImageCommand}">
|
||||
<Fluent:Button Header="图片" Width="50" VerticalAlignment="Top" Command="{Binding PageViewModel.AddImageCommand}">
|
||||
<Fluent:Button.LargeIcon>
|
||||
<iconPacks:PackIconMaterial Kind="Image" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||
</Fluent:Button.LargeIcon>
|
||||
@@ -1392,7 +1392,7 @@
|
||||
Width="190" />
|
||||
</Fluent:Button.ToolTip>
|
||||
</Fluent:Button>
|
||||
<Fluent:Button Header="矢量文本" Width="50" VerticalAlignment="Top" Command="{Binding AddOutLineTextCommand}">
|
||||
<Fluent:Button Header="矢量文本" Width="50" VerticalAlignment="Top" Command="{Binding PageViewModel.AddOutLineTextCommand}">
|
||||
<Fluent:Button.LargeIcon>
|
||||
<iconPacks:PackIconMaterial Kind="FormatTextVariantOutline" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||
</Fluent:Button.LargeIcon>
|
||||
@@ -1412,7 +1412,7 @@
|
||||
Width="190" />
|
||||
</Fluent:SplitButton.ToolTip>
|
||||
</Fluent:SplitButton>
|
||||
<Fluent:Button Header="二维码" Width="50" VerticalAlignment="Top" Command="{Binding AddBarcodeCommand}" CommandParameter="QR_CODE">
|
||||
<Fluent:Button Header="二维码" Width="50" VerticalAlignment="Top" Command="{Binding PageViewModel.AddBarcodeCommand}" CommandParameter="QR_CODE">
|
||||
<Fluent:Button.LargeIcon>
|
||||
<iconPacks:PackIconMaterial Kind="Qrcode" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||
</Fluent:Button.LargeIcon>
|
||||
@@ -1468,7 +1468,7 @@
|
||||
</Fluent:RibbonGroupBox>
|
||||
<Fluent:RibbonGroupBox Header="其它"
|
||||
IsLauncherVisible="True" >
|
||||
<Fluent:Button Header="搜索" Width="50" VerticalAlignment="Top" Command="{Binding SearchDownCommand}">
|
||||
<Fluent:Button Header="搜索" Width="50" VerticalAlignment="Top" Command="{Binding PageViewModel.DiagramViewModel.SearchDownCommand}">
|
||||
<Fluent:Button.LargeIcon>
|
||||
<iconPacks:PackIconFontAwesome Kind="SearchSolid" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||
</Fluent:Button.LargeIcon>
|
||||
@@ -2523,20 +2523,20 @@
|
||||
<Grid>
|
||||
<Grid.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Header="增加页" Command="{binding:ControlBinding AddPageCommand}" CommandParameter="{Binding .}"/>
|
||||
<MenuItem Header="复制页" Command="{binding:ControlBinding AddCopyPageCommand}" CommandParameter="{Binding .}"/>
|
||||
<MenuItem Header="重命名页" Command="{binding:ControlBinding RenamePageCommand}" CommandParameter="{Binding .}"/>
|
||||
<MenuItem Header="删除页" Command="{binding:ControlBinding DeletePageCommand}" CommandParameter="{Binding .}"/>
|
||||
<MenuItem Header="增加页" Command="{binding:ControlBinding PageViewModel.AddPageCommand}" CommandParameter="{Binding .}"/>
|
||||
<MenuItem Header="复制页" Command="{binding:ControlBinding PageViewModel.AddCopyPageCommand}" CommandParameter="{Binding .}"/>
|
||||
<MenuItem Header="重命名页" Command="{binding:ControlBinding PageViewModel.RenamePageCommand}" CommandParameter="{Binding .}"/>
|
||||
<MenuItem Header="删除页" Command="{binding:ControlBinding PageViewModel.DeletePageCommand}" CommandParameter="{Binding .}"/>
|
||||
</ContextMenu>
|
||||
</Grid.ContextMenu>
|
||||
<TextBlock Text="{Binding Name}" Visibility="{Binding IsEditName,Converter={StaticResource Boolean2VisibilityReConverter}}">
|
||||
<TextBlock.InputBindings>
|
||||
<MouseBinding MouseAction="LeftDoubleClick" Command="{binding:ControlBinding RenamePageCommand}" CommandParameter="{Binding .}"/>
|
||||
<MouseBinding MouseAction="LeftDoubleClick" Command="{binding:ControlBinding PageViewModel.RenamePageCommand}" CommandParameter="{Binding .}"/>
|
||||
</TextBlock.InputBindings>
|
||||
</TextBlock>
|
||||
<TextBox x:Name="renametextbox" Text="{Binding Name,UpdateSourceTrigger=PropertyChanged}" Visibility="{Binding IsEditName,Converter={StaticResource BooleanToVisibilityConverter}}">
|
||||
<TextBox.InputBindings>
|
||||
<KeyBinding Key="Enter" Command="{binding:ControlBinding EndRenamePageCommand}" CommandParameter="{Binding .}"/>
|
||||
<KeyBinding Key="Enter" Command="{binding:ControlBinding PageViewModel.EndRenamePageCommand}" CommandParameter="{Binding .}"/>
|
||||
</TextBox.InputBindings>
|
||||
<TextBox.Style>
|
||||
<Style TargetType="TextBox">
|
||||
@@ -2549,7 +2549,7 @@
|
||||
</TextBox.Style>
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="LostFocus">
|
||||
<i:InvokeCommandAction Command="{binding:ControlBinding EndRenamePageCommand}" CommandParameter="{Binding .}" />
|
||||
<i:InvokeCommandAction Command="{binding:ControlBinding PageViewModel.EndRenamePageCommand}" CommandParameter="{Binding .}" />
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</TextBox>
|
||||
@@ -2558,18 +2558,18 @@
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
<Fluent:Button Size="Small" Icon="{iconPacks:Material Kind=Plus}"
|
||||
Command="{Binding AddPageCommand}"/>
|
||||
Command="{Binding PageViewModel.AddPageCommand}"/>
|
||||
</StackPanel>
|
||||
</Fluent:StatusBarItem>
|
||||
|
||||
<Separator HorizontalAlignment="Left" />
|
||||
|
||||
<Fluent:StatusBarItem Title="Color" Visibility="{Binding SelectedItem,Converter={StaticResource NullableToVisibilityConverter}}"
|
||||
<Fluent:StatusBarItem Title="Color" Visibility="{Binding SelectedItemViewModel,Converter={StaticResource NullableToVisibilityConverter}}"
|
||||
HorizontalAlignment="Right" >
|
||||
<StackPanel Orientation="Horizontal" >
|
||||
<TextBlock>形状ID:</TextBlock>
|
||||
<TextBox BorderThickness="0" IsReadOnly="True" Background="Transparent" Foreground="White"
|
||||
Text="{Binding SelectedItem.Id}"/>
|
||||
Text="{Binding SelectedItemViewModel.Id}"/>
|
||||
</StackPanel>
|
||||
</Fluent:StatusBarItem>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user