public void Overflow(TickBarPlacement placement, bool isDirectionReversed, double tickWidth, double strokeThickness, string padding, string expected) { var tickBar = new LinearTickBar { StrokeThickness = strokeThickness, Minimum = 0, Maximum = 10, TickFrequency = 1, TickWidth = tickWidth, Stroke = Brushes.Black, Fill = Brushes.Red, Placement = placement, IsDirectionReversed = isDirectionReversed, Padding = padding.AsThickness(), }; var gauge = new LinearGauge { Content = tickBar }; gauge.Arrange(new Rect(new Size(10, 10))); Assert.AreEqual(expected, gauge.ContentOverflow.ToString()); Assert.AreEqual(expected, tickBar.Overflow.ToString()); gauge.Measure(new Size(10, 10)); gauge.Arrange(new Rect(new Size(10, 10))); Assert.AreEqual(expected, gauge.ContentOverflow.ToString()); Assert.AreEqual(expected, tickBar.Overflow.ToString()); }
public void Overflow(TickBarPlacement placement, bool isDirectionReversed, double strokeThickness, PenLineCap startLineCap, PenLineCap endLineCap, string padding, string expected) { var tickBar = new LinearLineBar { StrokeThickness = strokeThickness, Minimum = 0, Maximum = 10, Stroke = Brushes.Black, StrokeStartLineCap = startLineCap, StrokeEndLineCap = endLineCap, Placement = placement, IsDirectionReversed = isDirectionReversed, Padding = padding.AsThickness(), }; var gauge = new LinearGauge { Content = tickBar }; gauge.Arrange(new Rect(new Size(10, 10))); Assert.AreEqual(expected, gauge.ContentOverflow.ToString()); Assert.AreEqual(expected, tickBar.Overflow.ToString()); gauge.Measure(new Size(10, 10)); gauge.Arrange(new Rect(new Size(10, 10))); Assert.AreEqual(expected, gauge.ContentOverflow.ToString()); Assert.AreEqual(expected, tickBar.Overflow.ToString()); }
public void Overflow(TickBarPlacement placement, bool isDirectionReversed, string padding, string expected) { var tickBar = new LinearTextBar { Minimum = 0, Maximum = 10, TickFrequency = 1, Placement = placement, IsDirectionReversed = isDirectionReversed, Padding = padding.AsThickness(), FontFamily = new FontFamily("Arial"), // Seoge UI is measured differently on Win 7 and Win 10 for some reason FontSize = 12, }; var gauge = new LinearGauge { Content = tickBar }; gauge.Arrange(new Rect(new Size(10, 10))); Assert.AreEqual(expected, gauge.ContentOverflow.ToString()); Assert.AreEqual(expected, tickBar.Overflow.ToString()); gauge.Measure(new Size(10, 10)); gauge.Arrange(new Rect(new Size(10, 10))); Assert.AreEqual(expected, gauge.ContentOverflow.ToString()); Assert.AreEqual(expected, tickBar.Overflow.ToString()); }
public void Overflow(TickBarPlacement placement, bool isDirectionReversed, double value, string expected) { var range = new LinearIndicator { Value = value, Style = StyleHelper.DefaultStyle <LinearIndicator>(), }; var gauge = new LinearGauge { Minimum = 0, Maximum = 100, Value = value, Placement = placement, IsDirectionReversed = isDirectionReversed, Content = range, Style = StyleHelper.DefaultStyle <LinearGauge>(), }; gauge.Arrange(new Rect(new Size(10, 10))); Assert.AreEqual(expected, gauge.ContentOverflow.ToString()); Assert.AreEqual(expected, range.Overflow.ToString()); gauge.Measure(new Size(10, 10)); gauge.Arrange(new Rect(new Size(10, 10))); Assert.AreEqual(expected, gauge.ContentOverflow.ToString()); Assert.AreEqual(expected, range.Overflow.ToString()); }