SmartPanel.xaml 73 KB
Newer Older
Nicolas Jager's avatar
Nicolas Jager committed
1
2
3
<!-- **********************************************************************
* Copyright (C) 2016 by Savoir-faire Linux                                *
* Author: Jäger Nicolas<nicolas.jager@savoirfairelinux.com>               *
4
* Author: Traczyk Andreas<andreas.traczyk@savoirfairelinux.com>           *
Nicolas Jager's avatar
Nicolas Jager committed
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
*                                                                         *
* This program is free software; you can redistribute it and/or modify    *
* it under the terms of the GNU General Public License as published by    *
* the Free Software Foundation; either version 3 of the License, or       *
* (at your option) any later version.                                     *
*                                                                         *
* This program is distributed in the hope that it will be useful,         *
* but WITHOUT ANY WARRANTY; without even the implied warranty of          *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the           *
* GNU General Public License for more details.                            *
*                                                                         *
* You should have received a copy of the GNU General Public License       *
* along with this program.  If not, see <http://www.gnu.org/licenses/> .  *
*********************************************************************** -->
<Page x:Class="RingClientUWP.Views.SmartPanel"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:local="using:RingClientUWP"
23
      xmlns:controls="using:RingClientUWP.Controls"
Nicolas Jager's avatar
Nicolas Jager committed
24
      xmlns:views="using:RingClientUWP.Views"
Nicolas Jager's avatar
Nicolas Jager committed
25
26
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
27
      NavigationCacheMode="Enabled"
Nicolas Jager's avatar
Nicolas Jager committed
28
29
      mc:Ignorable="d">

Nicolas Jager's avatar
Nicolas Jager committed
30
    <Page.Resources>
Nicolas Jager's avatar
Nicolas Jager committed
31
32
33
34
35
        <!-- converters -->
        <views:NewMessageBubleNotification x:Key="_NewMessageBubleNotification_" />
        <views:IncomingVisibility x:Key="_IncomingVisibility_" />
        <views:OutGoingVisibility x:Key="_OutGoingVisibility_" />
        <views:HasAnActiveCall x:Key="_HasAnActiveCall_" />
36
37
        <views:AccountTypeToSourceImage x:Key="_AccountTypeToSourceImage_" />
        <views:AccountSelectedToVisibility x:Key="_AccountSelectedToVisibility_" />
38
        <views:CollapseEmptyString x:Key="_CollapseEmptyString_" />
Nicolas Jager's avatar
Nicolas Jager committed
39
        <views:ContactStatusNotification x:Key="_ContactStatusNotification_" />
40
        <views:boolToVisibility x:Key="_boolToVisibility_" />
Nicolas Jager's avatar
Nicolas Jager committed
41
        <views:CallStatusToSpinnerVisibility x:Key="_CallStatusToSpinnerVisibility_" />
42
43
        <views:CallStatusForIncomingCallAnimatedEllipse x:Key="_CallStatusForIncomingCallAnimatedEllipse_" />
        <views:CallStatusForIncomingCallStaticEllipse x:Key="_CallStatusForIncomingCallStaticEllipse_" />
Nicolas Jager's avatar
Nicolas Jager committed
44

Nicolas Jager's avatar
Nicolas Jager committed
45
46
47
48
        <!-- template for contacts. -->
        <DataTemplate x:Key="ContactTemplate"
                      x:DataType="local:Contact">
            <Grid>
49
50
51
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="310"/>
                </Grid.ColumnDefinitions>
Nicolas Jager's avatar
Nicolas Jager committed
52
53
54
55
                <Grid.RowDefinitions>
                    <RowDefinition Height="60"/>
                    <!-- use the height of _contactBar_ to make it visible or collapsed. -->
                    <RowDefinition x:Name="_contactBar_"
56
                                   Height="{x:Bind _contactBarHeight, Mode=OneWay}"/>
Nicolas Jager's avatar
Nicolas Jager committed
57
58
59
60
61
62
63
                </Grid.RowDefinitions>
                <Grid Grid.Row="0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="60"/>
                        <ColumnDefinition Width="*"
                                          MinWidth="200"/>
                    </Grid.ColumnDefinitions>
atraczyk's avatar
atraczyk committed
64
                    <Image x:Name="_XcontactAvatar_"
Nicolas Jager's avatar
Nicolas Jager committed
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
                           VerticalAlignment="Center"
                           HorizontalAlignment="Center"
                           Grid.Column="0"
                           Width="55"
                           Height="55"
                           Source="Assets\TESTS\contactAvatar.png"/>
                    <!-- visual notifications. -->
                    <Border x:Name="_visualNotificationVideoChat_"
                            Visibility="Collapsed"
                            Style="{StaticResource BorderStyle1}">
                        <TextBlock Text="&#xE8AA;"
                                   Style="{StaticResource TextSegoeStyle1}"/>
                        <Border.RenderTransform>
                            <TranslateTransform X="17" Y="-14"/>
                        </Border.RenderTransform>
                    </Border>
81
82
83
84
85
86
                    <Grid Grid.Column="1">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="30"/>
                            <RowDefinition Height="30"/>
                        </Grid.RowDefinitions>
                        <!-- name of the contact. -->
87
88
                        <TextBlock  x:Name="_contactName_"
                                    Grid.Row="0"
Nicolas Jager's avatar
Nicolas Jager committed
89
                                    Text="{x:Bind _name, Mode=OneWay}"
90
                                    TextTrimming="CharacterEllipsis">
91
92
                        </TextBlock>
                    </Grid>
Nicolas Jager's avatar
Nicolas Jager committed
93
94
95
                </Grid>
            </Grid>
        </DataTemplate>
Nicolas Jager's avatar
Nicolas Jager committed
96
97
98
        <!-- template for AccountListItems. -->
        <DataTemplate x:Key="AccountListItemsTemplate"
                      x:DataType="controls:AccountListItem">
99
            <Grid Margin="0,10">
Nicolas Jager's avatar
Nicolas Jager committed
100
                <Grid.ColumnDefinitions>
101
                    <ColumnDefinition Width="40"/>
atraczyk's avatar
atraczyk committed
102
                    <ColumnDefinition Width="280"/>
Nicolas Jager's avatar
Nicolas Jager committed
103
                </Grid.ColumnDefinitions>
104
105
106
107
108
109
                <Border Grid.Column="0"
                        Margin="5,0"
                        Style="{StaticResource BorderStyle3}">
                    <Image x:Name="_AccountTypeIcon_"
                           VerticalAlignment="Center"
                           HorizontalAlignment="Center"
Nicolas Jager's avatar
Nicolas Jager committed
110
                           Source="{x:Bind  _account.accountType_, Converter={StaticResource _AccountTypeToSourceImage_}, Mode=OneWay}"/>
111
112
113
114
115
116
                </Border>
                <Button x:Name="_editAccountMenuButton_"
                        HorizontalAlignment="Right"
                        VerticalAlignment="Top"
                        Content="&#xE104;"
                        FontFamily="Segoe MDL2 Assets"
117
                        Click="_editAccountMenuButton__Click"
118
119
120
                        FontSize="20"
                        Foreground="White"
                        Background="Transparent"
atraczyk's avatar
atraczyk committed
121
122
123
124
                        BorderThickness="0"
                        Padding="0,4,0,2"
                        Margin="0,0,12,0"
                        Width="28"
125
126
127
                        Visibility="{x:Bind _isSelected, Converter={StaticResource _AccountSelectedToVisibility_}, Mode=OneWay}"
                        Grid.Column="1">
                    <Button.RenderTransform>
atraczyk's avatar
atraczyk committed
128
                        <TranslateTransform Y="-10"/>
129
130
131
132
133
                    </Button.RenderTransform>
                </Button>
                <StackPanel Grid.Column="1">
                    <TextBlock x:Name="_accountName_"
                           Style="{StaticResource TextStyle5}"
134
                           Text="{x:Bind  _account.name_, Mode=OneWay}"/>
135
                    <TextBlock x:Name="_ringID_"
136
137
138
139
140
141
142
143
144
                               Grid.ColumnSpan="2"
                               Style="{StaticResource TextStyle6}"
                               Visibility="{x:Bind  _account.ringID_, Converter={StaticResource _CollapseEmptyString_}, Mode=OneWay}"
                               Text="{x:Bind  _account.ringID_, Mode=OneWay}"/>
                    <TextBlock x:Name="_sipUsername_"
                               Grid.ColumnSpan="2"
                               Visibility="{x:Bind  _account._sipUsername, Converter={StaticResource _CollapseEmptyString_}, Mode=OneWay}"
                               Style="{StaticResource TextStyle6}"
                               Text="{x:Bind  _account._sipUsername, Mode=OneWay}"/>
145
                </StackPanel>
Nicolas Jager's avatar
Nicolas Jager committed
146
147
            </Grid>
        </DataTemplate>
148
149
150
        <!-- template for smartpanelitems. -->
        <DataTemplate x:Key="SmartPanelItemsTemplate"
                      x:DataType="controls:SmartPanelItem">
151
152
153
154
            <Grid PointerReleased="Grid_PointerReleased"
                  PointerEntered="Grid_PointerEntered"
                  PointerExited="Grid_PointerExited"
                  PointerMoved="Grid_PointerMoved"
155
                  Visibility="{x:Bind  _showMe, Mode=OneWay}">
156
                <Grid.RowDefinitions>
Nicolas Jager's avatar
Nicolas Jager committed
157
158
159
                    <!-- row definition for the contact. -->
                    <RowDefinition Height="auto"/>
                    <!-- row definition for the incoming call bar. -->
160
161
                    <RowDefinition Height="auto"/>
                </Grid.RowDefinitions>
162
                <!-- the first rectangle helps to detect mouse overing-->
Nicolas Jager's avatar
Nicolas Jager committed
163
                <Rectangle Fill="Transparent"
164
                           Width="320"
Nicolas Jager's avatar
Nicolas Jager committed
165
                           Grid.Row="0"/>
166
167
168
169
                <!-- the two next rectangles offer a better visibility correlation between the call button and the
                     backgrounds. Using them, avoid some visual bugs -->
                <!-- the second rectangle controls the background for a selected item -->
                <Rectangle Fill="#3bc1d3"
170
                           Width="320"
171
172
173
174
                           Visibility="{x:Bind _isSelected, Converter={StaticResource _boolToVisibility_}, Mode=OneWay}"
                           Grid.Row="0"/>
                <!-- the thirs rectangle controls the background for an hovered item -->
                <Rectangle Fill="#ced9e1"
175
                           Width="320"
176
177
                           Visibility="{x:Bind _isHovered, Converter={StaticResource _boolToVisibility_}, Mode=OneWay}"
                           Grid.Row="0"/>
Nicolas Jager's avatar
Nicolas Jager committed
178
179
                <!-- curtain over item with contact not ready (e.g. lookup is in progress) -->
                <Rectangle Fill="White"
180
                           Width="320"
Nicolas Jager's avatar
Nicolas Jager committed
181
182
183
184
185
186
187
                           Grid.Row="0"
                           Canvas.ZIndex="2"
                           Opacity="0.6"
                           Visibility="{x:Bind _contact._contactStatus, Converter={StaticResource _ContactStatusNotification_}, Mode=OneWay}"/>
                <ProgressBar Canvas.ZIndex="3"
                             Visibility="{x:Bind _contact._contactStatus, Converter={StaticResource _ContactStatusNotification_}, Mode=OneWay}"
                             IsIndeterminate="True"/>
Nicolas Jager's avatar
Nicolas Jager committed
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
                <!-- contact. -->
                <Grid Grid.Row="0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="310"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="60"/>
                        <!-- use the height of _contactBar_ to make it visible or collapsed. -->
                        <RowDefinition x:Name="_contactBar_"
                                       Height="{x:Bind _contact._contactBarHeight, Mode=OneWay}"/>
                    </Grid.RowDefinitions>
                    <Grid Grid.Row="0">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="60"/>
                            <ColumnDefinition Width="*"
                                              MinWidth="200"/>
                        </Grid.ColumnDefinitions>
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
                        <StackPanel Grid.Column="0">
                            <!-- so far, I haven't fond any way to make a nested animation, inside a datatemplate, starting with the begin method from the code.
                            I use a black magic workaround with two ellipses... -->
                            <Ellipse x:Name="_incomingCallAnimatedEllipse_"
                                Height="50"
                                     Visibility="{x:Bind _callStatus, Converter={StaticResource _CallStatusForIncomingCallAnimatedEllipse_}, Mode=OneWay}"
                                        Width="50"
                                        VerticalAlignment="Center"
                                        HorizontalAlignment="Center"
                                        Margin="5">
                                <Ellipse.Fill>
                                    <ImageBrush  x:Name="_contactAvatar2_"
                                            ImageSource="{x:Bind _contact._avatarImage, Mode=OneWay}"/>
                                </Ellipse.Fill>
                                <Ellipse.Triggers>
                                    <EventTrigger>
                                        <BeginStoryboard>
                                            <Storyboard x:Name="_toto_">
                                                <DoubleAnimation Storyboard.TargetName="_incomingCallAnimatedEllipse_"
                                                             Storyboard.TargetProperty="Opacity"
                                                             From="1"
                                                             AutoReverse="True"
                                                             RepeatBehavior="Forever"
                                                             To="0"
                                                             Duration="0:0:1"/>
                                            </Storyboard>
                                        </BeginStoryboard>
                                    </EventTrigger>
                                </Ellipse.Triggers>
                            </Ellipse>
                            <Ellipse Visibility="{x:Bind _callStatus, Converter={StaticResource _CallStatusForIncomingCallStaticEllipse_}, Mode=OneWay}"

                                Height="50"
                                        Width="50"
                                        VerticalAlignment="Center"
                                        HorizontalAlignment="Center"
                                        Margin="5">
                                <Ellipse.Fill>
                                    <ImageBrush  x:Name="_contactAvatar_"
                                            ImageSource="{x:Bind _contact._avatarImage, Mode=OneWay}"/>
                                </Ellipse.Fill>
                            </Ellipse>
                            <!-- visual notifications. -->
                            <!--<Border x:Name="_visualNotificationVideoChat_"
                                Visibility="Collapsed"
                                Style="{StaticResource BorderStyle1}">
                                <TextBlock Text="&#xE8AA;"
                                       Style="{StaticResource TextSegoeStyle1}"/>
                                <Border.RenderTransform>
                                    <TranslateTransform X="17" Y="-14"/>
                                </Border.RenderTransform>
                            </Border>-->
                            <Border x:Name="_visualNotificationNewMessage_"
                                    Visibility="{x:Bind _contact._unreadMessages, Converter={StaticResource _NewMessageBubleNotification_}, Mode=OneWay}"
                                    Style="{StaticResource BorderStyle2}">
                                <TextBlock Text="{x:Bind _contact._unreadMessages, Mode=OneWay}"
                                           Style="{StaticResource TextStyle3}"/>
                                <Border.RenderTransform>
                                    <TranslateTransform X="-17" Y="-58"/>
                                </Border.RenderTransform>
                            </Border>
                        </StackPanel>
Nicolas Jager's avatar
Nicolas Jager committed
267
268
269

                        <Grid Grid.Column="1">
                            <Grid.RowDefinitions>
270
                                <RowDefinition Height="60"/>
Nicolas Jager's avatar
Nicolas Jager committed
271
272
                                <RowDefinition Height="30"/>
                            </Grid.RowDefinitions>
Nicolas Jager's avatar
Nicolas Jager committed
273
                            <StackPanel Grid.Row="0">
274
                                <!-- name of the contact. -->
Nicolas Jager's avatar
Nicolas Jager committed
275
276
277
278
279
280
281
282
                                <TextBlock  x:Name="_contactName_"
                                            Text="{x:Bind _contact._name, Mode=OneWay}"
                                            TextTrimming="CharacterEllipsis">
                                </TextBlock>
                                <StackPanel Orientation="Horizontal">
                                    <TextBlock  x:Name="_contactLastTime_"
                                                FontStyle="Italic"
                                                Foreground="#333333"
283
284
                                                MaxWidth="200"
                                                TextTrimming="CharacterEllipsis"
Nicolas Jager's avatar
Nicolas Jager committed
285
286
287
                                                FontSize="10"
                                                Text="{x:Bind _contact._lastTime, Mode=OneWay}"/>
                                    <ProgressBar Foreground="#333333"
288
289
                                                 HorizontalAlignment="Right"
                                                 Width="150"
Nicolas Jager's avatar
Nicolas Jager committed
290
291
292
                                                 Visibility="{x:Bind _callStatus, Converter={StaticResource _CallStatusToSpinnerVisibility_}, Mode=OneWay}"
                                                 IsIndeterminate="True"/>
                                </StackPanel>
293
294
295
                                <!-- call action buttons. -->
                                <!-- Style="{StaticResource roundButtonTemplate}" old style, keep it until refacto -->
                                <Button Grid.Row="0"
296
                                    Visibility="{x:Bind _isCallable, Converter={StaticResource _boolToVisibility_}, Mode=OneWay}"
Nicolas Jager's avatar
Nicolas Jager committed
297
298
299
                                    Click="_callContact__Click"
                                    VerticalAlignment="Bottom"
                                    HorizontalAlignment="Left"
Nicolas Jager's avatar
Nicolas Jager committed
300
                                    Style="{StaticResource ButtonStyleForCallBar}"
Nicolas Jager's avatar
Nicolas Jager committed
301
                                    FontFamily="Segoe MDL2 Assets"
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
                                    Content="&#xE116;"/>
                                <StackPanel Orientation="Horizontal"
                                            Visibility="Visible"
                                            Grid.Row="0"
                                            VerticalAlignment="Bottom"
                                            HorizontalAlignment="Right">
                                    <Button x:Name="_acceptIncomingCallBtn_"
                                            Click="_acceptIncomingCallBtn__Click"
                                            Visibility="{x:Bind _callStatus, Converter={StaticResource _IncomingVisibility_}, Mode=OneWay}"
                                            VerticalAlignment="Bottom"
                                            HorizontalAlignment="Center"
                                            Style="{StaticResource ButtonStyleForCallBar}"
                                            FontFamily="Segoe MDL2 Assets"
                                            Content="&#xE10B;"/>
                                    <Button x:Name="_rejectIncomingCallBtn_"
                                            Click="_rejectIncomingCallBtn__Click"
                                            Visibility="{x:Bind _callStatus, Converter={StaticResource _IncomingVisibility_}, Mode=OneWay}"
                                            VerticalAlignment="Bottom"
                                            HorizontalAlignment="Center"
                                            Style="{StaticResource ButtonStyleForCallBar}"
                                            FontFamily="Segoe MDL2 Assets"
                                            Content="&#xE10A;"/>
                                </StackPanel>
                                <Button x:Name="_cancelCallBtn_"
                                        Click="_cancelCallBtn__Click"
                                        Visibility="{x:Bind _callStatus, Converter={StaticResource _OutGoingVisibility_}, Mode=OneWay}"
                                        VerticalAlignment="Bottom"
                                        HorizontalAlignment="Right"
                                        Style="{StaticResource ButtonStyleForCallBar}"
                                        FontFamily="Segoe MDL2 Assets"
                                        Content="&#xE10A;"/>
                            </StackPanel>
Nicolas Jager's avatar
Nicolas Jager committed
334
335
336
                        </Grid>
                    </Grid>
                </Grid>
337
338
                <!-- old call bar.KEEP FOR DEBUG -->
                <!--<Grid Width="320"
Nicolas Jager's avatar
Nicolas Jager committed
339
340
341
342
343
344
345
                      Grid.Row="1"
                      HorizontalAlignment="Left"
                      Background="DarkGray">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="auto"/>
                        <RowDefinition Height="auto"/>
                    </Grid.RowDefinitions>
346
347

                    <TextBlock x:Name="_CallStatus_"
Nicolas Jager's avatar
Nicolas Jager committed
348
349
                           Grid.Row="0"
                           Foreground="White"
350
351
                           Text="{x:Bind _callStatus, Mode=OneWay}"
                           Visibility="{x:Bind _callStatus, Converter={StaticResource _HasAnActiveCall_}, Mode=OneWay}"
Nicolas Jager's avatar
Nicolas Jager committed
352
                           HorizontalAlignment="Center">
353
                    </TextBlock>
Nicolas Jager's avatar
Nicolas Jager committed
354
355
356
357
358
359
                    <StackPanel Orientation="Horizontal"
                                Visibility="Visible"
                                Grid.Row="1"
                                HorizontalAlignment="Center">
                        <Button x:Name="_acceptIncomingCallBtn_"
                            Click="_acceptIncomingCallBtn__Click"
360
                            Visibility="{x:Bind _callStatus, Converter={StaticResource _IncomingVisibility_}, Mode=OneWay}"
Nicolas Jager's avatar
Nicolas Jager committed
361
362
363
364
365
                            VerticalAlignment="Center"
                            HorizontalAlignment="Center"
                            Content="Accept"/>
                        <Button x:Name="_rejectIncomingCallBtn_"
                            Click="_rejectIncomingCallBtn__Click"
366
                            Visibility="{x:Bind _callStatus, Converter={StaticResource _IncomingVisibility_}, Mode=OneWay}"
Nicolas Jager's avatar
Nicolas Jager committed
367
368
369
370
371
                            VerticalAlignment="Center"
                            HorizontalAlignment="Center"
                            Content="Reject"/>
                        <Button x:Name="_cancelCallBtn_"
                            Click="_cancelCallBtn__Click"
372
                            Visibility="{x:Bind _callStatus, Converter={StaticResource _OutGoingVisibility_}, Mode=OneWay}"
Nicolas Jager's avatar
Nicolas Jager committed
373
374
375
376
                            VerticalAlignment="Center"
                            HorizontalAlignment="Center"
                            Content="Cancel"/>
                    </StackPanel>
377
                </Grid>-->
378
379
            </Grid>
        </DataTemplate>
Nicolas Jager's avatar
Nicolas Jager committed
380
381
    </Page.Resources>

Nicolas Jager's avatar
Nicolas Jager committed
382
    <Grid>
Nicolas Jager's avatar
Nicolas Jager committed
383
384
385
386
387
388
389
        <Grid.RowDefinitions>
            <!-- where accounts and share menu drop down are. -->
            <RowDefinition Height="auto"/>
            <!-- where contacts and settings are. -->
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <!-- drop down menus. -->
atraczyk's avatar
atraczyk committed
390
        <Grid Background="#3bc1d3">
Nicolas Jager's avatar
Nicolas Jager committed
391
392
393
            <Grid.RowDefinitions>
                <!-- where the selected account is shown. -->
                <RowDefinition x:Name="_selectedAccountRow_"
394
                               Height="60"/>
Nicolas Jager's avatar
Nicolas Jager committed
395
396
397
398
399
400
401
                <!-- where the drop down menus are shown. -->
                <RowDefinition Height="auto"/>
            </Grid.RowDefinitions>
            <!-- selected account. -->
            <Grid Grid.Row="0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition x:Name="_selectedAccountAvatarColumn_"
402
                                      Width="60"/>
Nicolas Jager's avatar
Nicolas Jager committed
403
404
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
405
406
                <Ellipse
                    x:Name="_selectedAccountAvatarContainer_"
407
408
                    Height="50"
                    Width="50"
409
                    Grid.Column="0"
410
411
412
413
414
                    Stroke="White"
                    StrokeThickness="3"
                    PointerEntered="_selectedAccountAvatarContainer__PointerEntered"
                    PointerExited="_selectedAccountAvatarContainer__PointerExited"
                    PointerReleased="_selectedAccountAvatarContainer__PointerReleased"
415
416
417
418
419
420
421
                    Margin="5">
                    <Ellipse.Fill>
                        <ImageBrush
                            x:Name="_selectedAccountAvatar_"
                            ImageSource="Assets\TESTS\contactAvatar.png"/>
                    </Ellipse.Fill>
                </Ellipse>
422
423
424
                <Ellipse
                    x:Name="_shaderPhotoboothIcon_"
                    Visibility="Collapsed"
425
426
                    Height="50"
                    Width="50"
427
428
429
430
431
432
433
434
435
436
437
438
439
                    Grid.Column="0"
                    IsHitTestVisible="False"
                    Fill="Black"
                    Opacity="0.3"
                    Margin="5">
                </Ellipse>
                <TextBlock x:Name="_photoboothIcon_"
                           Grid.Column="0"
                           Visibility="Collapsed"
                           IsHitTestVisible="False"
                           Style="{StaticResource TextSegoeStyle-Centered-40pt-white}"
                           Text="&#xE722;">
                </TextBlock>
Nicolas Jager's avatar
Nicolas Jager committed
440
441
                <StackPanel Grid.Column="1"
                            VerticalAlignment="Bottom">
442
                    <TextBlock x:Name="_selectedAccountName_"
443
444
445
                               Text="the wizard will be sumoned..."
                               Margin="10"
                               VerticalAlignment="Center"
atraczyk's avatar
atraczyk committed
446
                               TextTrimming="CharacterEllipsis"
Nicolas Jager's avatar
Nicolas Jager committed
447
448
                               Style="{StaticResource TextStyle2}"/>
                    <StackPanel Orientation="Horizontal">
449
450
                        <!-- contacts list -->
                        <ToggleButton x:Name="_contactsListMenuButton_"
atraczyk's avatar
atraczyk committed
451
452
                                      VerticalAlignment="Bottom"
                                      Content="&#xe716;"
453
454
455
                                      Click="_contactsListMenuButton__Click"
                                      Style="{StaticResource ToggleButtonStyle2}"/>
                        <!-- account menu -->
Nicolas Jager's avatar
Nicolas Jager committed
456
457
                        <ToggleButton x:Name="_accountsMenuButton_"
                                      VerticalAlignment="Bottom"
458
                                      Click="_accountsMenuButton__Click"
Nicolas Jager's avatar
Nicolas Jager committed
459
                                      Content="&#xE168;"
460
                                      Style="{StaticResource ToggleButtonStyle2}"/>
461
                        <!-- _shareMenuButton_ -->
Nicolas Jager's avatar
Nicolas Jager committed
462
463
                        <ToggleButton x:Name="_shareMenuButton_"
                                      VerticalAlignment="Bottom"
464
465
466
467
468
469
470
471
472
473
474
475
                                      Click="_shareMenuButton__Click"
                                      Style="{StaticResource ToggleButtonStyle2}">
                            <StackPanel>
                                <Image x:Name="_qrCodeIconWhite_"
                                       Source="Assets/qrCodeIconWhite.png"
                                       Visibility="Visible"
                                       Stretch="None"/>
                                <Image x:Name="_qrCodeIconBlack_"
                                       Visibility="Collapsed"
                                       Source="Assets/qrCodeIconBlack.png"
                                       Stretch="None"/>
                            </StackPanel>
476
477
                        </ToggleButton>
                        <!-- _devicesMenuButton_ -->
478
479
                        <ToggleButton x:Name="_devicesMenuButton_"
                                      VerticalAlignment="Bottom"
480
                                      Click="_devicesMenuButton__Click"
481
                                      Content="&#xE836;"
482
                                      Style="{StaticResource ToggleButtonStyle2}"/>
atraczyk's avatar
atraczyk committed
483
484
                        <!-- _settingsMenuButton_ -->
                        <ToggleButton x:Name="_settingsMenuButton_"
485
                                      Click="_settingsMenuButton__Click"
atraczyk's avatar
atraczyk committed
486
487
                                      VerticalAlignment="Bottom"
                                      Content="&#xE115;"
488
                                      Style="{StaticResource ToggleButtonStyle2}"/>
Nicolas Jager's avatar
Nicolas Jager committed
489
490
491
492
493
                    </StackPanel>
                </StackPanel>
            </Grid>

            <!--sub menus like the accounts list or the share menu are just below, technicaly they are nested inside the
Nicolas Jager's avatar
Nicolas Jager committed
494
            same row. To summon them we use the visibility of their own grid, by linking it to a toggle button-->
Nicolas Jager's avatar
Nicolas Jager committed
495

Nicolas Jager's avatar
Nicolas Jager committed
496
497
        </Grid>
        <!-- smartList and settings. -->
498
499
        <Grid Grid.Row="1"
              Background="#FFE4F1F9">
Nicolas Jager's avatar
Nicolas Jager committed
500
501
            <!-- accounts menu. -->
            <Grid x:Name="_accountsMenuGrid_"
Nicolas Jager's avatar
Nicolas Jager committed
502
                  Grid.Row="0"
Nicolas Jager's avatar
Nicolas Jager committed
503
                  Visibility="Collapsed"
atraczyk's avatar
atraczyk committed
504
                  Background="#3bc1d3">
Nicolas Jager's avatar
Nicolas Jager committed
505
506
507
508
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="30"/>
                </Grid.RowDefinitions>
atraczyk's avatar
atraczyk committed
509
510
511
512
                <ScrollViewer x:Name="_accountsListScrollView_"
                              ScrollViewer.VerticalScrollBarVisibility="Auto"
                              ScrollViewer.VerticalScrollMode="Enabled">
                    <ListBox x:Name="_accountsList_"
Nicolas Jager's avatar
Nicolas Jager committed
513
                         Grid.Row="0"
514
                         SelectionChanged="_accountList__SelectionChanged"
Nicolas Jager's avatar
Nicolas Jager committed
515
516
517
                         Width="320"
                         ItemContainerStyle="{StaticResource contactsListBoxStyle}"
                         Background="#FFE4F1F9"
Nicolas Jager's avatar
Nicolas Jager committed
518
                         ItemTemplate="{StaticResource AccountListItemsTemplate}"/>
atraczyk's avatar
atraczyk committed
519
                </ScrollViewer>
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
                <StackPanel Orientation="Horizontal"
                            Grid.Row="1">
                    <!--Style="{StaticResource ButtonStyle6}"-->
                    <Button x:Name="_addAccountBtn_"
                            VerticalAlignment="Center"
                            HorizontalAlignment="Center"
                            Content="&#xE948;"
                            Click="_addAccountBtn__Click"
                            Style="{StaticResource ButtonStyle5}"/>
                    <!--Style="{StaticResource ButtonStyle6}"-->
                    <Button x:Name="_linkThisDeviceBtn_"
                            VerticalAlignment="Center"
                            HorizontalAlignment="Center"
                            Content="&#xEBD2;"
                            Click="_linkThisDeviceBtn__Click"
                            Style="{StaticResource ButtonStyle5}"/>
                </StackPanel>
Nicolas Jager's avatar
Nicolas Jager committed
537
            </Grid>
Nicolas Jager's avatar
Nicolas Jager committed
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
            <!-- account edition menu. -->
            <Grid x:Name="_accountEditionGrid_"
                  Grid.Row="0"
                  Visibility="Collapsed"
                  Background="#3bc1d3">
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="30"/>
                </Grid.RowDefinitions>
                <ScrollViewer x:Name="_scrollViewerEditionMenu_"
                              Grid.Row="0">
                    <StackPanel Orientation="Vertical"
                                Padding="10,0"
                                Grid.Row="0"
                                Background="#FFE4F1F9">
                        <!-- alias sub menu. -->
                        <StackPanel Orientation="Horizontal"
                                    Margin="0,20">
                            <TextBlock Style="{StaticResource TextSegoeStyle-20pt-black}"
                                       Margin="0,0,10,0"
                                       Text="&#xE8EC;"/>
                            <TextBlock Text="Alias"/>
                        </StackPanel>
                        <Grid Margin="10,0,10,10">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="25"/>
                            </Grid.ColumnDefinitions>
                            <TextBox  x:Name="_accountAliasTextBoxEdition_"
                                      Grid.Column="0"
                                      TextChanged="_accountAliasTextBoxEdition__TextChanged"
                                      PlaceholderText="Enter alias"/>
                            <TextBlock x:Name="_accountAliasValidEdition_"
                                               Grid.Column="1"
                                               Padding="10,0"
                                               Style="{StaticResource TextSegoeStyle-20pt-green}"
                                               Visibility="Collapsed"
                                               Text="&#xE10B;"/>
                            <TextBlock x:Name="_accountAliasInvalidEdition_"
                                               Grid.Column="1"
                                               Padding="10,0"
                                               Style="{StaticResource TextSegoeStyle-20pt-red}"
                                               Text="&#xE10A;"/>
                        </Grid>
                        <!-- edition sub menu. -->
                        <StackPanel x:Name="_ringStackEdition_">
                            <!-- register account on blockachain -->
                            <StackPanel Orientation="Horizontal"
                                        Margin="0,20">
                                <TextBlock Style="{StaticResource TextSegoeStyle-20pt-black}"
                                           Margin="0,0,10,0"
                                           Text="&#xE167;"/>
                                <TextBlock Text="Register public username"/>
                            </StackPanel>
                            <ToggleSwitch x:Name="_RegisterStateEdition_"
                                      IsOn="True"
                                      Toggled="_RegisterStateEdition__Toggled"
                                      Margin="0,10"/>
                            <TextBlock x:Name="_whatWilHappenEdition_"
                                       Margin="0,10,0,0"
                                       Style="{StaticResource BodyTextBlockStyle}"
                                       Text="peoples will find you with your username"/>
                            <HyperlinkButton Content="Learn more"
                                             Margin="0,0,0,10"
                                             NavigateUri="http://ring.cx"/>
                            <Grid Margin="10">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="25"/>
                                </Grid.ColumnDefinitions>
                                <TextBox x:Name="_usernameTextBoxEdition_"
                                         Grid.Column="0"
                                         PlaceholderText="Enter your full name"
                                         KeyUp="_usernameTextBoxEdition__KeyUp"/>
                                <TextBlock x:Name="_usernameValidEdition_"
                                                   Grid.Column="1"
                                                   Padding="10,0"
                                                   Style="{StaticResource TextSegoeStyle-20pt-green}"
                                                   Visibility="Collapsed"
                                                   Text="&#xE10B;"/>
                                <TextBlock x:Name="_usernameInvalidEdition_"
                                                   Grid.Column="1"
                                                   Padding="10,0"
                                                   Style="{StaticResource TextSegoeStyle-20pt-red}"
                                                   Text="&#xE10A;"/>
                            </Grid>
                            <Button x:Name="_registerOnBlockchainEdition_"
                                Content="register"
                                Visibility="Collapsed"
                                Click="_registerOnBlockchainEdition__Click"/>
                            <StackPanel Orientation="Horizontal" Margin="10">
                                <TextBlock Style="{StaticResource TextSegoeStyle-20pt-black}"
                                       Text="&#xE15E;"/>
                                <TextBlock Text="UPnP" Margin="10"/>
                            </StackPanel>
                            <ToggleSwitch x:Name="_upnpState_"
                                      Margin="20,10"/>
                        </StackPanel>
                        <!-- SIP parameters. -->
                        <StackPanel x:Name="_sipAccountStackEdition_"
                                Visibility="Collapsed">
                            <StackPanel Orientation="Horizontal"
                                    Margin="10">
                                <TextBlock Style="{StaticResource TextSegoeStyle-20pt-black}"
                                       Text="&#xE717;"/>
                                <TextBlock Text="SIP account parameters"
                                       Margin="10"/>
                            </StackPanel>
                            <TextBox  x:Name="_sipHostnameEdition_"
                                  Margin="10"
                                  PlaceholderText="Enter hostname"/>
                            <TextBox  x:Name="_sipUsernameEditionTextBox_"
                                  Margin="10"
                                  PlaceholderText="Enter username"/>
                            <PasswordBox x:Name="_sipPasswordEdition_"
                                     Margin="10"
                                     PlaceholderText="Enter password"/>
                        </StackPanel>
                        <!-- delete account sub menu. -->
                        <StackPanel Orientation="Horizontal" Margin="10">
                            <TextBlock Style="{StaticResource TextSegoeStyle-20pt-black}"
                                   Text="&#xE74D;"/>
                            <TextBlock Text="Delete account" Margin="10"/>
                        </StackPanel>
                        <ToggleSwitch x:Name="_deleteAccountEdition_"
                                      Toggled="_deleteAccountEdition__Toggled"
                                      Margin="20,10"/>
                        <TextBlock x:Name="_whatWilHappendeleteRingAccountEdition_"
                                   Margin="0,10,0,0"
                                   Style="{StaticResource BodyTextBlockStyle}"
                                   Foreground="Red"
                                   Visibility="Collapsed"
                                   Text="Your account will be deleted from this computer. Other devices are not affected. Your public registration can never be deleted."/>
                        <TextBlock x:Name="_whatWilHappendeleteSipAccountEdition_"
                                   Margin="0,10,0,0"
                                   Style="{StaticResource BodyTextBlockStyle}"
                                   Foreground="Red"
                                   Visibility="Collapsed"
                                   Text="Your account will be deleted from this computer."/>
                        <HyperlinkButton x:Name="_learnMoreDeleteAccountEdition_"
                                         Content="Learn more"
                                         Visibility="Collapsed"
                                         Margin="0,0,0,10"
                                         NavigateUri="http://ring.cx"/>
                    </StackPanel>
                </ScrollViewer>
                <!-- buttons yes/no to accept the modification. -->
                <Grid Grid.Row="1">
                    <StackPanel Orientation="Horizontal"
                                HorizontalAlignment="Center">
                        <Button x:Name="_acceptAccountModification_"
                                Grid.Row="1"
                                VerticalAlignment="Center"
                                HorizontalAlignment="Center"
                                Content="&#xE081;"
                                Click="_acceptAccountModification__Click"
                                Style="{StaticResource ButtonStyle5}"/>
                        <Button x:Name="_cancelAccountModification_"
                                Grid.Row="1"
                                VerticalAlignment="Center"
                                HorizontalAlignment="Center"
                                Content="&#xE106;"
                                Click="_cancelAccountModification__Click"
                                Style="{StaticResource ButtonStyle5}"/>
                    </StackPanel>
                </Grid>
            </Grid>
Nicolas Jager's avatar
Nicolas Jager committed
705
706
            <!-- account creation menu. -->
            <Grid x:Name="_accountCreationMenuGrid_"
Nicolas Jager's avatar
Nicolas Jager committed
707
                  Grid.Row="0"
Nicolas Jager's avatar
Nicolas Jager committed
708
                  Visibility="Collapsed"
atraczyk's avatar
atraczyk committed
709
                  Background="#3bc1d3">
Nicolas Jager's avatar
Nicolas Jager committed
710
711
712
713
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="30"/>
                </Grid.RowDefinitions>
Nicolas Jager's avatar
Nicolas Jager committed
714
                <ScrollViewer Grid.Row="0">
Nicolas Jager's avatar
Nicolas Jager committed
715
716
717
718
719
720
                    <StackPanel Orientation="Vertical"
                                Padding="10,0"
                                Background="#FFE4F1F9">
                        <!-- alias sub menu. -->
                        <StackPanel Orientation="Horizontal"
                                    Margin="0,20">
721
                            <TextBlock Style="{StaticResource TextSegoeStyle-20pt-black}"
Nicolas Jager's avatar
Nicolas Jager committed
722
723
724
                                       Margin="0,0,10,0"
                                       Text="&#xE8EC;"/>
                            <TextBlock Text="Alias"/>
725
                        </StackPanel>
Nicolas Jager's avatar
Nicolas Jager committed
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
                        <Grid Margin="10,0,10,10">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="25"/>
                            </Grid.ColumnDefinitions>
                            <TextBox  x:Name="_accountAliasTextBox_"
                                      Grid.Column="0"
                                      TextChanged="_accountAliasTextBox__TextChanged"
                                      PlaceholderText="Enter alias"/>
                            <TextBlock x:Name="_accountAliasValid_"
                                               Grid.Column="1"
                                               Padding="10,0"
                                               Style="{StaticResource TextSegoeStyle-20pt-green}"
                                               Visibility="Collapsed"
                                               Text="&#xE10B;"/>
                            <TextBlock x:Name="_accountAliasInvalid_"
                                               Grid.Column="1"
                                               Padding="10,0"
                                               Style="{StaticResource TextSegoeStyle-20pt-red}"
                                               Text="&#xE10A;"/>
                        </Grid>

                        <!-- account type chooser -->
                        <StackPanel Orientation="Horizontal"
                                    Margin="0,20">
751
                            <TextBlock Style="{StaticResource TextSegoeStyle-20pt-black}"
Nicolas Jager's avatar
Nicolas Jager committed
752
753
754
                                       Margin="0,0,10,0"
                                       Text="&#xE168;"/>
                            <TextBlock Text="Account type"/>
755
                        </StackPanel>
Nicolas Jager's avatar
Nicolas Jager committed
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
                        <ComboBox x:Name="_accountTypeComboBox_"
                                      SelectedIndex="0"
                                      Margin="10,10,0,0"
                                      SelectionChanged="_accountTypeComboBox__SelectionChanged"
                                      VerticalAlignment="Center"
                                      Width="195">
                            <ComboBoxItem Content="Ring"/>
                            <ComboBoxItem Content="Sip"/>
                        </ComboBox>
                        <!-- RING account. -->
                        <StackPanel x:Name="_ringAccountCreationStack_"
                                    Margin="0,20"
                                    Visibility="Visible">
                            <!-- register account on blockachain -->
                            <StackPanel Orientation="Horizontal"
                                        Margin="0,20">
                                <TextBlock Style="{StaticResource TextSegoeStyle-20pt-black}"
                                           Margin="0,0,10,0"
                                           Text="&#xE167;"/>
                                <TextBlock Text="Register public username"/>
                            </StackPanel>
                            <ToggleSwitch x:Name="_RegisterState_"
778
                                      IsOn="True"
Nicolas Jager's avatar
Nicolas Jager committed
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
                                      Toggled="_RegisterState__Toggled"
                                      Margin="0,10"/>
                            <TextBlock x:Name="_whatWilHappen_"
                                       Margin="0,10,0,0"
                                       Style="{StaticResource BodyTextBlockStyle}"
                                       Text="peoples will find you with your username"/>
                            <HyperlinkButton Content="Learn more"
                                             Margin="0,0,0,10"
                                             NavigateUri="http://ring.cx"/>
                            <Grid Margin="10">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="25"/>
                                </Grid.ColumnDefinitions>
                                <TextBox x:Name="_usernameTextBox_"
                                         Grid.Column="0"
                                         PlaceholderText="Enter your full name"
                                         KeyUp="_usernameTextBox__KeyUp"
                                                 />
                                <TextBlock x:Name="_usernameValid_"
                                                   Grid.Column="1"
                                                   Padding="10,0"
                                                   Style="{StaticResource TextSegoeStyle-20pt-green}"
                                                   Visibility="Collapsed"
                                                   Text="&#xE10B;"/>
                                <TextBlock x:Name="_usernameInvalid_"
                                                   Grid.Column="1"
                                                   Padding="10,0"
                                                   Style="{StaticResource TextSegoeStyle-20pt-red}"
                                                   Text="&#xE10A;"/>
                            </Grid>
                            <!-- password sub menu. -->
                            <StackPanel Orientation="Horizontal"
                                        Margin="0,20">
                                <TextBlock Style="{StaticResource TextSegoeStyle-20pt-black}"
                                        Margin="0,0,10,0"
                                       Text="&#xE8D7;"/>
Nicolas Jager's avatar
Nicolas Jager committed
816
                                <TextBlock Text="Password"/>
Nicolas Jager's avatar
Nicolas Jager committed
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
                            </StackPanel>
                            <Grid Margin="10">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="25"/>
                                </Grid.ColumnDefinitions>
                                <PasswordBox x:Name="_ringPasswordBoxAccountCreation_"
                                             Grid.Column="0"
                                             PasswordChanged="_passwordBoxAccountCreationCheck__PasswordChanged"
                                             PlaceholderText="Enter password"/>
                                <TextBlock x:Name="_passwordValid_"
                                           Grid.Column="1"
                                           Padding="10,0"
                                           Style="{StaticResource TextSegoeStyle-20pt-green}"
                                           Visibility="Collapsed"
                                           Text="&#xE10B;"/>
                                <TextBlock x:Name="_passwordInvalid_"
                                           Grid.Column="1"
                                           Padding="10,0"
                                           Style="{StaticResource TextSegoeStyle-20pt-red}"
                                           Text="&#xE10A;"/>
                            </Grid>
                            <Grid Margin="10">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="25"/>
                                </Grid.ColumnDefinitions>
                                <PasswordBox x:Name="_ringPasswordBoxAccountCreationCheck_"
                                             Grid.Column="0"
                                             PasswordChanged="_passwordBoxAccountCreationCheck__PasswordChanged"
                                             PlaceholderText="Repeat password"/>
                                <TextBlock x:Name="_passwordCheckValid_"
                                           Grid.Column="1"
                                           Padding="10,0"
                                           Style="{StaticResource TextSegoeStyle-20pt-green}"
                                           Visibility="Collapsed"
                                           Text="&#xE10B;"/>
                                <TextBlock x:Name="_passwordCheckInvalid_"
                                           Grid.Column="1"
                                           Padding="10,0"
                                           Style="{StaticResource TextSegoeStyle-20pt-red}"
                                           Text="&#xE10A;"/>
                            </Grid>
                            <!-- upnp sub menu. -->
                            <StackPanel Orientation="Horizontal"
                                        Margin="0,20">
                                <TextBlock Style="{StaticResource TextSegoeStyle-20pt-black}"
                                            Margin="0,0,10,0"
                                           Text="&#xE15E;"/>
                                <TextBlock Text="UPnP"/>
                            </StackPanel>
                            <ToggleSwitch x:Name="_upnpStateAccountCreation_"
                                          IsOn="True"
                                          Margin="0,10"/>
                        </StackPanel>
                        <!-- SIP account. -->
                        <StackPanel x:Name="_sipAccountCreationStack_"
                                    Visibility="Collapsed">
                            <StackPanel Orientation="Horizontal"
                                        Margin="10">
                                <TextBlock Style="{StaticResource TextSegoeStyle-20pt-black}"
                                           Text="&#xE717;"/>
                                <TextBlock Text="SIP account parameters"
                                           Margin="10"/>
                            </StackPanel>
                            <TextBox  x:Name="_sipHostnameTextBox_"
                                      Margin="10"
                                      PlaceholderText="Enter hostname"/>
                            <TextBox  x:Name="_sipUsernameTextBox_"
                                      Margin="10"
                                      PlaceholderText="Enter username"/>
                            <PasswordBox x:Name="_sipPasswordBoxAccountCreation_"
                                         Margin="10"
                                         PlaceholderText="Enter password"/>
891
                        </StackPanel>
Nicolas Jager's avatar
Nicolas Jager committed
892
                    </StackPanel>
Nicolas Jager's avatar
Nicolas Jager committed
893
894
                </ScrollViewer>

Nicolas Jager's avatar
Nicolas Jager committed
895
896
897
898
899
900
901
902
903
904
                <!-- buttons yes/no to create the new account. -->
                <Grid Grid.Row="1">
                    <StackPanel Orientation="Horizontal"
                                HorizontalAlignment="Center">
                        <Button x:Name="_createAccountYes_"
                                Grid.Row="1"
                                VerticalAlignment="Center"
                                HorizontalAlignment="Center"
                                Content="&#xE081;"
                                Click="_createAccountYes__Click"
atraczyk's avatar
atraczyk committed
905
                                Style="{StaticResource ButtonStyle5}"/>
Nicolas Jager's avatar
Nicolas Jager committed
906
907
908
909
910
911
                        <Button x:Name="_createAccountNo_"
                                Grid.Row="1"
                                VerticalAlignment="Center"
                                HorizontalAlignment="Center"
                                Content="&#xE106;"
                                Click="_createAccountNo__Click"
atraczyk's avatar
atraczyk committed
912
                                Style="{StaticResource ButtonStyle5}"/>
Nicolas Jager's avatar
Nicolas Jager committed
913
914
915
                    </StackPanel>
                </Grid>
            </Grid>
916
917
918
            <!-- add account menu. -->
            <Grid x:Name="_accountAddMenuGrid_"
                  Visibility="Collapsed"
Nicolas Jager's avatar
Nicolas Jager committed
919
                  Grid.Row="0"
atraczyk's avatar
atraczyk committed
920
                  Background="#3bc1d3">
921
                <Grid.RowDefinitions>
922
                    <RowDefinition Height="*"/>
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
                    <RowDefinition Height="30"/>
                </Grid.RowDefinitions>
                <StackPanel Orientation="Horizontal"
                            Background="#FFE4F1F9"
                            Padding="10"
                                    Grid.Row="0">
                    <Button x:Name="_step1button_"
                            Click="_step1button__Click"
                            Content="Step 1"/>
                    <TextBlock Text=">"/>
                    <Button x:Name="_step2button_"
                            Click="_step2button__Click"
                            Content="Step 2"/>
                </StackPanel>
                <!-- step 1. -->
                <StackPanel x:Name="_step1Menu_"
                                    Background="#FFE4F1F9"
                                    Padding="10"
941
                                    Grid.Row="0">
942
943
944
945
946
947
948
949
950
951
952
                    <TextBlock Text="To link this device to a Ring account, you'll first need to generate a PIN from Ring on a device hosting the account."
                                        TextWrapping="Wrap"
                                        TextAlignment="Justify"/>
                    <HyperlinkButton Content="Learn more"
                                                Margin="0,0,0,10"
                                                NavigateUri="http://ring.cx"/>
                </StackPanel>
                <!-- step 2. -->
                <StackPanel x:Name="_step2Menu_"
                                    Background="#FFE4F1F9"
                                    Visibility="Collapsed"
953
                                    Grid.Row="0">
954
955
956
957
958
959
960
961
962
963
964
965
966
                    <TextBox  x:Name="_PINTextBox_"
                                    Margin="10"
                                    GotFocus="_PINTextBox__GotFocus"
                                    PlaceholderText="Enter PIN"/>
                    <PasswordBox x:Name="_ArchivePassword_"
                                    Margin="10"
                                    PlaceholderText="Enter your password"/>
                    <TextBlock x:Name="_response_"
                               Foreground="Red"
                               HorizontalAlignment="Center"
                               Text=""/>
                </StackPanel>
                <!-- buttons next step and yes/no to add the account. -->
967
                <Grid Grid.Row="1">
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
                    <StackPanel Orientation="Horizontal"
                                        Padding="10,0"
                                        HorizontalAlignment="Center">
                        <Button x:Name="_nextstep_"
                                        VerticalAlignment="Center"
                                        HorizontalAlignment="Center"
                                        Content="&#xE081;"
                                        Click="_step2button__Click"
                                        Style="{StaticResource ButtonStyle2}"/>
                        <Button x:Name="_addAccountYes_"
                                        VerticalAlignment="Center"
                                        HorizontalAlignment="Center"
                                        Visibility="Collapsed"
                                        Content="&#xE081;"
                                        Click="_addAccountYes__Click"
                                        Style="{StaticResource ButtonStyle5}"/>
                        <Button x:Name="_addAccountNo_"
                                        VerticalAlignment="Center"
                                        HorizontalAlignment="Center"
                                        Visibility="Collapsed"
                                        Content="&#xE106;"
                                        Click="_addAccountNo__Click"
                                        Style="{StaticResource ButtonStyle5}"/>
                    </StackPanel>
                </Grid>
            </Grid>
Nicolas Jager's avatar
Nicolas Jager committed
994
995
            <!-- share menu. -->
            <Grid x:Name="_shareMenuGrid_"
Nicolas Jager's avatar
Nicolas Jager committed
996
                  Grid.Row="0"
Nicolas Jager's avatar
Nicolas Jager committed
997
                  Visibility="Collapsed"
atraczyk's avatar
atraczyk committed
998
                  Background="#3bc1d3">
Nicolas Jager's avatar
Nicolas Jager committed
999
1000
1001
1002
1003
1004
1005
1006
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="30"/>
                </Grid.RowDefinitions>
                <Grid Background="#FFE4F1F9">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="auto"/>
                        <RowDefinition Height="auto"/>
Nicolas Jager's avatar
Nicolas Jager committed
1007
                        <RowDefinition Height="*"/>
Nicolas Jager's avatar
Nicolas Jager committed
1008
                    </Grid.RowDefinitions>
1009
1010
                    <Grid Background="white"
                          Margin="10"
atraczyk's avatar
atraczyk committed
1011
                          MaxHeight="140"
Nicolas Jager's avatar
Nicolas Jager committed
1012
                          Grid.Row="0"
1013
1014
1015
                          MaxWidth="140"
                          Padding="5">
                        <Image x:Name="_selectedAccountQrCode_"
Nicolas Jager's avatar
Nicolas Jager committed
1016
1017
1018
                           Width="200"
                           Margin="5"
                           Grid.Row="0"
1019
                           Stretch="None"
Nicolas Jager's avatar
Nicolas Jager committed
1020
                           Height="200"/>
1021
1022
                    </Grid>
                    <TextBlock x:Name="_ringId_"
Nicolas Jager's avatar
Nicolas Jager committed
1023
                               Padding="1"
1024
1025
                               Style="{StaticResource TextStyle4}"
                               Text=""
Nicolas Jager's avatar
Nicolas Jager committed
1026
                               Grid.Row="1"
1027
                               IsTextSelectionEnabled="True"
Nicolas Jager's avatar
Nicolas Jager committed
1028
1029
                               HorizontalAlignment="Center"/>
                </Grid>
1030
1031
1032
1033
1034
1035
1036
                <Button x:Name="_shareMenuDone_"
                        Grid.Row="1"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Content="&#xE081;"
                        Click="_shareMenuDone__Click"
                        Style="{StaticResource ButtonStyle6}"/>
Nicolas Jager's avatar
Nicolas Jager committed
1037
            </Grid>
1038
1039
            <!-- devices menu. -->
            <Grid x:Name="_devicesMenuGrid_"
Nicolas Jager's avatar
Nicolas Jager committed
1040
                  Grid.Row="0"
1041
                  Visibility="Collapsed"
atraczyk's avatar
atraczyk committed
1042
                  Background="#3bc1d3">
1043
1044
1045
1046
1047
1048
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="30"/>
                </Grid.RowDefinitions>
                <Grid Background="#FFE4F1F9">
                    <Grid.RowDefinitions>
1049
                        <RowDefinition Height="auto"/>
Nicolas Jager's avatar
Nicolas Jager committed
1050
                        <RowDefinition Height="auto"/>
1051
1052
1053
1054
1055
                        <RowDefinition Height="auto"/>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="auto"/>
                        <RowDefinition Height="auto"/>
                    </Grid.RowDefinitions>
1056
                    <!-- about this device -->
atraczyk's avatar
atraczyk committed
1057
                    <StackPanel Orientation="Horizontal"
1058
1059
                                    Grid.Row="0"
                                    Margin="10,20">
atraczyk's avatar
atraczyk committed
1060
                        <TextBlock Style="{StaticResource TextSegoeStyle-20pt-black}"
1061
1062
                                       Margin="0,0,10,0"
                                       Text="&#xE211;"/>
atraczyk's avatar
atraczyk committed
1063
1064
                        <TextBlock Text="Your device ID"/>
                    </StackPanel>
Nicolas Jager's avatar
Nicolas Jager committed
1065
                    <TextBlock x:Name="_deviceId_"
Nicolas Jager's avatar
Nicolas Jager committed
1066
                               Margin="10"
Nicolas Jager's avatar
Nicolas Jager committed
1067
                               Text="[TEXT_MISSING]"
Nicolas Jager's avatar
Nicolas Jager committed
1068
                               TextTrimming="CharacterEllipsis"
1069
                               FontSize="12"
Nicolas Jager's avatar
Nicolas Jager committed
1070
1071
1072
                               Grid.Row="1"
                               IsTextSelectionEnabled="True"
                               HorizontalAlignment="Center"/>
atraczyk's avatar
atraczyk committed
1073
1074
                    <!-- about linked devices -->
                    <StackPanel Orientation="Horizontal"
1075
1076
                                    Grid.Row="2"
                                    Margin="10,20">
atraczyk's avatar
atraczyk committed
1077
                        <TextBlock Style="{StaticResource TextSegoeStyle-20pt-black}"
1078
1079
                                       Margin="0,0,10,0"
                                       Text="&#xEBD2;"/>
atraczyk's avatar
atraczyk committed
1080
1081
1082
                        <TextBlock Text="other linked devices"/>
                    </StackPanel>
                    <TextBlock x:Name="_waitingDevicesList_"
Nicolas Jager's avatar
Nicolas Jager committed
1083
                               Text="waiting for devices list..."
1084
                               Grid.Row="3"
Nicolas Jager's avatar
Nicolas Jager committed
1085
1086
                               IsTextSelectionEnabled="True"
                               HorizontalAlignment="Center"/>
Nicolas Jager's avatar
Nicolas Jager committed
1087
                    <ListBox x:Name="_devicesIdList_"
Nicolas Jager's avatar
Nicolas Jager committed
1088
                             Visibility="Collapsed"
1089
1090
1091
                             Padding="10,0"
                             Background="#FFE4F1F9"
                             Grid.Row="3"/>
1092
                </Grid>
1093
                <!-- button to add device. -->
1094
1095
1096
1097
1098
1099
1100
1101
                <Button x:Name="_addDevice_"
                        Grid.Row="1"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Content="&#xE948;"
                        Click="_addDevice__Click"
                        Style="{StaticResource ButtonStyle6}"/>
            </Grid>
1102
1103
            <!-- add device (pin generator) menu. -->
            <Grid x:Name="_addingDeviceGrid_"
Nicolas Jager's avatar
Nicolas Jager committed
1104
                  Grid.Row="0"
1105
                  Visibility="Collapsed"
atraczyk's avatar
atraczyk committed
1106
                  Background="#3bc1d3">
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="30"/>
                </Grid.RowDefinitions>
                <Grid Background="#FFE4F1F9">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="auto"/>
                        <RowDefinition Height="auto"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <TextBlock VerticalAlignment="Center"
                                       Text="PIN generator"
                               HorizontalAlignment="Center"
                               Grid.Row="0"
                                       Margin="10,10,0,10"/>
                    <PasswordBox x:Name="_passwordForPinGenerator_"
                                 Margin="10"
                                 Grid.Row="1"
1125
                                 KeyUp="_passwordForPinGenerator__KeyUp"
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
                                 PlaceholderText="Enter your password"/>
                </Grid>
                <!-- buttons yes/no to generate a PIN. -->
                <Grid Grid.Row="1">
                    <StackPanel Orientation="Horizontal"
                                HorizontalAlignment="Center">
                        <Button x:Name="_pinGeneratorYes_"
                                Grid.Row="1"
                                VerticalAlignment="Center"
                                HorizontalAlignment="Center"
                                Content="&#xE081;"
                                Click="_pinGeneratorYes__Click"
                                Style="{StaticResource ButtonStyle5}"/>
                        <Button x:Name="_pinGeneratorNo_"
                                Grid.Row="1"
                                VerticalAlignment="Center"
                                HorizontalAlignment="Center"
                                Content="&#xE106;"
                                Click="_pinGeneratorNo__Click"
                                Style="{StaticResource ButtonStyle5}"/>
                    </StackPanel>
                </Grid>
            </Grid>
            <!-- waiting for a PIN. -->
            <Grid x:Name="_waitingForPin_"
Nicolas Jager's avatar
Nicolas Jager committed
1151
                Grid.Row="0"
1152
                Visibility="Collapsed"
atraczyk's avatar
atraczyk committed
1153
                Background="#3bc1d3">
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="30"/>
                </Grid.RowDefinitions>
                <Grid Background="#FFE4F1F9">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="auto"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <TextBlock x:Name="_waitingAndResult_"
                               VerticalAlignment="Center"
                               Text="Exporting account on the Ring..."
                               HorizontalAlignment="Center"
                               Grid.Row="0"
                               Margin="10,10,0,10"/>
                </Grid>
Nicolas Jager's avatar
Nicolas Jager committed
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
                <Grid Grid.Row="1">
                    <StackPanel Orientation="Horizontal"
                                HorizontalAlignment="Center">
                        <Button x:Name="_closePin_"
                                Grid.Row="1"
                                VerticalAlignment="Center"
                                HorizontalAlignment="Center"
                                Content="&#xE081;"
                                Click="_closePin__Click"
                                Style="{StaticResource ButtonStyle5}"/>
                    </StackPanel>
                </Grid>
1183
            </Grid>
1184
            <!-- contacts + calls => smartpanelitems. -->
Nicolas Jager's avatar
Nicolas Jager committed
1185
1186
1187
1188
1189
            <Grid x:Name="_smartGrid_"
                  Grid.Row="0">
                <Grid.RowDefinitions>
                    <RowDefinition x:Name="_rowRingTxtBx_"
                                   Height="40"/>
1190
                    <RowDefinition Height="auto"/>
Nicolas Jager's avatar
Nicolas Jager committed
1191
1192
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
atraczyk's avatar
atraczyk committed
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
                    <Border     x:Name="BackgroundElement"
                                Grid.Column="0"
                                Background="White"
                                Margin="6"
                                Opacity="1"
                                Grid.ColumnSpan="2">
                    </Border>
                    <TextBox    x:Name="_ringTxtBx_"
                                Grid.Column="0"
                                VerticalAlignment="Center"
                                BorderThickness="0"
                                HorizontalAlignment="Stretch"
                                Padding="4"
                                Margin="6"
                                Foreground="Black"
                                Background="White"
                                TextWrapping="Wrap"
                                KeyUp="_ringTxtBx__KeyUp"
                                Text="">
                    </TextBox>
                    <Button     x:Name="_addButton_"
                                Background="Transparent"
                                Grid.Column="1"
                                FontFamily="Segoe MDL2 Assets"
atraczyk's avatar
atraczyk committed
1222
                                Foreground="#3bc1d3"
atraczyk's avatar
atraczyk committed
1223
1224
1225
1226
                                Content=" &#xE1E2;"
                                Click="_ringTxtBx__Click"
                                BorderThickness="0"
                                Visibility="Visible"
atraczyk's avatar
atraczyk committed
1227
                                IsTabStop="False"
atraczyk's avatar
atraczyk committed
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
                                FontSize="20"
                                Width="38"
                                Margin="6"
                                Padding="4,4,8,4"
                                VerticalAlignment="Stretch">
                        <Button.RenderTransform>
                            <TranslateTransform X="0"/>
                        </Button.RenderTransform>
                    </Button>
                </Grid>
                <ListBox    x:Name="_smartList_"
                            Grid.Row="2"
1240
                            Background="Transparent"
atraczyk's avatar
atraczyk committed
1241
1242
                            Margin="0"
                            SelectionChanged="_smartList__SelectionChanged"
1243
                            Padding="0"
atraczyk's avatar
atraczyk committed
1244
                            ScrollViewer.HorizontalScrollBarVisibility="Auto"
1245
1246
                            ScrollViewer.HorizontalScrollMode="Disabled"
                            MaxWidth="320"
atraczyk's avatar
atraczyk committed
1247
1248
                            ItemContainerStyle="{StaticResource contactsListBoxStyle}"
                            ItemTemplate="{StaticResource SmartPanelItemsTemplate}"/>
Nicolas Jager's avatar
Nicolas Jager committed
1249
1250
            </Grid>
            <!-- settings. -->
1251
            <Grid x:Name="_settingsMenu_"
Nicolas Jager's avatar
Nicolas Jager committed
1252
                  Grid.Row="0"
atraczyk's avatar
atraczyk committed
1253
1254
                  Visibility="Collapsed"
                  Background="#FFE4F1F9">
1255
1256
1257
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
atraczyk's avatar
atraczyk committed
1258
1259
                <ScrollViewer
                    ScrollViewer.VerticalScrollBarVisibility="Auto">
1260
                    <Grid x:Name="_videoSettings_"
1261
                      Grid.Row="0">
1262
1263
                        <StackPanel Margin="10">
                            <TextBlock Text="Video Device"
1264
                                   Margin="10"/>
1265
                            <ComboBox x:Name="_videoDeviceComboBox_"
1266
1267
                                  Margin="10"
                                  SelectionChanged="_videoDeviceComboBox__SelectionChanged">
1268
1269
1270
                            </ComboBox>
                            <TextBlock Text="Video Resolution" Margin="10"/>
                            <ComboBox x:Name="_videoResolutionComboBox_"
1271
1272
                                  Margin="10"
                                  SelectionChanged="_videoResolutionComboBox__SelectionChanged">
1273
1274
1275
                            </ComboBox>
                            <TextBlock Text="Video Rate" Margin="10"/>
                            <ComboBox x:Name="_videoRateComboBox_"
1276
1277
                                  Margin="10"
                                  SelectionChanged="_videoRateComboBox__SelectionChanged">
1278
1279
1280
1281
                            </ComboBox>
                        </StackPanel>
                    </Grid>
                </ScrollViewer>
Nicolas Jager's avatar
Nicolas Jager committed
1282
1283
            </Grid>
        </Grid>
Nicolas Jager's avatar
Nicolas Jager committed
1284
1285
1286
    </Grid>

</Page>