|
|
@@ -148,7 +148,7 @@ |
|
|
|
<icon:Material Kind="FileCode"/> |
|
|
|
</ToggleButton> |
|
|
|
|
|
|
|
<Slider DockPanel.Dock="Right" Width="100" Maximum="16" Minimum="1" Margin="4 0 0 0" |
|
|
|
<Slider DockPanel.Dock="Right" x:Name="slikl" Width="100" Maximum="16" Minimum="1" Margin="4 0 0 0" ValueChanged="Slider_ValueChanged" |
|
|
|
HorizontalContentAlignment="Center" Value="{Binding ElementName=cav,Path=GridPxiel}" ></Slider> |
|
|
|
<TextBlock DockPanel.Dock="Right" Text="对齐:" VerticalAlignment="Center" Margin="16 0 0 0"/> |
|
|
|
|
|
|
@@ -164,37 +164,40 @@ |
|
|
|
<ColumnDefinition/> |
|
|
|
<ColumnDefinition Width="auto"/> |
|
|
|
</Grid.ColumnDefinitions> |
|
|
|
<Compiler:CanvasPanel x:Name="cav" Visibility="{Binding CanvasPanelVisibility}" SelectedItem="{Binding CanSelectedItem,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" AllowDrop="True" RenderTransformOrigin="0.5,0.5" ClipToBounds="True" UseLayoutRounding="True" Focusable="True" SnapsToDevicePixels="True"> |
|
|
|
<Compiler:CanvasPanel.Background> |
|
|
|
<VisualBrush TileMode="Tile" Viewport="0,0,20,20" ViewportUnits="Absolute"> |
|
|
|
<VisualBrush.Visual> |
|
|
|
<Rectangle Width="20" Height="20" StrokeDashArray="4,2" StrokeThickness="0.5" Stroke="#CBCBCB"> |
|
|
|
<Rectangle.Style> |
|
|
|
<Style TargetType="{x:Type Rectangle}"> |
|
|
|
<Style.Triggers> |
|
|
|
<DataTrigger Binding="{Binding UseAutoAlignment, RelativeSource={RelativeSource AncestorType={x:Type Compiler:CanvasPanel}, Mode=FindAncestor}}" Value="True"> |
|
|
|
<Setter Property="Visibility" Value="Visible"/> |
|
|
|
</DataTrigger> |
|
|
|
<DataTrigger Binding="{Binding UseAutoAlignment, RelativeSource={RelativeSource AncestorType={x:Type Compiler:CanvasPanel}, Mode=FindAncestor}}" Value="False"> |
|
|
|
<Setter Property="Visibility" Value="Collapsed"/> |
|
|
|
</DataTrigger> |
|
|
|
</Style.Triggers> |
|
|
|
</Style> |
|
|
|
</Rectangle.Style> |
|
|
|
</Rectangle> |
|
|
|
</VisualBrush.Visual> |
|
|
|
</VisualBrush> |
|
|
|
</Compiler:CanvasPanel.Background> |
|
|
|
|
|
|
|
<Compiler:CanvasPanel.RenderTransform> |
|
|
|
<TransformGroup> |
|
|
|
<TranslateTransform x:Name="CanvasTranslate"/> |
|
|
|
</TransformGroup> |
|
|
|
</Compiler:CanvasPanel.RenderTransform> |
|
|
|
</Compiler:CanvasPanel> |
|
|
|
|
|
|
|
<ScrollViewer VerticalScrollBarVisibility="Visible" HorizontalScrollBarVisibility="Visible"> |
|
|
|
<Viewbox Width="auto" Height="auto" Grid.Row="1"> |
|
|
|
<Compiler:CanvasPanel x:Name="cav" Width="1920" Height="1080" Visibility="{Binding CanvasPanelVisibility}" SelectedItem="{Binding CanSelectedItem,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" AllowDrop="True" RenderTransformOrigin="0.5,0.5" ClipToBounds="True" UseLayoutRounding="True" Focusable="True" SnapsToDevicePixels="True"> |
|
|
|
<Compiler:CanvasPanel.Background> |
|
|
|
<VisualBrush TileMode="Tile" Viewport="0,0,20,20" ViewportUnits="Absolute"> |
|
|
|
<VisualBrush.Visual> |
|
|
|
<Rectangle Width="20" Height="20" StrokeDashArray="4,2" StrokeThickness="0.5" Stroke="#CBCBCB"> |
|
|
|
<Rectangle.Style> |
|
|
|
<Style TargetType="{x:Type Rectangle}"> |
|
|
|
<Style.Triggers> |
|
|
|
<DataTrigger Binding="{Binding UseAutoAlignment, RelativeSource={RelativeSource AncestorType={x:Type Compiler:CanvasPanel}, Mode=FindAncestor}}" Value="True"> |
|
|
|
<Setter Property="Visibility" Value="Visible"/> |
|
|
|
</DataTrigger> |
|
|
|
<DataTrigger Binding="{Binding UseAutoAlignment, RelativeSource={RelativeSource AncestorType={x:Type Compiler:CanvasPanel}, Mode=FindAncestor}}" Value="False"> |
|
|
|
<Setter Property="Visibility" Value="Collapsed"/> |
|
|
|
</DataTrigger> |
|
|
|
</Style.Triggers> |
|
|
|
</Style> |
|
|
|
</Rectangle.Style> |
|
|
|
</Rectangle> |
|
|
|
</VisualBrush.Visual> |
|
|
|
</VisualBrush> |
|
|
|
</Compiler:CanvasPanel.Background> |
|
|
|
|
|
|
|
<Compiler:CanvasPanel.RenderTransform> |
|
|
|
<TransformGroup> |
|
|
|
<TranslateTransform x:Name="CanvasTranslate"/> |
|
|
|
</TransformGroup> |
|
|
|
</Compiler:CanvasPanel.RenderTransform> |
|
|
|
</Compiler:CanvasPanel> |
|
|
|
</Viewbox> |
|
|
|
</ScrollViewer> |
|
|
|
<ctl:RunCanvas x:Name="runCanvas" Visibility="{Binding RunCanvasVisibility}" /> |
|
|
|
|
|
|
|
<avae:TextEditor x:Name="codeEditor" ShowLineNumbers="True" Padding="4" WordWrap="True" IsReadOnly="True" SyntaxHighlighting="XML" BorderThickness="1 0 0 0" BorderBrush="{StaticResource ControlBorderBrush}" Grid.Column="1" Width="480" Visibility="{Binding ElementName=showCode, Path=IsChecked, Converter={x:Static s:BoolToVisibilityConverter.Instance}}"/> |
|
|
|
</Grid> |
|
|
|
</Border> |
|
|
|