Subversion Repository Public Repository

Nextrek

Diff Revisions 659 vs 660 for /Android/SmartCharging/SmartCharging_WP/SmartCharging/MapPage.xaml

Diff revisions: vs.
  @@ -12,7 +12,23 @@
12 12
13 13 <Page.Resources>
14 14 <converter:VisibilityConverter x:Key="visibilityConverter" ></converter:VisibilityConverter>
15 -
15 + <Flyout x:Key="ImagePreviewFlyout" Placement="Left" x:Name="ImagePreviewFlyout" >
16 + <!-- The DataContext of the Image that the flyout is attached to must be the Image's Source. -->
17 + <Image Source="{Binding }" MaxHeight="400" MaxWidth="400" Stretch="Uniform" VerticalAlignment="Center" HorizontalAlignment="Center" Tapped="Image_Flyout_Tapped" />
18 + <Flyout.FlyoutPresenterStyle>
19 + <Style TargetType="FlyoutPresenter">
20 + <Setter Property="ScrollViewer.ZoomMode" Value="Disabled"/>
21 + <Setter Property="Background" Value="Black"/>
22 + <Setter Property="BorderBrush" Value="Gray"/>
23 + <Setter Property="BorderThickness" Value="0"/>
24 + <Setter Property="MinHeight" Value="720"/>
25 + <Setter Property="MinWidth" Value="300"/>
26 + <Setter Property="VerticalAlignment" Value="Stretch"/>
27 + <Setter Property="HorizontalAlignment" Value="Stretch"/>
28 + </Style>
29 + </Flyout.FlyoutPresenterStyle>
30 + </Flyout>
31 +
16 32 </Page.Resources>
17 33 <ScrollViewer ScrollViewer.VerticalScrollBarVisibility="Visible" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
18 34 <Grid x:Name="LayoutRoot" Background="White">
  @@ -89,10 +105,10 @@
89 105
90 106 <StackPanel Grid.Row="0" Grid.RowSpan="2" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0" >
91 107 <TextBlock Text="{Binding Name}" Foreground="#FF666666" FontSize="20" FontWeight="SemiBold" Padding="2" TextWrapping="WrapWholeWords"></TextBlock>
92 - <TextBlock Text="{Binding TypeLabel}" Foreground="#FF666666" FontSize="15" Padding="2" IsHoldingEnabled="False" IsRightTapEnabled="False" IsHitTestVisible="False" IsTapEnabled="False" IsDoubleTapEnabled="False" IsColorFontEnabled="False"></TextBlock>
108 + <TextBlock Text="{Binding Type.Label}" Foreground="#FF666666" FontSize="15" Padding="2" IsHoldingEnabled="False" IsRightTapEnabled="False" IsHitTestVisible="False" IsTapEnabled="False" IsDoubleTapEnabled="False" IsColorFontEnabled="False"></TextBlock>
93 109 </StackPanel>
94 110
95 - <local:ChargeRating Grid.Row="2" Grid.ColumnSpan="1" Grid.Column="1" ></local:ChargeRating>
111 + <local:ChargeRating Grid.Row="2" Grid.ColumnSpan="1" Grid.Column="1" Value="{Binding Rating}" ></local:ChargeRating>
96 112
97 113
98 114 </Grid>
  @@ -109,7 +125,7 @@
109 125 </ListView.ItemsPanel>
110 126 <ListView.ItemTemplate>
111 127 <DataTemplate>
112 - <Image Source="{Binding }" Width="200" Margin="7"></Image>
128 + <Image Source="{Binding }" Width="200" Margin="7" FlyoutBase.AttachedFlyout="{StaticResource ImagePreviewFlyout}" Tapped="Image_Tapped" ></Image>
113 129 </DataTemplate>
114 130 </ListView.ItemTemplate>
115 131
  @@ -119,12 +135,12 @@
119 135 <ListView x:Name="ReviewList" ItemsSource="{Binding ReviewList}" Grid.Row="4" HorizontalAlignment="Stretch">
120 136 <ListView.ItemsPanel>
121 137 <ItemsPanelTemplate>
122 - <StackPanel Orientation="Vertical"></StackPanel>
138 + <StackPanel Orientation="Vertical" HorizontalAlignment="Stretch"></StackPanel>
123 139 </ItemsPanelTemplate>
124 140 </ListView.ItemsPanel>
125 141 <ListView.ItemTemplate>
126 142 <DataTemplate>
127 - <Grid Margin="40,30" >
143 + <Grid Margin="40,30" MinWidth="320">
128 144 <Grid.RowDefinitions>
129 145 <RowDefinition Height="Auto"></RowDefinition>
130 146 <RowDefinition Height="Auto"></RowDefinition>
  @@ -134,23 +150,27 @@
134 150 <ColumnDefinition Width="4*"></ColumnDefinition>
135 151 </Grid.ColumnDefinitions>
136 152 <TextBlock Text="{Binding ReviewerName}" Foreground="#FF666666" FontSize="20" Padding="2" TextWrapping="WrapWholeWords" Grid.Row="0" Grid.Column="0"></TextBlock>
137 - <local:ChargeRating Grid.Row="0" Grid.Column="1" ></local:ChargeRating>
153 + <local:ChargeRating Grid.Row="0" Grid.Column="1" HorizontalAlignment="Right" HorizontalContentAlignment="Right" Value="{Binding Rating}"></local:ChargeRating>
138 154 <TextBlock TextWrapping="WrapWholeWords" Text="{Binding Description}" Grid.Row="1" Grid.ColumnSpan="2" Foreground="#FF666666" FontSize="16" Margin="0,15,0,0"></TextBlock>
139 155
140 156 </Grid>
141 157 </DataTemplate>
142 158 </ListView.ItemTemplate>
143 159 </ListView>
160 +
161 +
144 162 </Grid>
145 163
146 164
147 165 </Border>
148 166
149 167
168 + <ProgressRing x:Name="Loader" IsActive="True" Grid.RowSpan="100" Grid.ColumnSpan="100" Background="#99000000" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" IsHitTestVisible="True" Visibility="Collapsed" Foreground="#FF2CDAFF" />
150 169
151 170 </Grid>
152 171 </ScrollViewer>
153 172
173 +
154 174
155 175
156 176