Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 43e9af9369
Fetching contributors…

Cannot retrieve contributors at this time

file 104 lines (94 sloc) 6.822 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
<UserControl x:Class="Play.Views.SearchView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:Play"
             xmlns:Routing="clr-namespace:ReactiveUI.Routing;assembly=ReactiveUI.Routing"
             xmlns:RxUI="clr-namespace:ReactiveUI.Xaml;assembly=ReactiveUI.Xaml" mc:Ignorable="d" x:Name="theView"
             d:DesignHeight="300" d:DesignWidth="300">

    <Grid DataContext="{Binding Path=ViewModel, ElementName=theView}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <Border BorderBrush="Gray" BorderThickness="0,0,0,1">
             <Grid Background="{DynamicResource HeaderBackgroundBrush}" Grid.Row="1">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" MinHeight="20"/>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" MinHeight="10"/>
                </Grid.RowDefinitions>

                 <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" MinWidth="24"/>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="Auto" MinWidth="24" />
                </Grid.ColumnDefinitions>

                <local:FadeImageButton Command="{Binding GoBack}" Grid.Row="1" Margin="8,0,4,0">
                    <local:FadeImageButton.Content>
                        <Viewbox Width="16" Height="16">
                            <Canvas Width="72.011" Height="45.023" Background="#01888888">
                                <Canvas>
                                    <Path Fill="{DynamicResource ButtonNormalForeground}" Data="F1 M 0.000,22.510 L 33.444,0.000 L 33.444,13.539 C 33.444,13.539 72.011,16.500 72.011,45.023 C 72.011,45.023 67.132,33.317 48.474,31.098 C 45.421,30.735 40.784,30.378 33.433,30.378 L 33.433,45.020 L 0.000,22.510 Z"/>
                                </Canvas>
                            </Canvas>
                        </Viewbox>
                    </local:FadeImageButton.Content>
                    <local:FadeImageButton.HighlightContent>
                        <Viewbox Width="16" Height="16">
                            <Canvas Width="72.011" Height="45.023" Background="#01888888">
                                <Canvas>
                                    <Path Fill="{DynamicResource HighlightGradientBrush}" Data="F1 M 0.000,22.510 L 33.444,0.000 L 33.444,13.539 C 33.444,13.539 72.011,16.500 72.011,45.023 C 72.011,45.023 67.132,33.317 48.474,31.098 C 45.421,30.735 40.784,30.378 33.433,30.378 L 33.433,45.020 L 0.000,22.510 Z"/>
                                </Canvas>
                            </Canvas>
                        </Viewbox>
                    </local:FadeImageButton.HighlightContent>
                </local:FadeImageButton>

                <TextBox Grid.Row="1" Grid.Column="1" Margin="8,0,8,0" Style="{DynamicResource SearchTextBox}" Text="{Binding SearchQuery, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />

                 <RxUI:TransitioningContentControl Grid.Column="2" Grid.Row="1" VerticalAlignment="Center" Margin="0,2,0,0" Visibility="{Binding SearchBusySpinner}">
                    <Viewbox Width="16" Height="16">
                        <Canvas Width="71.871" Height="66.433">
                            <Canvas>
                                <!-- Layer 1/<Group>/<Compound Path> -->
                                <Path Fill="{DynamicResource ButtonNormalForeground}" Data="F1 M 53.949,33.678 C 51.186,33.678 48.945,31.438 48.945,28.674 C 48.945,25.911 51.186,23.670 53.949,23.670 C 56.713,23.670 58.953,25.911 58.953,28.674 C 58.953,31.438 56.713,33.678 53.949,33.678 Z M 36.181,33.678 C 33.417,33.678 31.177,31.438 31.177,28.674 C 31.177,25.911 33.417,23.670 36.181,23.670 C 38.944,23.670 41.185,25.911 41.185,28.674 C 41.185,31.438 38.944,33.678 36.181,33.678 Z M 18.412,33.678 C 15.648,33.678 13.408,31.438 13.408,28.674 C 13.408,25.911 15.648,23.670 18.412,23.670 C 21.176,23.670 23.416,25.911 23.416,28.674 C 23.416,31.438 21.176,33.678 18.412,33.678 Z M 71.714,24.744 C 69.872,9.024 52.362,-1.926 32.601,0.284 C 12.842,2.494 -1.685,17.027 0.157,32.746 C 1.131,41.056 6.487,48.033 14.237,52.437 C 14.618,55.918 13.337,60.356 7.310,64.901 C 4.847,66.757 17.286,69.152 28.895,57.161 C 32.229,57.568 35.712,57.603 39.271,57.205 C 59.030,54.995 73.556,40.462 71.714,24.744 Z"/>
                            </Canvas>
                        </Canvas>
                    </Viewbox>
                </RxUI:TransitioningContentControl>
            </Grid>
        </Border>

        <Grid Grid.Row="1" MinHeight="120" Background="#FFF3F3F3">
            <ScrollViewer VerticalScrollBarVisibility="Hidden" HorizontalScrollBarVisibility="Hidden" >
                <ItemsControl ItemsSource="{Binding SearchResults}">
                    <ItemsControl.ItemTemplate>
                        <DataTemplate>
                            <Routing:ViewModelViewHost ViewModel="{Binding}" Width="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType={x:Type ScrollViewer}}}"
                                                       HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch"/>
                        </DataTemplate>
                    </ItemsControl.ItemTemplate>
                </ItemsControl>
            </ScrollViewer>

            <Border Height="18" VerticalAlignment="Top" Margin="0,-1,0,0">
                <Border.Effect>
                    <BlurEffect Radius="8"/>
                </Border.Effect>
                <Border.Background>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="#E0F3F3F3" Offset="0.53"/>
                        <GradientStop Color="#00F3F3F3" Offset="1"/>
                    </LinearGradientBrush>
                </Border.Background>
            </Border>

            <Border Height="50" VerticalAlignment="Bottom" >
                <Border.Effect>
                    <BlurEffect Radius="8"/>
                </Border.Effect>
                <Border.Background>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="#00F3F3F3" Offset="0.53"/>
                        <GradientStop Color="#E0F3F3F3" Offset="1"/>
                    </LinearGradientBrush>
                </Border.Background>
            </Border>
        </Grid>

    </Grid>
</UserControl>
Something went wrong with that request. Please try again.