improvements and fixes

This commit is contained in:
2019-06-22 11:21:54 +03:00
parent 5da5856308
commit 340b3055f0
5 changed files with 72 additions and 33 deletions

View File

@@ -47,8 +47,10 @@ namespace BrightSharp.Diagrams
{
Point dragDelta = new Point(e.HorizontalChange, e.VerticalChange);
var zoomControl = designerItem.Parent as dynamic;
double.TryParse(zoomControl.Tag as string, out var gridSize);
double gridSize = 0;
var zoomControl = designerItem.Parent as ZoomControl;
if (zoomControl != null) gridSize = zoomControl.GridSize;
if (rotateTransform != null)
{

View File

@@ -103,6 +103,7 @@ namespace BrightSharp.Diagrams
{
public LodInfo(string lod)
{
lod = lod.TrimStart();
UseAnimation = lod.StartsWith("a", true, CultureInfo.InvariantCulture);
lod = lod.TrimStart('a', 'A').Trim();

View File

@@ -3796,7 +3796,9 @@
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TextBoxBase}">
<ScrollViewer x:Name="PART_ContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
<ScrollViewer x:Name="PART_ContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>