Initial commit.
This commit is contained in:
Родитель
d08b5662a8
Коммит
e33fcb554f
|
@ -0,0 +1,33 @@
|
|||
Copyright © 2011-2013 Nokia Corporation. All rights reserved.
|
||||
Nokia and Nokia Connecting People are registered trademarks of Nokia Corporation.
|
||||
Other product and company names mentioned herein may be trademarks or trade names
|
||||
of their respective owners.
|
||||
|
||||
Subject to the conditions below, you may, without charge:
|
||||
|
||||
· Use, copy, modify and/or merge copies of this software and
|
||||
associated content and documentation files (the “Software”)
|
||||
|
||||
· Publish, distribute, sub-licence and/or sell new software
|
||||
derived from or incorporating the Software.
|
||||
|
||||
Some of the documentation, content and/or software maybe licensed under open source
|
||||
software or other licenses. To the extent such documentation, content and/or software
|
||||
are included, licenses and/or other terms and conditions shall apply in addition and/or
|
||||
instead of this notice. The exact terms of the licenses, disclaimers, acknowledgements
|
||||
and notices are reproduced in the materials provided.
|
||||
|
||||
This file, unmodified, shall be included with all copies or substantial portions
|
||||
of the Software that are distributed in source code form.
|
||||
|
||||
The Software cannot constitute the primary value of any new software derived
|
||||
from or incorporating the Software.
|
||||
|
||||
Any person dealing with the Software shall not misrepresent the source of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@ -0,0 +1,22 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010 Express for Windows Phone
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MediaViewer", "MediaViewer\MediaViewer.csproj", "{9FC6E75D-360E-4E91-A735-79F1135E0253}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{9FC6E75D-360E-4E91-A735-79F1135E0253}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9FC6E75D-360E-4E91-A735-79F1135E0253}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9FC6E75D-360E-4E91-A735-79F1135E0253}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
|
||||
{9FC6E75D-360E-4E91-A735-79F1135E0253}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9FC6E75D-360E-4E91-A735-79F1135E0253}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{9FC6E75D-360E-4E91-A735-79F1135E0253}.Release|Any CPU.Deploy.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -0,0 +1,25 @@
|
|||
<Application
|
||||
x:Class="MediaViewer.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
|
||||
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone">
|
||||
|
||||
<!--Application Resources-->
|
||||
<Application.Resources>
|
||||
<Style x:Key="DescriptionItemContentStyle" TargetType="TextBlock" BasedOn="{StaticResource PhoneTextLargeStyle}">
|
||||
<Setter Property="Margin" Value="36,0,0,0"/>
|
||||
</Style>
|
||||
<Style x:Key="DescriptionItemTitleStyle" TargetType="TextBlock" BasedOn="{StaticResource PhoneTextGroupHeaderStyle}">
|
||||
<Setter Property="Margin" Value="24,15,0,0"/>
|
||||
</Style>
|
||||
</Application.Resources>
|
||||
|
||||
<Application.ApplicationLifetimeObjects>
|
||||
<!--Required object that handles lifetime events for the application-->
|
||||
<shell:PhoneApplicationService
|
||||
Launching="Application_Launching" Closing="Application_Closing"
|
||||
Activated="Application_Activated" Deactivated="Application_Deactivated"/>
|
||||
</Application.ApplicationLifetimeObjects>
|
||||
|
||||
</Application>
|
|
@ -0,0 +1,176 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using Microsoft.Phone.Controls;
|
||||
using Microsoft.Phone.Shell;
|
||||
using Microsoft.Xna.Framework.Media;
|
||||
using MediaViewer.ViewModels;
|
||||
|
||||
namespace MediaViewer
|
||||
{
|
||||
public partial class App : Application
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides easy access to the root frame of the Phone Application.
|
||||
/// </summary>
|
||||
/// <returns>The root frame of the Phone Application.</returns>
|
||||
public PhoneApplicationFrame RootFrame { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Model containig data for pictures category
|
||||
/// </summary>
|
||||
/// <returns>Pictures category model</returns>
|
||||
public PicturesCategoryModel PicturesModel { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Model containig data for music category
|
||||
/// </summary>
|
||||
/// <returns>Music category model</returns>
|
||||
public MusicCategoryModel MusicModel { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Constructor for the Application object.
|
||||
/// </summary>
|
||||
public App()
|
||||
{
|
||||
// Global handler for uncaught exceptions.
|
||||
UnhandledException += Application_UnhandledException;
|
||||
|
||||
// Show graphics profiling information while debugging.
|
||||
if (System.Diagnostics.Debugger.IsAttached)
|
||||
{
|
||||
// Display the current frame rate counters.
|
||||
Application.Current.Host.Settings.EnableFrameRateCounter = true;
|
||||
|
||||
// Show the areas of the app that are being redrawn in each frame.
|
||||
//Application.Current.Host.Settings.EnableRedrawRegions = true;
|
||||
|
||||
// Enable non-production analysis visualization mode,
|
||||
// which shows areas of a page that are being GPU accelerated with a colored overlay.
|
||||
//Application.Current.Host.Settings.EnableCacheVisualization = true;
|
||||
}
|
||||
|
||||
// Standard Silverlight initialization
|
||||
InitializeComponent();
|
||||
|
||||
// Phone-specific initialization
|
||||
InitializePhoneApplication();
|
||||
}
|
||||
|
||||
// Code to execute when the application is launching (eg, from Start)
|
||||
// This code will not execute when the application is reactivated
|
||||
private void Application_Launching(object sender, LaunchingEventArgs e)
|
||||
{
|
||||
LoadDataForModels();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Loads data for both, music and pictues models
|
||||
/// </summary>
|
||||
private void LoadDataForModels()
|
||||
{
|
||||
MediaLibrary library = new MediaLibrary();
|
||||
|
||||
List<Song> songs = new List<Song>();
|
||||
foreach (var song in library.Songs)
|
||||
{
|
||||
songs.Add(song);
|
||||
}
|
||||
|
||||
MusicModel = new MusicCategoryModel("Music", songs);
|
||||
|
||||
List<Picture> pictures = new List<Picture>();
|
||||
foreach (var picture in library.Pictures)
|
||||
{
|
||||
pictures.Add(picture);
|
||||
}
|
||||
|
||||
PicturesModel = new PicturesCategoryModel("Pictures", pictures);
|
||||
}
|
||||
|
||||
// Code to execute when the application is activated (brought to foreground)
|
||||
// This code will not execute when the application is first launched
|
||||
private void Application_Activated(object sender, ActivatedEventArgs e)
|
||||
{
|
||||
LoadDataForModels();
|
||||
}
|
||||
|
||||
// Code to execute when the application is deactivated (sent to background)
|
||||
// This code will not execute when the application is closing
|
||||
private void Application_Deactivated(object sender, DeactivatedEventArgs e)
|
||||
{
|
||||
// Ensure that required application state is persisted here.
|
||||
}
|
||||
|
||||
// Code to execute when the application is closing (eg, user hit Back)
|
||||
// This code will not execute when the application is deactivated
|
||||
private void Application_Closing(object sender, ClosingEventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
// Code to execute if a navigation fails
|
||||
private void RootFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)
|
||||
{
|
||||
if (System.Diagnostics.Debugger.IsAttached)
|
||||
{
|
||||
// A navigation has failed; break into the debugger
|
||||
System.Diagnostics.Debugger.Break();
|
||||
}
|
||||
}
|
||||
|
||||
// Code to execute on Unhandled Exceptions
|
||||
private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
|
||||
{
|
||||
if (System.Diagnostics.Debugger.IsAttached)
|
||||
{
|
||||
// An unhandled exception has occurred; break into the debugger
|
||||
System.Diagnostics.Debugger.Break();
|
||||
}
|
||||
}
|
||||
|
||||
#region Phone application initialization
|
||||
|
||||
// Avoid double-initialization
|
||||
private bool phoneApplicationInitialized = false;
|
||||
|
||||
// Do not add any additional code to this method
|
||||
private void InitializePhoneApplication()
|
||||
{
|
||||
if (phoneApplicationInitialized)
|
||||
return;
|
||||
|
||||
// Create the frame but don't set it as RootVisual yet; this allows the splash
|
||||
// screen to remain active until the application is ready to render.
|
||||
RootFrame = new PhoneApplicationFrame();
|
||||
RootFrame.Navigated += CompleteInitializePhoneApplication;
|
||||
|
||||
// Handle navigation failures
|
||||
RootFrame.NavigationFailed += RootFrame_NavigationFailed;
|
||||
|
||||
// Ensure we don't initialize again
|
||||
phoneApplicationInitialized = true;
|
||||
}
|
||||
|
||||
// Do not add any additional code to this method
|
||||
private void CompleteInitializePhoneApplication(object sender, NavigationEventArgs e)
|
||||
{
|
||||
// Set the root visual to allow the application to render
|
||||
if (RootVisual != RootFrame)
|
||||
RootVisual = RootFrame;
|
||||
|
||||
// Remove this handler since it is no longer needed
|
||||
RootFrame.Navigated -= CompleteInitializePhoneApplication;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" EntryPointAssembly="MediaViewer" EntryPointType="MediaViewer.App" RuntimeVersion="3.0.40624.0">
|
||||
<Deployment.Parts>
|
||||
<AssemblyPart x:Name="MediaViewer" Source="MediaViewer.dll" />
|
||||
<AssemblyPart x:Name="Microsoft.Phone.Controls" Source="Microsoft.Phone.Controls.dll" />
|
||||
</Deployment.Parts>
|
||||
</Deployment>
|
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
|
@ -0,0 +1,502 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
-->
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>Microsoft.Phone.Controls</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:Microsoft.Phone.Controls.Panorama">
|
||||
<summary>Creates a panoramic view of items that can be panned side-to-side.</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.Panorama.#ctor">
|
||||
<summary>Initializes a new instance of the Panorama class.</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.Panorama.ArrangeOverride(System.Windows.Size)">
|
||||
<summary>Handles the arrange pass for the control.</summary>
|
||||
<returns>Render size.</returns>
|
||||
<param name="finalSize">Final size.</param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.Panorama.ClearContainerForItemOverride(System.Windows.DependencyObject,System.Object)">
|
||||
<summary>Handles the clearing of a discarded container.</summary>
|
||||
<param name="element">Container instance.</param>
|
||||
<param name="item">Container content.</param>
|
||||
</member>
|
||||
<member name="P:Microsoft.Phone.Controls.Panorama.DefaultItem">
|
||||
<summary>Gets or sets the default item for the Panorama.</summary>
|
||||
<returns>Returns
|
||||
<see cref="T:System.Object" />
|
||||
.</returns>
|
||||
</member>
|
||||
<member name="F:Microsoft.Phone.Controls.Panorama.DefaultItemProperty">
|
||||
<summary>Identifies the DefaultItem dependency property.</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Phone.Controls.Panorama.HeaderTemplate">
|
||||
<summary>Gets or sets the template for the Header property of PanoramaItem children.</summary>
|
||||
<returns>Returns
|
||||
<see cref="T:System.Windows.DataTemplate" />
|
||||
.</returns>
|
||||
</member>
|
||||
<member name="F:Microsoft.Phone.Controls.Panorama.HeaderTemplateProperty">
|
||||
<summary>Identifies the HeaderTemplate dependency property.</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.Panorama.MeasureOverride(System.Windows.Size)">
|
||||
<summary>Handles the measurement of the control.</summary>
|
||||
<returns>Desired size.</returns>
|
||||
<param name="availableSize">Available size.</param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.Panorama.OnApplyTemplate">
|
||||
<summary>Handles the application of a new Template.</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.Panorama.OnItemsChanged(System.Collections.Specialized.NotifyCollectionChangedEventArgs)">
|
||||
<summary>When the items have changed, we need to adjust the selection.</summary>
|
||||
<param name="e"></param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.Panorama.PrepareContainerForItemOverride(System.Windows.DependencyObject,System.Object)">
|
||||
<summary>Handles the preparation of a new container.</summary>
|
||||
<param name="element">Container instance.</param>
|
||||
<param name="item">Container content.</param>
|
||||
</member>
|
||||
<member name="P:Microsoft.Phone.Controls.Panorama.SelectedIndex">
|
||||
<summary>Gets the selected index.</summary>
|
||||
<returns>Returns
|
||||
<see cref="T:System.Int32" />
|
||||
.</returns>
|
||||
</member>
|
||||
<member name="F:Microsoft.Phone.Controls.Panorama.SelectedIndexProperty">
|
||||
<summary>Identifies the SelectedIndex dependency property.</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Phone.Controls.Panorama.SelectedItem">
|
||||
<summary>Gets the selected item.</summary>
|
||||
<returns>Returns
|
||||
<see cref="T:System.Object" />
|
||||
.</returns>
|
||||
</member>
|
||||
<member name="F:Microsoft.Phone.Controls.Panorama.SelectedItemProperty">
|
||||
<summary>Identifies the SelectedItem dependency property.</summary>
|
||||
</member>
|
||||
<member name="E:Microsoft.Phone.Controls.Panorama.SelectionChanged">
|
||||
<summary>Event that is invoked when selection changes.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Phone.Controls.Panorama.Title">
|
||||
<summary>Gets or sets the title for the Panorama.</summary>
|
||||
<returns>Returns
|
||||
<see cref="T:System.Object" />
|
||||
.</returns>
|
||||
</member>
|
||||
<member name="F:Microsoft.Phone.Controls.Panorama.TitleProperty">
|
||||
<summary>Identifies the Title dependency property.</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Phone.Controls.Panorama.TitleTemplate">
|
||||
<summary>Gets or sets the template for the Title property.</summary>
|
||||
<returns>Returns
|
||||
<see cref="T:System.Windows.DataTemplate" />
|
||||
.</returns>
|
||||
</member>
|
||||
<member name="F:Microsoft.Phone.Controls.Panorama.TitleTemplateProperty">
|
||||
<summary>Identifies the TitleTemplate dependency property.</summary>
|
||||
</member>
|
||||
<member name="T:Microsoft.Phone.Controls.PanoramaItem">
|
||||
<summary>Represents an item in a Panorama control.</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.PanoramaItem.#ctor">
|
||||
<summary>Initializes a new instance of the PanoramaItem class.</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Phone.Controls.PanoramaItem.Header">
|
||||
<summary>Gets or sets the header for the PanoramaItem.</summary>
|
||||
<returns>Returns
|
||||
<see cref="T:System.Object" />
|
||||
.</returns>
|
||||
</member>
|
||||
<member name="F:Microsoft.Phone.Controls.PanoramaItem.HeaderProperty">
|
||||
<summary>Identifies the Header dependency property.</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Phone.Controls.PanoramaItem.HeaderTemplate">
|
||||
<summary>Gets or sets the template for the Header property.</summary>
|
||||
<returns>Returns
|
||||
<see cref="T:System.Windows.DataTemplate" />
|
||||
.</returns>
|
||||
</member>
|
||||
<member name="F:Microsoft.Phone.Controls.PanoramaItem.HeaderTemplateProperty">
|
||||
<summary>Identifies the HeaderTemplate dependency property.</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Phone.Controls.PanoramaItem.Orientation">
|
||||
<summary>Gets or sets the primary (scrolling) orientation for the PanoramaItem.</summary>
|
||||
<returns>Returns
|
||||
<see cref="T:System.Windows.Controls.Orientation" />
|
||||
.</returns>
|
||||
</member>
|
||||
<member name="F:Microsoft.Phone.Controls.PanoramaItem.OrientationProperty">
|
||||
<summary>Identifies the Orientation dependency property.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Microsoft.Phone.Controls.Pivot">
|
||||
<summary>The Pivot control provides a quick way to manage the navigation of views within an application. The control can be used as a navigation interface for filtering large sets or switching between views.</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.Pivot.#ctor">
|
||||
<summary>Initializes a new instance of the Pivot type.</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Phone.Controls.Pivot.HeaderTemplate">
|
||||
<summary>Gets or sets the template for the Header property of PivotItem children.</summary>
|
||||
<returns>Returns
|
||||
<see cref="T:System.Windows.DataTemplate" />
|
||||
.</returns>
|
||||
</member>
|
||||
<member name="F:Microsoft.Phone.Controls.Pivot.HeaderTemplateProperty">
|
||||
<summary>Identifies the HeaderTemplate dependency property.</summary>
|
||||
</member>
|
||||
<member name="E:Microsoft.Phone.Controls.Pivot.LoadedPivotItem">
|
||||
<summary>Event for indicating that an item has fully loaded.</summary>
|
||||
</member>
|
||||
<member name="E:Microsoft.Phone.Controls.Pivot.LoadingPivotItem">
|
||||
<summary>Event for offering an opportunity to dynamically load or change the content of a pivot item before it is displayed.</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.Pivot.OnApplyTemplate">
|
||||
<summary>Overrides the on apply template method to connect template parts.</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.Pivot.OnItemsChanged(System.Collections.Specialized.NotifyCollectionChangedEventArgs)">
|
||||
<summary>Update the header items when there are changes in the pivot items collection.</summary>
|
||||
<param name="e">The event arguments.</param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.Pivot.OnLoadedPivotItem(Microsoft.Phone.Controls.PivotItem)">
|
||||
<summary>Override for notifying that an item has loaded.</summary>
|
||||
<param name="item">The pivot item instance.
|
||||
</param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.Pivot.OnLoadingPivotItem(Microsoft.Phone.Controls.PivotItem)">
|
||||
<summary>Overrride for creating content for a given item.</summary>
|
||||
<param name="item">The pivot item instance.</param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.Pivot.OnSelectionChanged(System.Windows.Controls.SelectionChangedEventArgs)">
|
||||
<summary>Responds to a pivot selection change by raising a SelectionChanged event.</summary>
|
||||
<param name="e">Provides data for SelectionChangedEventArgs.</param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.Pivot.OnUnloadedPivotItem(Microsoft.Phone.Controls.PivotItemEventArgs)">
|
||||
<summary>The unloaded event handler.</summary>
|
||||
<param name="e">Provides data for PivotItemEventArgs.
|
||||
</param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.Pivot.OnUnloadingPivotItem(Microsoft.Phone.Controls.PivotItemEventArgs)">
|
||||
<summary>The unloading event handler. </summary>
|
||||
<param name="e">The pivot item event arguments.</param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.Pivot.PrepareContainerForItemOverride(System.Windows.DependencyObject,System.Object)">
|
||||
<summary>Prepares the container to display the specified item.</summary>
|
||||
<param name="element">The container element used to display the specified item.</param>
|
||||
<param name="item">The item to display.</param>
|
||||
</member>
|
||||
<member name="P:Microsoft.Phone.Controls.Pivot.SelectedIndex">
|
||||
<summary>Gets or sets the index of the selected (current) PivotItem.</summary>
|
||||
<returns>Returns
|
||||
<see cref="T:System.Int32" />
|
||||
.</returns>
|
||||
</member>
|
||||
<member name="F:Microsoft.Phone.Controls.Pivot.SelectedIndexProperty">
|
||||
<summary>Identifies the SelectedIndex dependency property.</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Phone.Controls.Pivot.SelectedItem">
|
||||
<summary>Gets or sets the selected (current) PivotItem.</summary>
|
||||
<returns>Returns
|
||||
<see cref="T:System.Object" />
|
||||
.</returns>
|
||||
</member>
|
||||
<member name="F:Microsoft.Phone.Controls.Pivot.SelectedItemProperty">
|
||||
<summary>Identifies the SelectedItem dependency property.</summary>
|
||||
</member>
|
||||
<member name="E:Microsoft.Phone.Controls.Pivot.SelectionChanged">
|
||||
<summary>This event occurs when the currently selected item changes.</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Phone.Controls.Pivot.Title">
|
||||
<summary>Gets or sets the title to be optionally set above the headers.</summary>
|
||||
<returns>Returns
|
||||
<see cref="T:System.Object" />
|
||||
.</returns>
|
||||
</member>
|
||||
<member name="F:Microsoft.Phone.Controls.Pivot.TitleProperty">
|
||||
<summary>Identifies the Title dependency property.</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Phone.Controls.Pivot.TitleTemplate">
|
||||
<summary>Gets or sets the title template used for displaying the title above the headers area.</summary>
|
||||
<returns>Returns
|
||||
<see cref="T:System.Windows.DataTemplate" />
|
||||
.</returns>
|
||||
</member>
|
||||
<member name="F:Microsoft.Phone.Controls.Pivot.TitleTemplateProperty">
|
||||
<summary>Identifies the TitleTemplate dependency property.</summary>
|
||||
</member>
|
||||
<member name="E:Microsoft.Phone.Controls.Pivot.UnloadedPivotItem">
|
||||
<summary>Event for notifying that the pivot item has been completely unloaded from the visual pivot.</summary>
|
||||
</member>
|
||||
<member name="E:Microsoft.Phone.Controls.Pivot.UnloadingPivotItem">
|
||||
<summary>Event for offering an opportunity to dynamically load, change or remove the content of a pivot item as it is removed.</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.Pivot.UpdateItemVisibility(System.Windows.UIElement,System.Boolean)">
|
||||
<summary>Shows or hides an item.</summary>
|
||||
<param name="element">The user interface element.</param>
|
||||
<param name="toVisible">A value indicating whether to make the item visible or not.</param>
|
||||
</member>
|
||||
<member name="T:Microsoft.Phone.Controls.PivotItem">
|
||||
<summary>PivotItem is the container for items in the Pivot control. The item has both a set of visual states for position and a Header, effectively a HeaderedContentControl.</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.PivotItem.#ctor">
|
||||
<summary>Initializes a new instance of the PivotItem type.</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Phone.Controls.PivotItem.Header">
|
||||
<summary>Gets or sets the header for the PivotItem.</summary>
|
||||
<returns>Returns
|
||||
<see cref="T:System.Object" />
|
||||
.</returns>
|
||||
</member>
|
||||
<member name="F:Microsoft.Phone.Controls.PivotItem.HeaderProperty">
|
||||
<summary>Identifies the Header dependency property.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.PivotItem.OnApplyTemplate">
|
||||
<summary>Overrides the on apply template method.</summary>
|
||||
</member>
|
||||
<member name="T:Microsoft.Phone.Controls.PivotItemEventArgs">
|
||||
<summary>Event arguments for dynamically interacting with the PivotItem before use, allowing for delay load scenarios.</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.PivotItemEventArgs.#ctor">
|
||||
<summary>Initializes a new instance of the PivotItemEventArgs type.</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.PivotItemEventArgs.#ctor(Microsoft.Phone.Controls.PivotItem)">
|
||||
<summary>Initializes a new instance of the PivotItemEventArgs type.</summary>
|
||||
<param name="item">The pivot item instance.</param>
|
||||
</member>
|
||||
<member name="P:Microsoft.Phone.Controls.PivotItemEventArgs.Item">
|
||||
<summary>Gets the pivot item instance.</summary>
|
||||
<returns>Returns
|
||||
<see cref="T:Microsoft.Phone.Controls.PivotItem" />
|
||||
.</returns>
|
||||
</member>
|
||||
<member name="T:Microsoft.Phone.Controls.Primitives.AnimationDirection">
|
||||
<summary>Describes the desired direction of animation.</summary>
|
||||
</member>
|
||||
<member name="F:Microsoft.Phone.Controls.Primitives.AnimationDirection.Center">
|
||||
<summary>Animates to the center direction.</summary>
|
||||
</member>
|
||||
<member name="F:Microsoft.Phone.Controls.Primitives.AnimationDirection.Left">
|
||||
<summary>Animates to the left direction.</summary>
|
||||
</member>
|
||||
<member name="F:Microsoft.Phone.Controls.Primitives.AnimationDirection.Right">
|
||||
<summary>Animates to the right direction.</summary>
|
||||
</member>
|
||||
<member name="T:Microsoft.Phone.Controls.Primitives.PanningBackgroundLayer">
|
||||
<summary>This override provides specific behaviors for the background.</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.Primitives.PanningBackgroundLayer.#ctor">
|
||||
<summary>Initializes a new instance of the PanningBackgroundLayer.</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Phone.Controls.Primitives.PanningBackgroundLayer.PanRate">
|
||||
<summary>Gets the pan rate.</summary>
|
||||
<returns>Returns
|
||||
<see cref="T:System.Double" />
|
||||
.</returns>
|
||||
</member>
|
||||
<member name="T:Microsoft.Phone.Controls.Primitives.PanningLayer">
|
||||
<summary>Implements a surface the Panorama control uses to pan content horizontally.</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.Primitives.PanningLayer.#ctor">
|
||||
<summary>Initializes a new instance of the PanningLayer class.</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Phone.Controls.Primitives.PanningLayer.ContentPresenter">
|
||||
<summary>ContentPresenter property</summary>
|
||||
<returns>Returns
|
||||
<see cref="T:System.Windows.Controls.ContentPresenter" />
|
||||
.</returns>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.Primitives.PanningLayer.GoTo(System.Int32,System.Windows.Duration,System.Action)">
|
||||
<summary>Goes to an offset.</summary>
|
||||
<param name="targetOffset">Target offset (in ItemsWidth coordinates).</param>
|
||||
<param name="duration">Duration.</param>
|
||||
<param name="completionAction">Action to perform at completion.</param>
|
||||
</member>
|
||||
<member name="F:Microsoft.Phone.Controls.Primitives.PanningLayer.Immediately">
|
||||
<summary>Represents a zero duration.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Phone.Controls.Primitives.PanningLayer.LeftWraparound">
|
||||
<summary>This will be used to display the right-most item on the left side for wraparound purposes.</summary>
|
||||
<returns>Returns
|
||||
<see cref="T:System.Windows.Shapes.Rectangle" />
|
||||
.</returns>
|
||||
</member>
|
||||
<member name="P:Microsoft.Phone.Controls.Primitives.PanningLayer.LocalTransform">
|
||||
<summary>The localTransform adjusts the zero point if it changes due to the wraparounds.</summary>
|
||||
<returns>Returns
|
||||
<see cref="T:System.Windows.Media.TranslateTransform" />
|
||||
.</returns>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.Primitives.PanningLayer.OnApplyTemplate">
|
||||
<summary>OnApplyTemplate override</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Phone.Controls.Primitives.PanningLayer.PanningTransform">
|
||||
<summary>The panningTransform is responsible for the panning.</summary>
|
||||
<returns>Returns
|
||||
<see cref="T:System.Windows.Media.TranslateTransform" />
|
||||
.</returns>
|
||||
</member>
|
||||
<member name="P:Microsoft.Phone.Controls.Primitives.PanningLayer.PanRate">
|
||||
<summary>PanRate controls how much this pans relative to the content</summary>
|
||||
<returns>Returns
|
||||
<see cref="T:System.Double" />
|
||||
.</returns>
|
||||
</member>
|
||||
<member name="P:Microsoft.Phone.Controls.Primitives.PanningLayer.RightWraparound">
|
||||
<summary>This will be used to display the left-most item on the right side for wraparound purposes.</summary>
|
||||
<returns>Returns
|
||||
<see cref="T:System.Windows.Shapes.Rectangle" />
|
||||
.</returns>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.Primitives.PanningLayer.UpdateWrappingRectangles">
|
||||
<summary>Ensures the wrapping rectangles have been created, and updates them as needed</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.Primitives.PanningLayer.Wraparound(System.Int32)">
|
||||
<summary>Wraps the content around in preparation for post-wrap animation.</summary>
|
||||
<param name="direction">Direction.</param>
|
||||
</member>
|
||||
<member name="T:Microsoft.Phone.Controls.Primitives.PanningTitleLayer">
|
||||
<summary>This override provides specific behaviors for the title text.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.Primitives.PanningTitleLayer.#ctor">
|
||||
<summary>Initializes a new instance of the PanningTitleLayer type.</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Phone.Controls.Primitives.PanningTitleLayer.PanRate">
|
||||
<summary>Get the rate at which this will pan compared to the items</summary>
|
||||
<returns>Returns
|
||||
<see cref="T:System.Double" />
|
||||
.</returns>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.Primitives.PanningTitleLayer.UpdateWrappingRectangles">
|
||||
<summary>Ensures the wrapping rectangles have been created, and updates them as needed</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.Primitives.PanningTitleLayer.Wraparound(System.Int32)">
|
||||
<summary>This is called when the display is looping around.</summary>
|
||||
<param name="direction">The direction of the movement.</param>
|
||||
</member>
|
||||
<member name="T:Microsoft.Phone.Controls.Primitives.PanoramaPanel">
|
||||
<summary>Implements a custom Panel for the Panorama control.</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.Primitives.PanoramaPanel.#ctor">
|
||||
<summary>Initializes a new instance of the PanoramaPanel class.</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.Primitives.PanoramaPanel.ArrangeOverride(System.Windows.Size)">
|
||||
<summary>Handles the arrange pass for the control.</summary>
|
||||
<returns>Render size.</returns>
|
||||
<param name="finalSize">Final size.</param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.Primitives.PanoramaPanel.MeasureOverride(System.Windows.Size)">
|
||||
<summary>Handles the measure pass for the control.</summary>
|
||||
<returns>Desired size.</returns>
|
||||
<param name="availableSize">Available size.</param>
|
||||
</member>
|
||||
<member name="T:Microsoft.Phone.Controls.Primitives.PivotHeaderItem">
|
||||
<summary>Represents a header item in the specialized pivot header items control.</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.Primitives.PivotHeaderItem.#ctor">
|
||||
<summary>Initializes a new instance of the PivotHeaderItem control.</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Phone.Controls.Primitives.PivotHeaderItem.IsSelected">
|
||||
<summary>Gets or sets a value indicating whether the item is selected.</summary>
|
||||
<returns>Returns
|
||||
<see cref="T:System.Boolean" />
|
||||
.</returns>
|
||||
</member>
|
||||
<member name="F:Microsoft.Phone.Controls.Primitives.PivotHeaderItem.IsSelectedProperty">
|
||||
<summary>Identifies the IsSelected dependency property.</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.Primitives.PivotHeaderItem.OnApplyTemplate">
|
||||
<summary>Overrides the on apply template method.</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.Primitives.PivotHeaderItem.OnMouseLeftButtonUp(System.Windows.Input.MouseButtonEventArgs)">
|
||||
<summary>Handles the button up event.</summary>
|
||||
<param name="e">The event arguments.</param>
|
||||
</member>
|
||||
<member name="T:Microsoft.Phone.Controls.Primitives.PivotHeadersControl">
|
||||
<summary>A primitive used by the Pivot control to manage the wrapping header experience for the control.</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.Primitives.PivotHeadersControl.#ctor">
|
||||
<summary>Initializes a new instance of the PivotHeadersControl class.</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.Primitives.PivotHeadersControl.ClearContainerForItemOverride(System.Windows.DependencyObject,System.Object)">
|
||||
<summary>Undoes the effects of the PrepareContainerForItemOverride method.</summary>
|
||||
<param name="element">The container element.</param>
|
||||
<param name="item">The item.</param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.Primitives.PivotHeadersControl.OnApplyTemplate">
|
||||
<summary>Overrides the on apply template method to connect template parts.</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.Primitives.PivotHeadersControl.OnItemsChanged(System.Collections.Specialized.NotifyCollectionChangedEventArgs)">
|
||||
<summary>Handles the items changed event, re-creating the visuals for the control.</summary>
|
||||
<param name="e">The event arguments.</param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.Primitives.PivotHeadersControl.PrepareContainerForItemOverride(System.Windows.DependencyObject,System.Object)">
|
||||
<summary>Prepares the container to display the specified item.</summary>
|
||||
<param name="element">The container element used to display the specified item.</param>
|
||||
<param name="item">The item to display.</param>
|
||||
</member>
|
||||
<member name="P:Microsoft.Phone.Controls.Primitives.PivotHeadersControl.VisualFirstIndex">
|
||||
<summary>The current VisualFirstIndex value</summary>
|
||||
<returns>Returns
|
||||
<see cref="T:System.Int32" />
|
||||
.</returns>
|
||||
</member>
|
||||
<member name="F:Microsoft.Phone.Controls.Primitives.PivotHeadersControl.VisualFirstIndexProperty">
|
||||
<summary>Identifies the VisualFirstIndex dependency property.</summary>
|
||||
</member>
|
||||
<member name="T:Microsoft.Phone.Controls.Primitives.TemplatedItemsControl`1">
|
||||
<summary>Subclasses ItemsControl to provide the typical support for using a custom container type.</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.Primitives.TemplatedItemsControl`1.#ctor">
|
||||
<summary>Initializes a new instance of the TemplatedItemsControl class.</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.Primitives.TemplatedItemsControl`1.ApplyItemContainerStyle(System.Windows.DependencyObject)">
|
||||
<summary>Apply the ItemContainerStyle</summary>
|
||||
<param name="container">The container</param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.Primitives.TemplatedItemsControl`1.ClearContainerForItemOverride(System.Windows.DependencyObject,System.Object)">
|
||||
<summary>When overridden in a derived class, undoes the effects of the PrepareContainerForItemOverride method.</summary>
|
||||
<param name="element">The container element.</param>
|
||||
<param name="item">The item.</param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.Primitives.TemplatedItemsControl`1.GetContainer(System.Object)">
|
||||
<summary>Gets the container associated with the specified item.</summary>
|
||||
<returns>Associated container.</returns>
|
||||
<param name="item">Specified item.</param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.Primitives.TemplatedItemsControl`1.GetContainerForItemOverride">
|
||||
<summary>Creates or identifies the element that is used to display the given item.</summary>
|
||||
<returns>Returns the element for the container.</returns>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.Primitives.TemplatedItemsControl`1.GetItem(`0)">
|
||||
<summary>Gets the item associated with the specified container.</summary>
|
||||
<returns>Associated item.</returns>
|
||||
<param name="container">Specified container.</param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.Primitives.TemplatedItemsControl`1.IsItemItsOwnContainerOverride(System.Object)">
|
||||
<summary>Determines if the specified item is (or is eligible to be) its own container.</summary>
|
||||
<returns>Returns a value indicating whether the item is its own container.</returns>
|
||||
<param name="item">The item instance.</param>
|
||||
</member>
|
||||
<member name="P:Microsoft.Phone.Controls.Primitives.TemplatedItemsControl`1.ItemContainerStyle">
|
||||
<summary>Gets or sets the ItemContainerStyle.</summary>
|
||||
<returns>Returns
|
||||
<see cref="T:System.Windows.Style" />
|
||||
.</returns>
|
||||
</member>
|
||||
<member name="F:Microsoft.Phone.Controls.Primitives.TemplatedItemsControl`1.ItemContainerStyleProperty">
|
||||
<summary>Identifies the ItemContainerStyle dependency property.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Phone.Controls.Primitives.TemplatedItemsControl`1.PrepareContainerForItemOverride(System.Windows.DependencyObject,System.Object)">
|
||||
<summary>Prepares the container to display the specified item.</summary>
|
||||
<param name="element">The container element used to display the specified item.</param>
|
||||
<param name="item">The item to display.</param>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
|
@ -0,0 +1,32 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Deployment xmlns="http://schemas.microsoft.com/windowsphone/2009/deployment" AppPlatformVersion="7.1">
|
||||
<App xmlns="" ProductID="{6d780579-fa49-4d31-8f49-dae15edfd168}" Title="MediaViewer" RuntimeType="Silverlight" Version="1.0.0.0" Genre="apps.normal" Author="MediaViewer author" Description="Sample description" Publisher="MediaViewer">
|
||||
<IconPath IsRelative="true" IsResource="false">ApplicationIcon.png</IconPath>
|
||||
<Capabilities>
|
||||
<Capability Name="ID_CAP_GAMERSERVICES" />
|
||||
<Capability Name="ID_CAP_IDENTITY_DEVICE" />
|
||||
<Capability Name="ID_CAP_IDENTITY_USER" />
|
||||
<Capability Name="ID_CAP_LOCATION" />
|
||||
<Capability Name="ID_CAP_MEDIALIB" />
|
||||
<Capability Name="ID_CAP_MICROPHONE" />
|
||||
<Capability Name="ID_CAP_NETWORKING" />
|
||||
<Capability Name="ID_CAP_PHONEDIALER" />
|
||||
<Capability Name="ID_CAP_PUSH_NOTIFICATION" />
|
||||
<Capability Name="ID_CAP_SENSORS" />
|
||||
<Capability Name="ID_CAP_WEBBROWSERCOMPONENT" />
|
||||
</Capabilities>
|
||||
<Tasks>
|
||||
<DefaultTask Name="_default" NavigationPage="MainPage.xaml" />
|
||||
</Tasks>
|
||||
<Tokens>
|
||||
<PrimaryToken TokenID="MediaViewerToken" TaskName="_default">
|
||||
<TemplateType5>
|
||||
<BackgroundImageURI IsRelative="true" IsResource="false">Background.png</BackgroundImageURI>
|
||||
<Count>0</Count>
|
||||
<Title>MediaViewer</Title>
|
||||
</TemplateType5>
|
||||
</PrimaryToken>
|
||||
</Tokens>
|
||||
</App>
|
||||
</Deployment>
|
||||
<!-- WPSDK Version 7.1.7720.0 -->
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 39 KiB |
|
@ -0,0 +1,56 @@
|
|||
using System;
|
||||
using System.Net;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Ink;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace MediaViewer.Converters
|
||||
{
|
||||
/// <summary>
|
||||
/// Converter for song duration value
|
||||
/// </summary>
|
||||
public class DurationValueConverter : IValueConverter
|
||||
{
|
||||
/// <summary>
|
||||
/// Converts TimeSpan representation of duration to string representation
|
||||
/// </summary>
|
||||
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
if (value == null)
|
||||
return null;
|
||||
|
||||
TimeSpan d = (TimeSpan)value;
|
||||
int s = d.Seconds;
|
||||
String seconds = s.ToString();
|
||||
|
||||
if (s < 10)
|
||||
{
|
||||
seconds = "0" + seconds;
|
||||
}
|
||||
|
||||
string duration = d.Minutes + ":" + seconds;
|
||||
|
||||
return duration;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts back string duration representation to TimeSpan representation
|
||||
/// </summary>
|
||||
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
string strValue = value as string;
|
||||
TimeSpan resultDateTime;
|
||||
if (TimeSpan.TryParse(strValue, out resultDateTime))
|
||||
{
|
||||
return resultDateTime;
|
||||
}
|
||||
return DependencyProperty.UnsetValue;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
using System.Net;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Ink;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Shapes;
|
||||
using Microsoft.Xna.Framework.Media;
|
||||
|
||||
namespace MediaViewer.Converters
|
||||
{
|
||||
public class PictureConverter : IValueConverter
|
||||
{
|
||||
|
||||
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
if (value == null)
|
||||
return null;
|
||||
|
||||
Picture picture = (Picture)value; ;
|
||||
string duration = "sds";
|
||||
|
||||
return duration;
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,121 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>10.0.20506</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{9FC6E75D-360E-4E91-A735-79F1135E0253}</ProjectGuid>
|
||||
<ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>MediaViewer</RootNamespace>
|
||||
<AssemblyName>MediaViewer</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
|
||||
<TargetFrameworkProfile>WindowsPhone</TargetFrameworkProfile>
|
||||
<TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
|
||||
<SilverlightApplication>true</SilverlightApplication>
|
||||
<SupportedCultures>
|
||||
</SupportedCultures>
|
||||
<XapOutputs>true</XapOutputs>
|
||||
<GenerateSilverlightManifest>true</GenerateSilverlightManifest>
|
||||
<XapFilename>MediaViewer.xap</XapFilename>
|
||||
<SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
|
||||
<SilverlightAppEntry>MediaViewer.App</SilverlightAppEntry>
|
||||
<ValidateXaml>true</ValidateXaml>
|
||||
<ThrowErrorsInValidation>true</ThrowErrorsInValidation>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>Bin\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
|
||||
<NoStdLib>true</NoStdLib>
|
||||
<NoConfig>true</NoConfig>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>Bin\Release</OutputPath>
|
||||
<DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
|
||||
<NoStdLib>true</NoStdLib>
|
||||
<NoConfig>true</NoConfig>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.Phone" />
|
||||
<Reference Include="Microsoft.Phone.Controls, Version=7.0.0.0, Culture=neutral, PublicKeyToken=24eec0d8c86cda1e, processorArchitecture=MSIL" />
|
||||
<Reference Include="Microsoft.Phone.Interop" />
|
||||
<Reference Include="Microsoft.Xna.Framework" />
|
||||
<Reference Include="System.Windows" />
|
||||
<Reference Include="system" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Net" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="App.xaml.cs">
|
||||
<DependentUpon>App.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Pages\MainPage.xaml.cs">
|
||||
<DependentUpon>MainPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Pages\PicturePreviewPage.xaml.cs">
|
||||
<DependentUpon>PicturePreviewPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Pages\SongDetailsPage.xaml.cs">
|
||||
<DependentUpon>SongDetailsPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ViewModels\CategoryDetailsViewModel.cs" />
|
||||
<Compile Include="ViewModels\CategoryItem.cs" />
|
||||
<Compile Include="Converters\DurationValueConverter.cs" />
|
||||
<Compile Include="ViewModels\MusicCategoryModel.cs" />
|
||||
<Compile Include="ViewModels\PicturePreviewModel.cs" />
|
||||
<Compile Include="ViewModels\PicturesCategoryModel.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ApplicationDefinition Include="App.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</ApplicationDefinition>
|
||||
<Page Include="Pages\MainPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Pages\PicturePreviewPage.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Pages\SongDetailsPage.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Properties\AppManifest.xml" />
|
||||
<None Include="Properties\WMAppManifest.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="mediaviewer-silverlight-icon.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="SplashScreenImage.jpg" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.$(TargetFrameworkProfile).Overrides.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<ProjectExtensions />
|
||||
</Project>
|
|
@ -0,0 +1,46 @@
|
|||
<phone:PhoneApplicationPage
|
||||
x:Class="MediaViewer.MainPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
|
||||
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
|
||||
xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||
SupportedOrientations="Portrait" Orientation="Portrait"
|
||||
shell:SystemTray.IsVisible="True">
|
||||
|
||||
|
||||
<!--LayoutRoot is the root grid where all page content is placed-->
|
||||
<Grid x:Name="LayoutRoot" Background="Transparent">
|
||||
<!--Pivot Control-->
|
||||
<controls:Pivot Name="PivotControl">
|
||||
<controls:Pivot.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Name}"/>
|
||||
</DataTemplate>
|
||||
</controls:Pivot.HeaderTemplate>
|
||||
<controls:Pivot.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<ListBox Name="ItemsListBox" ItemsSource="{Binding Items}" SelectionChanged="ItemsListBox_SelectionChanged">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Vertical">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding MainName}" MaxWidth="440" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}"/>
|
||||
</StackPanel>
|
||||
<TextBlock Text="{Binding SubName}" MaxWidth="440" TextWrapping="Wrap" Style="{StaticResource PhoneTextSmallStyle}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</DataTemplate>
|
||||
</controls:Pivot.ItemTemplate>
|
||||
</controls:Pivot>
|
||||
</Grid>
|
||||
|
||||
</phone:PhoneApplicationPage>
|
|
@ -0,0 +1,82 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Shapes;
|
||||
using Microsoft.Phone.Controls;
|
||||
|
||||
using MediaViewer.ViewModels;
|
||||
|
||||
namespace MediaViewer
|
||||
{
|
||||
/// <summary>
|
||||
/// Main page class
|
||||
/// </summary>
|
||||
public partial class MainPage : PhoneApplicationPage
|
||||
{
|
||||
// reference to current Application
|
||||
private App app;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
public MainPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
app = Application.Current as App;
|
||||
|
||||
List<CategoryDetailsViewModel> items = new List<CategoryDetailsViewModel>();
|
||||
|
||||
items.Add(app.PicturesModel);
|
||||
items.Add(app.MusicModel);
|
||||
|
||||
// set a list containing both pictures and music model as item source for main pivot
|
||||
PivotControl.ItemsSource = items;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Event handler for PicturesListBox SelectionChanged event
|
||||
/// </summary>
|
||||
private void ItemsListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
ListBox list = (ListBox)sender;
|
||||
|
||||
int selectedCategoryIndex = list.SelectedIndex;
|
||||
|
||||
// If selected index is -1 (no selection) do nothing
|
||||
if (selectedCategoryIndex == -1)
|
||||
return;
|
||||
|
||||
List<CategoryDetailsViewModel> model = PivotControl.ItemsSource as List<CategoryDetailsViewModel>;
|
||||
|
||||
// check the model assigned to current pivot item and navigate, depending on the result, to proper page
|
||||
if (model[PivotControl.SelectedIndex].IsAnyItemAvailable())
|
||||
{
|
||||
if (model[PivotControl.SelectedIndex].PrepareItemForPreview(selectedCategoryIndex))
|
||||
{
|
||||
if (model[PivotControl.SelectedIndex] is MusicCategoryModel)
|
||||
{
|
||||
NavigationService.Navigate(new Uri("/Pages/SongDetailsPage.xaml?SelectedItem=" + selectedCategoryIndex, UriKind.Relative));
|
||||
}
|
||||
else if (model[PivotControl.SelectedIndex] is PicturesCategoryModel)
|
||||
{
|
||||
NavigationService.Navigate(new Uri("/Pages/PicturePreviewPage.xaml?SelectedItem=" + selectedCategoryIndex, UriKind.Relative));
|
||||
}
|
||||
}
|
||||
// show warining dialog it there are any probles with previewing selected item
|
||||
else
|
||||
MessageBox.Show("Warining!\n\nUnable to open selected file.\nMake sure that your device is disconnected from the computer.");
|
||||
}
|
||||
|
||||
// Reset selected index to -1 (no selection)
|
||||
list.SelectedIndex = -1;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
<phone:PhoneApplicationPage
|
||||
x:Class="MediaViewer.PicturePreviewPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
|
||||
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
|
||||
xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||
SupportedOrientations="Portrait" Orientation="Portrait"
|
||||
mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
|
||||
shell:SystemTray.IsVisible="True">
|
||||
|
||||
<Grid x:Name="LayoutRoot" Background="Transparent">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<TextBlock Text="Picture preview" Margin="24,0,0,20" Style="{StaticResource PhoneTextExtraLargeStyle}"/>
|
||||
<ScrollViewer >
|
||||
<StackPanel>
|
||||
<Image Name="image1" Margin="12,0,12,0" Stretch="Uniform" Source="{Binding ImageSource}" HorizontalAlignment="Center" Width="456"/>
|
||||
<TextBlock Text="Name" Style="{StaticResource DescriptionItemTitleStyle}"/>
|
||||
<TextBlock Text="{Binding Title}" TextWrapping="Wrap" Style="{StaticResource DescriptionItemContentStyle}"/>
|
||||
<TextBlock Text="Created:" Style="{StaticResource DescriptionItemTitleStyle}"/>
|
||||
<TextBlock Text="{Binding Created}" TextWrapping="Wrap" Style="{StaticResource DescriptionItemContentStyle}"/>
|
||||
<TextBlock Text="Resolution:" Style="{StaticResource DescriptionItemTitleStyle}"/>
|
||||
<TextBlock Text="{Binding Resolution}" TextWrapping="Wrap" Style="{StaticResource DescriptionItemContentStyle}"/>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
</phone:PhoneApplicationPage>
|
|
@ -0,0 +1,51 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Shapes;
|
||||
using Microsoft.Phone.Controls;
|
||||
|
||||
using MediaViewer.ViewModels;
|
||||
|
||||
namespace MediaViewer
|
||||
{
|
||||
/// <summary>
|
||||
/// Pictures preview page
|
||||
/// </summary>
|
||||
public partial class PicturePreviewPage : PhoneApplicationPage
|
||||
{
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
public PicturePreviewPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// From PhoneApplicationPage.
|
||||
/// Called when a page becomes the active page in a frame.
|
||||
/// </summary>
|
||||
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
|
||||
{
|
||||
string selectedIndex;
|
||||
|
||||
// check if navigation context contains selectedItem query string, if so get the value to obtain selected item index
|
||||
if (NavigationContext.QueryString.TryGetValue("SelectedItem", out selectedIndex))
|
||||
{
|
||||
int selIndex = int.Parse(selectedIndex);
|
||||
|
||||
PicturesCategoryModel model = ((App)Application.Current).PicturesModel;
|
||||
|
||||
// set model for selected image as a data context for page
|
||||
DataContext = model.GetModelForItem(selIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
<phone:PhoneApplicationPage
|
||||
x:Class="MediaViewer.SongPreviewPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
|
||||
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
|
||||
xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
|
||||
xmlns:converters="clr-namespace:MediaViewer.Converters"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||
SupportedOrientations="Portrait" Orientation="Portrait"
|
||||
mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
|
||||
shell:SystemTray.IsVisible="True">
|
||||
|
||||
|
||||
<UserControl.Resources>
|
||||
<converters:DurationValueConverter x:Name="DurationValueConverter" />
|
||||
</UserControl.Resources>
|
||||
|
||||
<Grid x:Name="LayoutRoot" Background="Transparent">
|
||||
<StackPanel>
|
||||
<TextBlock Text="Song details" Margin="24,0,0,24" Style="{StaticResource PhoneTextExtraLargeStyle}"/>
|
||||
<TextBlock Text="Title:" Style="{StaticResource DescriptionItemTitleStyle}"/>
|
||||
<TextBlock Text="{Binding Name}" TextWrapping="Wrap" Style="{StaticResource DescriptionItemContentStyle}"/>
|
||||
<TextBlock Text="Artist:" Style="{StaticResource DescriptionItemTitleStyle}"/>
|
||||
<TextBlock Text="{Binding Artist}" TextWrapping="Wrap" Style="{StaticResource DescriptionItemContentStyle}"/>
|
||||
<TextBlock Text="Album:" Style="{StaticResource DescriptionItemTitleStyle}"/>
|
||||
<TextBlock Text="{Binding Album}" TextWrapping="Wrap" Style="{StaticResource DescriptionItemContentStyle}"/>
|
||||
<TextBlock Text="Genre:" Style="{StaticResource DescriptionItemTitleStyle}"/>
|
||||
<TextBlock Text="{Binding Genre}" TextWrapping="Wrap" Style="{StaticResource DescriptionItemContentStyle}"/>
|
||||
<TextBlock Text="Duration:" Style="{StaticResource DescriptionItemTitleStyle}"/>
|
||||
<TextBlock Text="{Binding Duration, Converter={StaticResource DurationValueConverter}}" Style="{StaticResource DescriptionItemContentStyle}"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
</phone:PhoneApplicationPage>
|
|
@ -0,0 +1,61 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Shapes;
|
||||
using Microsoft.Phone.Controls;
|
||||
using Microsoft.Xna.Framework.Media;
|
||||
using Microsoft.Xna.Framework;
|
||||
|
||||
using MediaViewer.ViewModels;
|
||||
|
||||
namespace MediaViewer
|
||||
{
|
||||
/// <summary>
|
||||
/// Song details page class.
|
||||
/// </summary>
|
||||
public partial class SongPreviewPage : PhoneApplicationPage
|
||||
{
|
||||
public SongPreviewPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// From PhoneApplicationPage.
|
||||
/// Called when a page becomes the active page in a frame.
|
||||
/// </summary>
|
||||
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
|
||||
{
|
||||
string selectedIndex;
|
||||
|
||||
// check if navigation context contains selectedItem query string, if so get the value to obtain selected item index
|
||||
if (NavigationContext.QueryString.TryGetValue("SelectedItem", out selectedIndex))
|
||||
{
|
||||
int selIndex = int.Parse(selectedIndex);
|
||||
|
||||
MusicCategoryModel model = ((App)Application.Current).MusicModel;
|
||||
|
||||
// set data context for the page
|
||||
DataContext = model.GetModelForIndex(selIndex);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// From PhoneApplicationPage.
|
||||
/// Called when a page is no longer the active page in a frame
|
||||
/// </summary>
|
||||
protected override void OnNavigatedFrom(System.Windows.Navigation.NavigationEventArgs e)
|
||||
{
|
||||
// stop playback
|
||||
MediaPlayer.Stop();
|
||||
base.OnNavigatedFrom(e);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
>
|
||||
<Deployment.Parts>
|
||||
</Deployment.Parts>
|
||||
</Deployment>
|
|
@ -0,0 +1,35 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("MediaViewer")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Microsoft")]
|
||||
[assembly: AssemblyProduct("MediaViewer")]
|
||||
[assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("afcde2ed-2ce0-4670-8b78-d1a5a6080283")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
@ -0,0 +1,31 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Deployment xmlns="http://schemas.microsoft.com/windowsphone/2009/deployment" AppPlatformVersion="7.0">
|
||||
<App xmlns="" ProductID="{6d780579-fa49-4d31-8f49-dae15edfd168}" Title="MediaViewer" RuntimeType="Silverlight" Version="1.0.0.0" Genre="apps.normal" Author="MediaViewer author" Description="Sample description" Publisher="MediaViewer">
|
||||
<IconPath IsRelative="true" IsResource="false">mediaviewer-silverlight-icon.png</IconPath>
|
||||
<Capabilities>
|
||||
<Capability Name="ID_CAP_GAMERSERVICES" />
|
||||
<Capability Name="ID_CAP_IDENTITY_DEVICE" />
|
||||
<Capability Name="ID_CAP_IDENTITY_USER" />
|
||||
<Capability Name="ID_CAP_LOCATION" />
|
||||
<Capability Name="ID_CAP_MEDIALIB" />
|
||||
<Capability Name="ID_CAP_MICROPHONE" />
|
||||
<Capability Name="ID_CAP_NETWORKING" />
|
||||
<Capability Name="ID_CAP_PHONEDIALER" />
|
||||
<Capability Name="ID_CAP_PUSH_NOTIFICATION" />
|
||||
<Capability Name="ID_CAP_SENSORS" />
|
||||
<Capability Name="ID_CAP_WEBBROWSERCOMPONENT" />
|
||||
</Capabilities>
|
||||
<Tasks>
|
||||
<DefaultTask Name="_default" NavigationPage="Pages/MainPage.xaml" />
|
||||
</Tasks>
|
||||
<Tokens>
|
||||
<PrimaryToken TokenID="MediaViewerToken" TaskName="_default">
|
||||
<TemplateType5>
|
||||
<BackgroundImageURI IsRelative="true" IsResource="false">mediaviewer-silverlight-icon.png</BackgroundImageURI>
|
||||
<Count>0</Count>
|
||||
<Title>MediaViewer</Title>
|
||||
</TemplateType5>
|
||||
</PrimaryToken>
|
||||
</Tokens>
|
||||
</App>
|
||||
</Deployment>
|
|
@ -0,0 +1,16 @@
|
|||
<local:MainViewModel
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:MediaViewer"
|
||||
SampleProperty="Sample Text Property Value">
|
||||
|
||||
<local:MainViewModel.Items>
|
||||
<local:ItemViewModel LineOne="design one" LineTwo="Maecenas praesent accumsan bibendum" LineThree="Maecenas praesent accumsan bibendum dictumst eleifend facilisi faucibus habitant inceptos interdum lobortis nascetur"/>
|
||||
<local:ItemViewModel LineOne="design two" LineTwo="Dictumst eleifend facilisi faucibus" LineThree="Pharetra placerat pulvinar sagittis senectus sociosqu suscipit torquent ultrices vehicula volutpat maecenas praesent"/>
|
||||
<local:ItemViewModel LineOne="design three" LineTwo="Habitant inceptos interdum lobortis" LineThree="Accumsan bibendum dictumst eleifend facilisi faucibus habitant inceptos interdum lobortis nascetur pharetra placerat"/>
|
||||
<local:ItemViewModel LineOne="design four" LineTwo="Nascetur pharetra placerat pulvinar" LineThree="Pulvinar sagittis senectus sociosqu suscipit torquent ultrices vehicula volutpat maecenas praesent accumsan bibendum"/>
|
||||
<local:ItemViewModel LineOne="design five" LineTwo="Sagittis senectus sociosqu suscipit" LineThree="Dictumst eleifend facilisi faucibus habitant inceptos interdum lobortis nascetur pharetra placerat pulvinar sagittis"/>
|
||||
<local:ItemViewModel LineOne="design six" LineTwo="Torquent ultrices vehicula volutpat" LineThree="Senectus sociosqu suscipit torquent ultrices vehicula volutpat maecenas praesent accumsan bibendum dictumst eleifend"/>
|
||||
</local:MainViewModel.Items>
|
||||
|
||||
</local:MainViewModel>
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 9.2 KiB |
|
@ -0,0 +1,52 @@
|
|||
using System;
|
||||
using System.Net;
|
||||
using System.ComponentModel;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Ink;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.Xna.Framework.Media;
|
||||
|
||||
namespace MediaViewer.ViewModels
|
||||
{
|
||||
/// <summary>
|
||||
/// Base class for category models
|
||||
/// </summary>
|
||||
public abstract class CategoryDetailsViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// List of the category items. Category items are binded to the list displayed on main page.
|
||||
/// </summary>
|
||||
public abstract List<CategoryItem> Items{ get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// Category name
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Check if there is any item available
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// true if there is any valid item available, false otherwise
|
||||
/// </returns>
|
||||
public virtual bool IsAnyItemAvailable() { return false; }
|
||||
|
||||
/// <summary>
|
||||
/// prepares selected item to preview
|
||||
/// </summary>
|
||||
/// <param name="itemIndex">
|
||||
/// index of the selected item
|
||||
/// </param>
|
||||
/// <returns>
|
||||
/// true if item is prepared successfully, false otherwise
|
||||
/// </returns>
|
||||
public virtual bool PrepareItemForPreview(int itemIndex) { return false; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
using System;
|
||||
using System.Net;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Ink;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace MediaViewer.ViewModels
|
||||
{
|
||||
/// <summary>
|
||||
/// Class representing single category list item
|
||||
/// </summary>
|
||||
public class CategoryItem
|
||||
{
|
||||
/// <summary>
|
||||
/// Main name of the item
|
||||
/// </summary>
|
||||
public string MainName { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Subname of the item
|
||||
/// </summary>
|
||||
public string SubName { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
public CategoryItem(string mainName, string subName)
|
||||
{
|
||||
MainName = mainName;
|
||||
SubName = subName;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,136 @@
|
|||
using System;
|
||||
using System.Net;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Ink;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Media;
|
||||
|
||||
namespace MediaViewer.ViewModels
|
||||
{
|
||||
/// <summary>
|
||||
/// Model for music category
|
||||
/// </summary>
|
||||
public class MusicCategoryModel : CategoryDetailsViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// List of songs in music category
|
||||
/// </summary>
|
||||
private List<Song> Songs { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Overriden property from CategoryDetailsViewModel
|
||||
/// </summary>
|
||||
public override List<CategoryItem> Items
|
||||
{
|
||||
get
|
||||
{
|
||||
List<CategoryItem> names = new List<CategoryItem>();
|
||||
|
||||
// if there are no songs on the list add one fake item saying that there are no items to display
|
||||
if (Songs.Count == 0)
|
||||
names.Add(new CategoryItem("No items to display...", ""));
|
||||
else
|
||||
{
|
||||
foreach (Song song in Songs)
|
||||
{
|
||||
names.Add(new CategoryItem(song.Name, song.Artist.Name));
|
||||
}
|
||||
}
|
||||
return names;
|
||||
}
|
||||
protected set
|
||||
{
|
||||
Items = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
public MusicCategoryModel(string name, List<Song> songs)
|
||||
{
|
||||
Songs = songs;
|
||||
Name = name;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// From CategoryDetailsViewModel.
|
||||
/// Check if there is any item available.
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// true if there is any valid item available, false otherwise
|
||||
/// </returns>
|
||||
public override bool IsAnyItemAvailable()
|
||||
{
|
||||
if (Songs.Count != 0)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets song object that is used for song details page
|
||||
/// </summary>
|
||||
/// <param name="itemIndex">
|
||||
/// index of the selected song
|
||||
/// </param>
|
||||
/// <returns>
|
||||
/// selected song
|
||||
/// </returns>
|
||||
public Song GetModelForIndex(int itemIndex)
|
||||
{
|
||||
if (itemIndex < Songs.Count)
|
||||
return Songs[itemIndex];
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Plays selected song
|
||||
/// </summary>
|
||||
public void PlaySong(int songIndex)
|
||||
{
|
||||
FrameworkDispatcher.Update();
|
||||
MediaPlayer.Play(Songs[songIndex]);
|
||||
}
|
||||
/// <summary>
|
||||
/// Stops playback
|
||||
/// </summary>
|
||||
public void StopPlayback()
|
||||
{
|
||||
MediaPlayer.Stop();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// From CategoryDetailsViewModel
|
||||
/// tries to play selected song and returns false in case of any problems
|
||||
/// </summary>
|
||||
/// <param name="itemIndex">
|
||||
/// index of the selected item
|
||||
/// </param>
|
||||
/// <returns>
|
||||
/// true if song can be played, false otherwise
|
||||
/// </returns>
|
||||
public override bool PrepareItemForPreview(int itemIndex)
|
||||
{
|
||||
try
|
||||
{
|
||||
FrameworkDispatcher.Update();
|
||||
MediaPlayer.Play(Songs[itemIndex]);
|
||||
return true;
|
||||
}
|
||||
catch (InvalidOperationException exception)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
using System;
|
||||
using System.Net;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Ink;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Media.Imaging;
|
||||
using Microsoft.Xna.Framework.Media;
|
||||
|
||||
namespace MediaViewer.ViewModels
|
||||
{
|
||||
/// <summary>
|
||||
/// Model for picture preview page
|
||||
/// </summary>
|
||||
public class PicturePreviewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Title of the picture
|
||||
/// </summary>
|
||||
public string Title { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Creation date
|
||||
/// </summary>
|
||||
public string Created { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Resolution of the picture
|
||||
/// </summary>
|
||||
public string Resolution { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Image source
|
||||
/// </summary>
|
||||
public BitmapImage ImageSource { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
public PicturePreviewModel(Picture picture)
|
||||
{
|
||||
Title = picture.Name;
|
||||
|
||||
Created = picture.Date.ToString();
|
||||
|
||||
Resolution = picture.Height.ToString() + "x" + picture.Width.ToString();
|
||||
|
||||
// load source of the image
|
||||
ImageSource = new BitmapImage();
|
||||
System.IO.Stream stream = picture.GetImage();
|
||||
|
||||
ImageSource.SetSource(stream);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,127 @@
|
|||
using System;
|
||||
using System.Net;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Ink;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.Xna.Framework.Media;
|
||||
|
||||
namespace MediaViewer.ViewModels
|
||||
{
|
||||
/// <summary>
|
||||
/// Model for pictures category
|
||||
/// </summary>
|
||||
public class PicturesCategoryModel : CategoryDetailsViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// List of pictures for pictures category
|
||||
/// </summary>
|
||||
private List<Picture> Pictures { get; set; }
|
||||
|
||||
private PicturePreviewModel currentItemModel = null;
|
||||
|
||||
/// <summary>
|
||||
/// Overriden property from CategoryDetailsViewModel
|
||||
/// </summary>
|
||||
public override List<CategoryItem> Items
|
||||
{
|
||||
get
|
||||
{
|
||||
// returns list of categor items basing on Pictures list
|
||||
List<CategoryItem> names = new List<CategoryItem>();
|
||||
|
||||
// if there are no songs on the list add one fake item saying that there are no items to display
|
||||
if (Pictures.Count == 0)
|
||||
names.Add(new CategoryItem("No items to display...", ""));
|
||||
else
|
||||
{
|
||||
foreach (Picture picture in Pictures)
|
||||
{
|
||||
names.Add(new CategoryItem(picture.Name, picture.Date.ToString()));
|
||||
}
|
||||
}
|
||||
return names;
|
||||
}
|
||||
protected set
|
||||
{
|
||||
Items = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
public PicturesCategoryModel(string name, List<Picture> pictures)
|
||||
{
|
||||
Name = name;
|
||||
|
||||
Pictures = pictures;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// From CategoryDetailsViewModel.
|
||||
/// Check if there is any item available.
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// true if there is any valid item available, false otherwise
|
||||
/// </returns>
|
||||
public override bool IsAnyItemAvailable()
|
||||
{
|
||||
if (Pictures.Count != 0)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets pictures model for picture preview page
|
||||
/// </summary>
|
||||
/// <param name="itemIndex">
|
||||
/// index of the selected picture
|
||||
/// </param>
|
||||
/// <returns>
|
||||
/// model based on selected picture
|
||||
/// </returns>
|
||||
public PicturePreviewModel GetModelForItem(int itemIndex)
|
||||
{
|
||||
return currentItemModel;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// From CategoryDetailsViewModel
|
||||
/// prepares picture to preview and check if there are any problems with creating model
|
||||
/// </summary>
|
||||
/// <param name="itemIndex">
|
||||
/// index of the selected item
|
||||
/// </param>
|
||||
/// <returns>
|
||||
/// true if item succesfully prepared for preview, false otherwise
|
||||
/// </returns>
|
||||
public override bool PrepareItemForPreview(int itemIndex)
|
||||
{
|
||||
if (itemIndex < Pictures.Count)
|
||||
{
|
||||
// catch InvalidOperationException and return false in this case
|
||||
// this exception is thrown on WP7 7.0 when device is connected to the computer
|
||||
try
|
||||
{
|
||||
currentItemModel = new PicturePreviewModel(Pictures[itemIndex]);
|
||||
return true;
|
||||
}
|
||||
catch (InvalidOperationException exception)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 39 KiB |
142
README.md
142
README.md
|
@ -1,4 +1,140 @@
|
|||
media-viewer
|
||||
============
|
||||
Media Viewer example
|
||||
====================
|
||||
|
||||
Simple example for browsing photos and music on Windows Phone. Media Viewer Silverlight is based on FileList example application implemented with Qt Quick.
|
||||
Media Viewer is a Windows Phone example application implemented with
|
||||
Silverlight. The application is ported from the FileList Qt Quick example.
|
||||
|
||||
Media Viewer enables the user to explore a list of pictures and music files
|
||||
stored on their device. It's also possible to preview an image, play a music
|
||||
file, and check the details of the selected file on a separate page.
|
||||
|
||||
This example application is hosted in GitHub:
|
||||
https://github.com/nokia-developer/media-viewer
|
||||
|
||||
For more information on porting, visit the wiki page:
|
||||
https://github.com/nokia-developer/media-viewer/wiki
|
||||
|
||||
|
||||
1. Prerequisites
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
- C# basics
|
||||
- Development environment 'Microsoft Visual Studio 2010 Express for Windows
|
||||
Phone'
|
||||
|
||||
|
||||
2. Project Structure
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
2.1 Folders
|
||||
-----------
|
||||
|
||||
| The root folder contains the project file, App.xaml file,
|
||||
| resource files, license information, and this file
|
||||
| (release notes).
|
||||
|
|
||||
|- Pages Contains pages .xaml and xaml.cs files
|
||||
|
|
||||
|- ViewModels Contains model classes for views
|
||||
|
|
||||
|- Converters Contains value converter classes
|
||||
|
||||
|
||||
2.2 Important files/classes
|
||||
---------------------------
|
||||
|
||||
| File | Description |
|
||||
|---------------------------|--------------------------------------------------|
|
||||
| App.xaml | Encapsulates a Silverlight application |
|
||||
|---------------------------|--------------------------------------------------|
|
||||
| MainPage.xaml | Main page implementation containg pivot whose |
|
||||
| | items represent pictures and music categories |
|
||||
|---------------------------|--------------------------------------------------|
|
||||
| PicturePreviewPage.xaml | Picture preview page implementation |
|
||||
|---------------------------|--------------------------------------------------|
|
||||
| SongDetailsPage.xaml | Song details page implementation |
|
||||
|---------------------------|--------------------------------------------------|
|
||||
| CategoryDetailsModel.cs | Base class for category models |
|
||||
|---------------------------|--------------------------------------------------|
|
||||
| PicturesCategoryModel.cs | Model used for pivot pictures category item |
|
||||
|---------------------------|--------------------------------------------------|
|
||||
| MusicCategoryModel.cs | Model used for pivot music category item |
|
||||
|---------------------------|--------------------------------------------------|
|
||||
| PicturesPreviewModel.sc | Model for picture preview page |
|
||||
|---------------------------|--------------------------------------------------|
|
||||
|
||||
|
||||
3. Known Issues
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
None.
|
||||
|
||||
|
||||
4. Build and Installation Instructions
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
4.1 Preparations
|
||||
----------------
|
||||
|
||||
Make sure you have the following installed:
|
||||
* Windows 7, may also work on Windows XP
|
||||
* Microsoft Visual Studio 2010 Express for Windows Phone
|
||||
* The Windows Phone Developer Tools January 2011 Update:
|
||||
http://download.microsoft.com/download/6/D/6/6D66958D-891B-4C0E-BC32-2DFC41917B11/WindowsPhoneDeveloperResources_en-US_Patch1.msp
|
||||
* Windows Phone Developer Tools Fix:
|
||||
http://download.microsoft.com/download/6/D/6/6D66958D-891B-4C0E-BC32-2DFC41917B11/VS10-KB2486994-x86.exe
|
||||
|
||||
|
||||
4.2 Build on Microsoft Visual Studio
|
||||
------------------------------------
|
||||
|
||||
1. Open the Solution file (.sln):
|
||||
File > Open Project, select the file MediaViewer.sln
|
||||
2. Select the target 'Windows Phone 7 Emulator'.
|
||||
3. Press F5 to build the project and run it on the Windows Phone Emulator.
|
||||
|
||||
|
||||
4.3 Deploy to Windows Phone 7
|
||||
-----------------------------
|
||||
|
||||
Preparations:
|
||||
1. Register in the App Hub to get a Windows Live ID:
|
||||
http://create.msdn.com/en-us/home/membership
|
||||
2. Install Zune for Windows Phone 7:
|
||||
http://www.zune.net/en-us/products/windowsphone7/default.htm
|
||||
3. Register your phone in your Windows Live account.
|
||||
Select from Windows: Start > Windows Phone Developer Tools > Windows Phone
|
||||
Developer Registration
|
||||
|
||||
Deploy:
|
||||
1. Open the SLN file:
|
||||
File > Open Project, select the file MediaViewer.sln
|
||||
2. Connect the device to Windows via USB.
|
||||
3. Select the target 'Windows Phone 7 Device'.
|
||||
4. Press F5 to build the project and run it on your Windows phone.
|
||||
|
||||
|
||||
5. Compatibility
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
- Windows Phone 7.0 and 7.1
|
||||
|
||||
Tested on:
|
||||
- HTC 7 Mozart
|
||||
- Samsung Omnia 7
|
||||
|
||||
Developed with:
|
||||
- Microsoft Visual Studio 2010 Express for Windows Phone
|
||||
|
||||
|
||||
6. Additional Information
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Getting Started Guide:
|
||||
http://create.msdn.com/en-us/home/getting_started
|
||||
|
||||
Learn About Windows Phone 7 Development:
|
||||
http://msdn.microsoft.com/fi-fi/ff380145
|
||||
|
||||
App Hub, develop for Windows Phone:
|
||||
http://create.msdn.com
|
||||
|
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 39 KiB |
Загрузка…
Ссылка в новой задаче