-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCameraSelectWindow.axaml
More file actions
92 lines (87 loc) · 3.92 KB
/
Copy pathCameraSelectWindow.axaml
File metadata and controls
92 lines (87 loc) · 3.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="400" d:DesignHeight="300"
x:Class="ShowWrite.CameraSelectWindow"
Title="选择摄像头"
Width="400"
SizeToContent="Height"
WindowStartupLocation="CenterOwner"
CanResize="False"
Background="{DynamicResource ThemeSurface}"
ExtendClientAreaToDecorationsHint="True"
ExtendClientAreaTitleBarHeightHint="-1">
<Window.Styles>
<Style Selector="Button.camera-btn">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="BorderBrush" Value="{DynamicResource ThemeBorder}"/>
<Setter Property="Padding" Value="16,12"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="CornerRadius" Value="8"/>
<Setter Property="HorizontalAlignment" Value="Stretch"/>
<Setter Property="Margin" Value="0,4"/>
</Style>
<Style Selector="Button.camera-btn:pointerover">
<Setter Property="Background" Value="{DynamicResource ThemeHoverBackground}"/>
<Setter Property="BorderBrush" Value="{DynamicResource ThemePrimary}"/>
</Style>
</Window.Styles>
<Grid Margin="20,50,20,20">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0" MinHeight="60">
<StackPanel x:Name="CameraList" Spacing="4"/>
<StackPanel x:Name="StatusPanel"
Orientation="Vertical"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Spacing="16"
Margin="0,30"
IsVisible="False">
<Path x:Name="SpinnerPath"
Width="36" Height="36"
Stroke="{DynamicResource ThemePrimary}"
StrokeThickness="3"
StrokeLineCap="Round"
Data="M18,3 A15,15 0 0 1 33,18 A15,15 0 0 1 18,33 A15,15 0 0 1 3,18"
HorizontalAlignment="Center"
RenderTransformOrigin="50%,50%">
<Path.RenderTransform>
<RotateTransform Angle="0"/>
</Path.RenderTransform>
</Path>
<TextBlock x:Name="StatusText"
Text="正在扫描摄像头..."
FontSize="14"
Foreground="{DynamicResource ThemeTextSecondary}"
HorizontalAlignment="Center"/>
</StackPanel>
</Grid>
<StackPanel Grid.Row="1"
Orientation="Horizontal"
HorizontalAlignment="Right"
Spacing="12"
Margin="0,16,0,0">
<Button x:Name="RefreshBtn"
Content="刷新"
Padding="20,8"
Background="{DynamicResource ThemeSurfaceVariant}"
Foreground="{DynamicResource ThemeTextPrimary}"
CornerRadius="6"
Cursor="Hand"
Click="RefreshBtn_Click"/>
<Button x:Name="CancelBtn"
Content="取消"
Padding="20,8"
Background="{DynamicResource ThemeSurfaceVariant}"
Foreground="{DynamicResource ThemeTextPrimary}"
CornerRadius="6"
Cursor="Hand"
Click="CancelBtn_Click"/>
</StackPanel>
</Grid>
</Window>