Skip to content

Commit f674751

Browse files
committed
Add None Background for LiveGraph
1 parent 494a7f5 commit f674751

3 files changed

Lines changed: 4 additions & 1 deletion

File tree

dev/DevWinUI.Gallery/Views/Pages/Win2d/LiveGraphPage.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
</StackPanel>
4545

4646
<StackPanel Orientation="Horizontal" Spacing="5">
47-
<ComboBox x:Name="CmbBackgroundMode" HorizontalAlignment="Stretch" Header="Background Mode" ItemsSource="{x:Bind LiveGraphBackgroundModeItems, Mode=OneWay}" SelectedIndex="0">
47+
<ComboBox x:Name="CmbBackgroundMode" HorizontalAlignment="Stretch" Header="Background Mode" ItemsSource="{x:Bind LiveGraphBackgroundModeItems, Mode=OneWay}" SelectedIndex="2">
4848
<ComboBox.ItemTemplate>
4949
<DataTemplate x:DataType="dev:LiveGraphBackgroundMode">
5050
<TextBlock Text="{x:Bind}" />

dev/DevWinUI/Controls/Win2DAndComposition/LiveGraph/Data/LiveGraphBackgroundMode.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
public enum LiveGraphBackgroundMode
44
{
5+
None,
56
Cross,
67
Dot
78
}

dev/DevWinUI/Controls/Win2DAndComposition/LiveGraph/LiveGraph.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,8 @@ private void DrawBackground(CanvasDrawingSession ds, float width, float height)
427427
{
428428
switch (backgroundMode)
429429
{
430+
case LiveGraphBackgroundMode.None:
431+
break;
430432
case LiveGraphBackgroundMode.Cross:
431433
// Draw vertical lines
432434
for (float x = offsetX; x < width; x += crossSpacing)

0 commit comments

Comments
 (0)