<Compile Include="TVMediaHub.cs" />
<Compile Include="TVMediaHub.Tizen.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Utils\NinePatch.xaml.cs">
+ <DependentUpon>NinePatch.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Utils\NinePatchImageRenderer.cs" />
<Compile Include="ViewModels\MediaHubMainPageViewModel.cs" />
<Compile Include="Views\FooterNormalStatus.xaml.cs">
<DependentUpon>FooterNormalStatus.xaml</DependentUpon>
<Compile Include="Views\GalleryImageContent.xaml.cs">
<DependentUpon>GalleryImageContent.xaml</DependentUpon>
</Compile>
+ <Compile Include="Views\ImageViewer.xaml.cs">
+ <DependentUpon>ImageViewer.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\ImageViewerZoom.xaml.cs">
+ <DependentUpon>ImageViewerZoom.xaml</DependentUpon>
+ </Compile>
+
<Compile Include="Views\MediaHubMainPage.xaml.cs">
<DependentUpon>MediaHubMainPage.xaml</DependentUpon>
</Compile>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
+ <Content Include="res\thumbnail_test.jpg" />
+ <Content Include="res\btn_tizen_dropdown_line_dimmed.9.png" />
+ <Content Include="res\btn_tizen_dropdown_line_normal.9.png" />
<Content Include="res\btn_tizen_list_thumbnail_play.png" />
+ <Content Include="res\btn_tizen_option_menu_bg_focused.9.png" />
+ <Content Include="res\btn_tizen_option_menu_bg_normal.9.png" />
+ <Content Include="res\btn_tizen_option_menu_bg_selected.9.png" />
+ <Content Include="res\btn_tizen_viewer_control_focused.png" />
+ <Content Include="res\btn_tizen_viewer_control_forward.png" />
+ <Content Include="res\btn_tizen_viewer_control_left.png" />
+ <Content Include="res\btn_tizen_viewer_control_next.png" />
+ <Content Include="res\btn_tizen_viewer_control_option.png" />
+ <Content Include="res\btn_tizen_viewer_control_pause.png" />
+ <Content Include="res\btn_tizen_viewer_control_play.png" />
+ <Content Include="res\btn_tizen_viewer_control_previous.png" />
+ <Content Include="res\btn_tizen_viewer_control_rewind.png" />
+ <Content Include="res\btn_tizen_viewer_control_right.png" />
+ <Content Include="res\btn_tizen_viewer_control_rotate.png" />
+ <Content Include="res\btn_tizen_viewer_control_video.png" />
+ <Content Include="res\btn_tizen_viewer_control_zoom.png" />
+ <Content Include="res\ic_tizen_apps_additional_back.png" />
<Content Include="res\ic_tizen_apps_launcher_pinmark.png" />
+ <Content Include="res\ic_tizen_media_thumbnail_frame_mouse.9.png" />
<Content Include="res\ic_tizen_media_thumbnail_gradient_focused.9.png" />
+ <Content Include="res\ic_tizen_option_box_more_dimmed.png" />
+ <Content Include="res\ic_tizen_option_box_more_normal.png" />
+ <Content Include="res\ic_tizen_option_menu_list_box_check_focused.png" />
+ <Content Include="res\ic_tizen_option_menu_list_box_check_normal.png" />
+ <Content Include="res\ic_tizen_option_menu_list_box_check_selected.png" />
+ <Content Include="res\ic_tizen_play_speed_info.png" />
+ <Content Include="res\ic_tizen_zoom_arrow_down_normal.png" />
+ <Content Include="res\ic_tizen_zoom_arrow_down_selected.png" />
+ <Content Include="res\ic_tizen_zoom_arrow_left_normal.png" />
+ <Content Include="res\ic_tizen_zoom_arrow_left_selected.png" />
+ <Content Include="res\ic_tizen_zoom_arrow_right_normal.png" />
+ <Content Include="res\ic_tizen_zoom_arrow_right_selected.png" />
+ <Content Include="res\ic_tizen_zoom_arrow_up_normal.png" />
+ <Content Include="res\ic_tizen_zoom_arrow_up_selected.png" />
<Content Include="res\img_tizen_dimmed_opacity85.9.png" />
+ <Content Include="res\img_tizen_gradient_topbottom.9.png" />
+ <Content Include="res\img_tizen_media_thumbnail_gradient_focused.9.png" />
+ <Content Include="res\img_tizen_media_thumbnail_gradient_normal.9.png" />
+ <Content Include="res\img_tizen_photozoom_gradient.9.png" />
+ <Content Include="res\img_tizen_viewer_progress01.9.png" />
+ <Content Include="res\img_tizen_viewer_progress02.9.png" />
+ <Content Include="res\img_tizen_zoom_minimap_dimmed.png" />
+ <Content Include="res\img_tizen_zoom_minimap_line.9.png" />
+ <Content Include="res\img_tizen_zoom_minimap_mask.9.png" />
+ <Content Include="res\img_tizen_zoom_minimap_shadow.9.png" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Views\GalleryGridItem.xaml">
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
+ <EmbeddedResource Include="Views\ImageViewer.xaml">
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="Utils\NinePatch.xaml">
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="Views\ImageViewerZoom.xaml">
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ </ItemGroup>
+ <ItemGroup>
<EmbeddedResource Include="Views\GalleryImageContent.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
<NuGetPackageRoot>$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
</PropertyGroup>
<ImportGroup>
- <Import Project="$(NuGetPackageRoot)\Xamarin.Forms\2.3.4.192-pre2\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets" Condition="Exists('$(NuGetPackageRoot)\Xamarin.Forms\2.3.4.192-pre2\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets')" />
+ <Import Project="$(NuGetPackageRoot)\Xamarin.Forms\2.3.4.214-pre5\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets" Condition="Exists('$(NuGetPackageRoot)\Xamarin.Forms\2.3.4.214-pre5\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets')" />
</ImportGroup>
</Project>
\ No newline at end of file
"preserveCompilationContext": true
},
"dependencies": {
+ "ElmSharp": "1.1.0-beta-018",
"Microsoft.NETCore.App": "1.1.1",
"Tizen.Library": "1.0.0-pre2",
"Tizen.Xamarin.Forms.Extension": "2.3.4-r214-001",
- "Xamarin.Forms": "2.3.4.192-pre2",
- "Xamarin.Forms.Platform.Tizen": "2.3.4-r192-001"
+ "Xamarin.Forms": "2.3.4.214-pre5",
+ "Xamarin.Forms.Platform.Tizen": "2.3.4-r214-002"
},
"runtimes": {
"win": {},
{
public App()
{
-
- MainPage = new Tizen.Views.MediaHubMainPage();
-
- // The root page of your application
-
- /*MainPage = new ContentPage
- {
- Content = new StackLayout
- {
- VerticalOptions = LayoutOptions.Center,
- Children = {
- new Label {
- HorizontalTextAlignment = TextAlignment.Center,
- Text = "Welcome to Xamarin Forms!"
- }
- }
- }
- };*/
+ MainPage = new NavigationPage(new Tizen.Views.MediaHubMainPage());
}
protected override void OnStart()
--- /dev/null
+<?xml version="1.0" encoding="utf-8" ?>
+<Image xmlns="http://xamarin.com/schemas/2014/forms"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ x:Class="TVMediaHub.Tizen.Utils.NinePatch">
+</Image>
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using Xamarin.Forms;
+using Xamarin.Forms.Xaml;
+
+namespace TVMediaHub.Tizen.Utils
+{
+ public partial class NinePatch : Image
+ {
+ /// <summary>
+ /// Identifies the BorderLeft bindable property
+ /// </summary>
+ public static readonly BindableProperty BorderLeftProperty = BindableProperty.Create("BorderLeft", typeof(int), typeof(NinePatch), default(int));
+
+ /// <summary>
+ /// Gets or sets left border of NinePatchImage
+ /// </summary>
+ public int BorderLeft
+ {
+ get { return (int)GetValue(BorderLeftProperty); }
+ set { SetValue(BorderLeftProperty, value); }
+ }
+
+ /// <summary>
+ /// Identifies the BorderRight bindable property
+ /// </summary>
+ public static readonly BindableProperty BorderRightProperty = BindableProperty.Create("BorderRight", typeof(int), typeof(NinePatch), default(int));
+
+ /// <summary>
+ /// Gets or sets right border of NinePatchImage
+ /// </summary>
+ public int BorderRight
+ {
+ get { return (int)GetValue(BorderRightProperty); }
+ set { SetValue(BorderRightProperty, value); }
+ }
+
+ /// <summary>
+ /// Identifies the BorderTop bindable property
+ /// </summary>
+ public static readonly BindableProperty BorderTopProperty = BindableProperty.Create("BorderTop", typeof(int), typeof(NinePatch), default(int));
+
+ /// <summary>
+ /// Gets or sets top border of NinePatchImage
+ /// </summary>
+ public int BorderTop
+ {
+ get { return (int)GetValue(BorderTopProperty); }
+ set { SetValue(BorderTopProperty, value); }
+ }
+
+ /// <summary>
+ /// Identifies the BorderBottom bindable property
+ /// </summary>
+ public static readonly BindableProperty BorderBottomProperty = BindableProperty.Create("BorderBottom", typeof(int), typeof(NinePatch), default(int));
+
+ /// <summary>
+ /// Gets or sets bottom border of NinePatchImage
+ /// </summary>
+ public int BorderBottom
+ {
+ get { return (int)GetValue(BorderBottomProperty); }
+ set { SetValue(BorderBottomProperty, value); }
+ }
+ public NinePatch()
+ {
+ InitializeComponent();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System.ComponentModel;
+using TVMediaHub.Tizen.Utils;
+using Xamarin.Forms.Platform.Tizen;
+
+[assembly: ExportRenderer(typeof(NinePatch), typeof(NinePatchRenderer))]
+namespace TVMediaHub.Tizen.Utils
+{
+ /// <summary>
+ /// A custom renderer for NinePatchImage
+ /// </summary>
+ /// <see cref="NinePatch"/>
+ class NinePatchRenderer : ImageRenderer
+ {
+ /// <summary>
+ /// Updates border when Element is changed
+ /// </summary>
+ /// <param name="args">A image element changed event's argument </param>
+ protected override void OnElementChanged(ElementChangedEventArgs<Xamarin.Forms.Image> args)
+ {
+ base.OnElementChanged(args);
+ UpdateBorder();
+ }
+
+ /// <summary>
+ /// Updates border when ElementProperty is changed
+ /// </summary>
+ /// <param name="sender">The source of the event</param>
+ /// <param name="args">A image element property changed event's argument </param>
+ protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs args)
+ {
+ if ((args.PropertyName == NinePatch.BorderBottomProperty.PropertyName)
+ || (args.PropertyName == NinePatch.BorderLeftProperty.PropertyName)
+ || (args.PropertyName == NinePatch.BorderRightProperty.PropertyName)
+ || (args.PropertyName == NinePatch.BorderTopProperty.PropertyName))
+ {
+ UpdateBorder();
+ }
+
+
+ base.OnElementPropertyChanged(sender, args);
+ }
+
+ /// <summary>
+ /// A method updates border of Control(Native Image)
+ /// </summary>
+ void UpdateBorder()
+ {
+ var img = Element as NinePatch;
+ Control.SetBorder(img.BorderLeft, img.BorderRight, img.BorderTop, img.BorderBottom);
+ }
+
+ /// <summary>
+ /// A method updates border of Control(Native Image) after loading
+ /// </summary>
+ protected override void UpdateAfterLoading()
+ {
+ base.UpdateAfterLoading();
+ UpdateBorder();
+ }
+ }
+}
-using System.ComponentModel;
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System.ComponentModel;
using Xamarin.Forms;
using System;
bool isFooterNor;
bool isFooterSel;
+ // TODO : Gets the title from MediaInformation
+ public string Title
+ {
+ get;
+ set;
+ }
+
+ // TODO : Gets the date from MediaInformation
+ public string Date
+ {
+ get;
+ set;
+ }
+
+ // TODO : Gets the thumbnail from MediaInformation
+ public string ThumbnailPath
+ {
+ get;
+ set;
+ }
+
public event PropertyChangedEventHandler PropertyChanged;
MessagingCenter.Send<MediaHubMainPageViewModel, bool>(this, "status", isFooterNor);
- //PropertyChangedEventHandler handler = PropertyChanged;
+ PropertyChangedEventHandler handler = PropertyChanged;
- //if (handler != null)
- //{
- // handler(this, new PropertyChangedEventArgs(propertyName));
- //}
+ if (handler != null)
+ {
+ handler(this, new PropertyChangedEventArgs(propertyName));
+ }
}
}
});
+ SetTitleAndDate();
+ SetThumbnail();
+ }
+
+ private void SetTitleAndDate()
+ {
+ // TODO : MediaInformation Title
+ Title = "Stories From the NY";
+ Date = "Sat 25 April";
+ OnPropertyChanged("Title");
+ OnPropertyChanged("Date");
+ }
+
+ private void SetThumbnail()
+ {
+ // TODO : MediaInformation ThumbnailPath
+ ThumbnailPath = "thumbnail_test.jpg";
+ OnPropertyChanged("ThumbnailPath");
}
}
}
--- /dev/null
+<?xml version="1.0" encoding="utf-8" ?>
+<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ x:Class="TVMediaHub.Tizen.Views.ImageViewer"
+ xmlns:Utils="clr-namespace:TVMediaHub.Tizen.Utils"
+ xmlns:ViewModels="clr-namespace:TVMediaHub.Tizen.ViewModels">
+ <ContentPage.BindingContext>
+ <ViewModels:MediaHubMainPageViewModel />
+ </ContentPage.BindingContext>
+ <RelativeLayout>
+ <Image x:Name="Thumbnail"
+ RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}"
+ RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"
+ RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0}"
+ RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0}"
+ Source="{Binding ThumbnailPath}"
+ Aspect="AspectFill"/>
+ <Utils:NinePatch x:Name="GradientDim"
+ VerticalOptions="Center"
+ HorizontalOptions="Center"
+ Aspect="Fill"
+ BorderLeft="20"
+ BorderTop="20"
+ BorderRight="20"
+ BorderBottom="20"
+ Source="img_tizen_gradient_topbottom.9.png" />
+ <Grid x:Name="MainGrid"
+ RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}"
+ RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"
+ RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0}"
+ RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0}" >
+ <Grid.RowDefinitions>
+ <RowDefinition Height="062960*" />
+ <RowDefinition Height="046300*" />
+ <RowDefinition Height="001850*" />
+ <RowDefinition Height="029630*" />
+ <RowDefinition Height="770370*" />
+ <RowDefinition Height="044445*" />
+ <RowDefinition Height="044445*" />
+ </Grid.RowDefinitions>
+ <Grid.RowSpacing>0</Grid.RowSpacing>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="050000*" />
+ <ColumnDefinition Width="025000*" />
+ <ColumnDefinition Width="029167*" />
+ <ColumnDefinition Width="025000*" />
+ <ColumnDefinition Width="153125*" />
+ <ColumnDefinition Width="040625*" />
+ <ColumnDefinition Width="353125*" />
+ <ColumnDefinition Width="040625*" />
+ <ColumnDefinition Width="154167*" />
+ <ColumnDefinition Width="025000*" />
+ <ColumnDefinition Width="032291*" />
+ <ColumnDefinition Width="021875*" />
+ <ColumnDefinition Width="050000*" />
+ </Grid.ColumnDefinitions>
+ <Grid.ColumnSpacing>0</Grid.ColumnSpacing>
+ <Label Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="11"
+ Text="{Binding Title}" Font="Breeze Sans Bold" TextColor="White" FontSize="56" HorizontalTextAlignment="Start"/>
+ <Label Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="11"
+ Text="{Binding Date}" Font="Breeze Sans Light" TextColor="White" FontSize="34" HorizontalTextAlignment="Start"/>
+
+ <Image Grid.Row="5" Grid.Column="1" Source="btn_tizen_viewer_control_rotate.png" />
+ <Image Grid.Row="5" Grid.Column="3" Source="btn_tizen_viewer_control_zoom.png" />
+ <Button Grid.Row="5" Grid.Column="3" x:Name="ZoomBtn" Opacity="0"/>
+ <Image Grid.Row="5" Grid.Column="5" Source="btn_tizen_viewer_control_left.png" />
+ <Image Grid.Row="5" Grid.Column="7" Source="btn_tizen_viewer_control_right.png" />
+ <Image Grid.Row="5" Grid.Column="9" Source="btn_tizen_viewer_control_video.png" />
+ <Image Grid.Row="5" Grid.Column="11" Source="btn_tizen_viewer_control_option.png" />
+ </Grid>
+ </RelativeLayout>
+</ContentPage>
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using TVMediaHub.Tizen.Utils;
+using Xamarin.Forms;
+
+namespace TVMediaHub.Tizen.Views
+{
+ public partial class ImageViewer : ContentPage
+ {
+ public ImageViewer()
+ {
+ InitializeComponent();
+ NavigationPage.SetHasNavigationBar(this, false);
+ FadeOutControlsTest();
+ ZoomBtn.Clicked += ZoomBtn_Clicked;
+ }
+
+ private void ZoomBtn_Clicked(object sender, EventArgs e)
+ {
+ PushNavigationPage();
+ }
+
+ async void PushNavigationPage()
+ {
+ await Navigation.PushAsync(new ImageViewerZoom());
+ }
+
+ async void FadeOutControlsTest()
+ {
+ await Task.Delay(3000);
+ MainGrid.FadeTo(0, 300);
+ await Task.Delay(3000);
+ MainGrid.FadeTo(1, 300);
+ }
+
+ protected override void LayoutChildren(double x, double y, double width, double height)
+ {
+ base.LayoutChildren(x, y, width, height);
+ GradientDim.HeightRequest = height;
+ GradientDim.WidthRequest = width;
+ }
+ }
+}
--- /dev/null
+<?xml version="1.0" encoding="utf-8" ?>
+<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ x:Class="TVMediaHub.Tizen.Views.ImageViewerZoom"
+ xmlns:Utils="clr-namespace:TVMediaHub.Tizen.Utils"
+ xmlns:ViewModels="clr-namespace:TVMediaHub.Tizen.ViewModels">
+ <ContentPage.BindingContext>
+ <ViewModels:MediaHubMainPageViewModel />
+ </ContentPage.BindingContext>
+ <RelativeLayout>
+ <Image x:Name="Thumbnail"
+ RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}"
+ RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"
+ RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0}"
+ RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0}"
+ Source="{Binding ThumbnailPath}"
+ Aspect="AspectFill"/>
+ <Utils:NinePatch x:Name="GradientDim"
+ VerticalOptions="Center"
+ HorizontalOptions="Center"
+ Aspect="Fill"
+ BorderLeft="20"
+ BorderTop="20"
+ BorderRight="20"
+ BorderBottom="20"
+ Source="img_tizen_gradient_topbottom.9.png" />
+ <RelativeLayout x:Name="ZoomGrid"
+ RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}"
+ RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"
+ RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0}"
+ RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0}" >
+ <Image x:Name="UpArrow"
+ RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ZoomGrid, Property=Height, Factor=0.077778}"
+ RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ZoomGrid, Property=Width, Factor=0.04375}"
+ RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ZoomGrid, Property=Height, Factor=0.037037}"
+ RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ZoomGrid, Property=Width, Factor=0.478125}"
+ Source="ic_tizen_zoom_arrow_up_normal.png" />
+ <Image x:Name="DownArrow"
+ RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ZoomGrid, Property=Height, Factor=0.077778}"
+ RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ZoomGrid, Property=Width, Factor=0.04375}"
+ RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ZoomGrid, Property=Height, Factor=0.885185}"
+ RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ZoomGrid, Property=Width, Factor=0.478125}"
+ Source="ic_tizen_zoom_arrow_down_normal.png" />
+ <Image x:Name="LeftArrow"
+ RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ZoomGrid, Property=Height, Factor=0.077778}"
+ RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ZoomGrid, Property=Width, Factor=0.04375}"
+ RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ZoomGrid, Property=Height, Factor=0.461111}"
+ RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ZoomGrid, Property=Width, Factor=0.02083}"
+ Source="ic_tizen_zoom_arrow_left_normal.png" />
+ <Image x:Name="RightArrow"
+ RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ZoomGrid, Property=Height, Factor=0.077778}"
+ RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ZoomGrid, Property=Width, Factor=0.04375}"
+ RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ZoomGrid, Property=Height, Factor=0.461111}"
+ RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ZoomGrid, Property=Width, Factor=0.9354167}"
+ Source="ic_tizen_zoom_arrow_right_normal.png" />
+ <Grid x:Name="BackInfo"
+ RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ZoomGrid, Property=Height, Factor=0.037037}"
+ RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ZoomGrid, Property=Width, Factor=0.059375}"
+ RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ZoomGrid, Property=Height, Factor=0.057407}"
+ RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ZoomGrid, Property=Width, Factor=0.890625}" >
+ <Grid.RowDefinitions>
+ <RowDefinition Height="*" />
+ </Grid.RowDefinitions>
+ <Grid.RowSpacing>0</Grid.RowSpacing>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="350877*" />
+ <ColumnDefinition Width="105263*" />
+ <ColumnDefinition Width="543860*" />
+ </Grid.ColumnDefinitions>
+ <Grid.ColumnSpacing>0</Grid.ColumnSpacing>
+ <Image x:Name="BackIcon" Grid.Row="0" Grid.Column="0"
+ Source="ic_tizen_apps_additional_back.png" />
+ <Label x:Name="BackLabel" Grid.Row="0" Grid.Column="2"
+ Text="Back" FontSize="56" Opacity="0.6" TextColor="White" HorizontalTextAlignment="Start" />
+ </Grid>
+ <RelativeLayout x:Name="MiniMap"
+ RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ZoomGrid, Property=Height, Factor=0.25}"
+ RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ZoomGrid, Property=Width, Factor=0.25}"
+ RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ZoomGrid, Property=Height, Factor=0.661111}"
+ RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ZoomGrid, Property=Width, Factor=0.7}" >
+ <Utils:NinePatch x:Name="ManiMapGradientDim"
+ VerticalOptions="Center"
+ HorizontalOptions="Center"
+ Aspect="Fill"
+ WidthRequest="640"
+ HeightRequest="430"
+ BorderLeft="20"
+ BorderTop="20"
+ BorderRight="20"
+ BorderBottom="20"
+ Source="img_tizen_zoom_minimap_shadow.9.png" />
+ <Image x:Name="MiniMapThumbnail"
+ RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=MiniMap, Property=Height, Factor=1}"
+ RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=MiniMap, Property=Width, Factor=1}"
+ RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=MiniMap, Property=Height, Factor=0}"
+ RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=MiniMap, Property=Width, Factor=0}"
+ Source="{Binding ThumbnailPath}"
+ Aspect="AspectFill"/>
+ <Image x:Name="MiniMapThumbnailDim"
+ RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=MiniMap, Property=Height, Factor=1}"
+ RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=MiniMap, Property=Width, Factor=1}"
+ RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=MiniMap, Property=Height, Factor=0}"
+ RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=MiniMap, Property=Width, Factor=0}"
+ Source="img_tizen_zoom_minimap_dimmed.png"/>
+ </RelativeLayout>
+ </RelativeLayout>
+ </RelativeLayout>
+</ContentPage>
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using Xamarin.Forms;
+
+namespace TVMediaHub.Tizen.Views
+{
+ public partial class ImageViewerZoom : ContentPage
+ {
+ public ImageViewerZoom()
+ {
+ InitializeComponent();
+ NavigationPage.SetHasNavigationBar(this, false);
+ }
+
+ protected override void LayoutChildren(double x, double y, double width, double height)
+ {
+ base.LayoutChildren(x, y, width, height);
+ GradientDim.HeightRequest = height;
+ GradientDim.WidthRequest = width;
+ }
+ }
+}
Clicked="OnPageButtonClicked"
Margin="0, 0, 56, 0">
</Button>
- <Button Text="GALLERY" Style="{StaticResource buttonTextSelected}" CommandParameter="1" Clicked="OnPageButtonClicked"></Button>
+ <Button Text="GALLERY" Style="{StaticResource buttonTextSelected}" CommandParameter="1" Clicked="OnPageButtonClicked"
+ Margin="0, 0, 56, 0"></Button>
+ <Button Text="ViewerTest" Style="{StaticResource buttonTextSelected}" CommandParameter="2" Clicked="OnPageButtonClicked" />
</StackLayout>
<StackLayout x:Name="contentArea" HeightRequest="594" WidthRequest="1500" Margin="0, 74, 0, 84">
<Views:MovieGridView x:Name="contentMovie" IsVisible="True"/>
-using System;
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
public MediaHubMainPage()
{
InitializeComponent();
-
+ NavigationPage.SetHasNavigationBar(this, false);
PropertyChanged += myPropertychanged;
MessagingCenter.Subscribe<ViewModels.MediaHubMainPageViewModel, bool>(this, "status", (sender, arg) =>
{
curStatus.pageMode = 0;
curStatus.footerStatus = 0;
-
+ changeViewVisible();
}
- else
+ else if (a.Equals("1"))
{
curStatus.pageMode = 1;
curStatus.footerStatus = 0;
+ changeViewVisible();
}
- changeViewVisible();
-
-
+ else
+ {
+ PushNavigationPage();
+ }
+ }
+ async void PushNavigationPage()
+ {
+ await Navigation.PushAsync(new ImageViewer());
}
void changeViewVisible()