This repository has been archived by the owner on May 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathGalleryPage.navbar.searchPanel.ux
39 lines (39 loc) · 2 KB
/
GalleryPage.navbar.searchPanel.ux
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
<Panel ux:Name="searchPanel" Height="26">
<Translation ux:Name="searchTranslation1" X="1" RelativeTo="ParentSize" />
<Translation ux:Name="searchTranslation2" X="-26" />
<StackPanel Orientation="Horizontal">
<Image ux:Name="searchIcon" File="Assets/Images/SearchIcon.png" Color="#fff" Width="26" HitTestMode="LocalBounds">
<WhilePressed>
<Change searchIcon.Opacity="0.5" Duration="0.1" />
</WhilePressed>
<Clicked>
<NavigateTo Target="galleryPanel" />
<Toggle Target="isSearching" />
</Clicked>
</Image>
<TextInput ux:Name="searchInput" Y="-1" ActionStyle="Search" FontSize="22" Font="Regular" Value="{searchText}" PlaceholderText="Enter search text" CaretColor="#ff0000" TextColor="#fff" PlaceholderColor="#888">
<TextInputActionTriggered>
<Set isSearching.Value="false" />
<Callback Handler="{Search}" />
</TextInputActionTriggered>
<WhileNotFocused>
<Set isSearching.Value="false" />
</WhileNotFocused>
</TextInput>
<ux:Include File="DropShadow.inc.ux" />
</StackPanel>
<WhileTrue ux:Name="isSearching">
<!-- Cover panel -->
<Change IsCoverPanelVisible.Value="true" Duration="0" Delay="0" DurationBack="0" DelayBack="0" />
<Change coverPanel.IsEnabled="true" Duration="0" Delay="0" DurationBack="0" DelayBack="0" />
<!-- Enable/disable navigation -->
<Set isEdgeNavigationDisabled.Value="true" AtProgress="1" Direction="Forward" />
<Set isEdgeNavigationDisabled.Value="false" AtProgress="1" Direction="Backward" />
<!-- Animate & focus input -->
<Change searchTranslation1.X="0" Duration="0.4" Easing="BackOut" EasingBack="BackIn" />
<Change searchTranslation2.X="0" Duration="0.4" Easing="BackOut" EasingBack="BackIn" />
<Change navbarDock.Opacity="0" Duration="0.2" DurationBack="0.4" Easing="CircularInOut" />
<GiveFocus TargetNode="searchInput" Direction="Forward" AtProgress="1" />
<ReleaseFocus TargetNode="searchInput" Direction="Backward" AtProgress="0" />
</WhileTrue>
</Panel>