forked from AgoraIO/Agora-Chat-API-Examples
-
Notifications
You must be signed in to change notification settings - Fork 1
/
MainWindow.xaml
109 lines (99 loc) · 5.65 KB
/
MainWindow.xaml
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<Window x:Class="windows_example.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
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"
xmlns:local="clr-namespace:windows_example"
mc:Ignorable="d"
Title="windows-example" Height="450" Width="600">
<Grid>
<TextBox x:Name="UserIdTextBox" HorizontalAlignment="Left" VerticalAlignment="Top" Height="25" Margin="23,43,0,0" Text="" VerticalContentAlignment="Center" Width="120" >
<TextBox.Resources>
<VisualBrush x:Key="HelpBrush" TileMode="None" Opacity="0.3" Stretch="None" AlignmentX="Left">
<VisualBrush.Visual>
<TextBlock FontStyle="Normal" Text="user id"/>
</VisualBrush.Visual>
</VisualBrush>
</TextBox.Resources>
<TextBox.Style>
<Style TargetType="TextBox">
<Style.Triggers>
<Trigger Property="Text" Value="{x:Null}">
<Setter Property="Background" Value="{StaticResource HelpBrush}"/>
</Trigger>
<Trigger Property="Text" Value="">
<Setter Property="Background" Value="{StaticResource HelpBrush}"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBox.Style>
</TextBox>
<TextBox x:Name="AgoraTokenBox" HorizontalAlignment="Left" VerticalAlignment="Top" Height="25" Margin="156,43,0,0" Text="" VerticalContentAlignment="Center" Width="230" >
<TextBox.Resources>
<VisualBrush x:Key="HelpBrush" TileMode="None" Opacity="0.3" Stretch="None" AlignmentX="Left">
<VisualBrush.Visual>
<TextBlock FontStyle="Normal" Text="token"/>
</VisualBrush.Visual>
</VisualBrush>
</TextBox.Resources>
<TextBox.Style>
<Style TargetType="TextBox">
<Style.Triggers>
<Trigger Property="Text" Value="{x:Null}">
<Setter Property="Background" Value="{StaticResource HelpBrush}"/>
</Trigger>
<Trigger Property="Text" Value="">
<Setter Property="Background" Value="{StaticResource HelpBrush}"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBox.Style>
</TextBox>
<Button x:Name="SignInBtn" Content="Sign in" HorizontalAlignment="Left" Margin="395,43,0,0" VerticalAlignment="Top" Width="75" Height="25" Click="SignIn_Click"/>
<Button x:Name="SignOutBtn" Content="Sign out" HorizontalAlignment="Left" Margin="488,43,0,0" VerticalAlignment="Top" Width="75" Height="25" Click="SignOut_Click"/>
<TextBox x:Name="SingleChatIdTextBox" HorizontalAlignment="Left" VerticalAlignment="Top" Height="25" Margin="23,92,0,0" Text="" VerticalContentAlignment="Center" Width="120" >
<TextBox.Resources>
<VisualBrush x:Key="HelpBrush" TileMode="None" Opacity="0.3" Stretch="None" AlignmentX="Left">
<VisualBrush.Visual>
<TextBlock FontStyle="Normal" Text="single chat id"/>
</VisualBrush.Visual>
</VisualBrush>
</TextBox.Resources>
<TextBox.Style>
<Style TargetType="TextBox">
<Style.Triggers>
<Trigger Property="Text" Value="{x:Null}">
<Setter Property="Background" Value="{StaticResource HelpBrush}"/>
</Trigger>
<Trigger Property="Text" Value="">
<Setter Property="Background" Value="{StaticResource HelpBrush}"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBox.Style>
</TextBox>
<TextBox x:Name="MessageContentTextBox" HorizontalAlignment="Left" VerticalAlignment="Top" Height="25" Margin="160,92,0,0" Text="" VerticalContentAlignment="Center" Width="310" >
<TextBox.Resources>
<VisualBrush x:Key="HelpBrush" TileMode="None" Opacity="0.3" Stretch="None" AlignmentX="Left">
<VisualBrush.Visual>
<TextBlock FontStyle="Normal" Text="message content"/>
</VisualBrush.Visual>
</VisualBrush>
</TextBox.Resources>
<TextBox.Style>
<Style TargetType="TextBox">
<Style.Triggers>
<Trigger Property="Text" Value="{x:Null}">
<Setter Property="Background" Value="{StaticResource HelpBrush}"/>
</Trigger>
<Trigger Property="Text" Value="">
<Setter Property="Background" Value="{StaticResource HelpBrush}"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBox.Style>
</TextBox>
<Button x:Name="SendBtn" Content="Send" HorizontalAlignment="Left" Margin="488,92,0,0" VerticalAlignment="Top" Width="75" Height="25" Click="SendBtn_Click"/>
<TextBox x:Name="LogTextBox" VerticalAlignment="Top" Height="254" Margin="23,136,29,0" Text="" IsReadOnly="True" TextWrapping="Wrap" />
</Grid>
</Window>