--- /dev/null
+For the Windows Phone toolkit make sure that you have
+marked the icons in the "Toolkit.Content" folder as content. That way they
+can be used as the icons for the ApplicationBar control.
\ No newline at end of file
//------------------------------------------------------------------------------
// <auto-generated>
// Este código fue generado por una herramienta.
-// Versión de runtime:4.0.30319.17626
+// Versión de runtime:4.0.30319.34014
//
// Los cambios en este archivo podrían causar un comportamiento incorrecto y se perderán si
// se vuelve a generar el código.
// </auto-generated>
//------------------------------------------------------------------------------
-namespace WeatherInformation.Resources
-{
+namespace WeatherInformation.Resources {
using System;
-
-
+
+
/// <summary>
- /// Clase de recurso fuertemente tipado para buscar cadenas traducidas, etc.
+ /// Clase de recurso fuertemente tipado, para buscar cadenas traducidas, etc.
/// </summary>
// StronglyTypedResourceBuilder generó automáticamente esta clase
// a través de una herramienta como ResGen o Visual Studio.
// Para agregar o quitar un miembro, edite el archivo .ResX y, a continuación, vuelva a ejecutar ResGen
- // con la opción /str o recompila tu proyecto de Visual Studio.
+ // con la opción /str o recompile su proyecto de VS.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- public class AppResources
- {
-
+ public class AppResources {
+
private static global::System.Resources.ResourceManager resourceMan;
-
+
private static global::System.Globalization.CultureInfo resourceCulture;
-
+
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal AppResources()
- {
+ internal AppResources() {
}
-
+
/// <summary>
- /// Devuelve la instancia de ResourceManager almacenada en caché usada por esta clase.
+ /// Devuelve la instancia de ResourceManager almacenada en caché utilizada por esta clase.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- public static global::System.Resources.ResourceManager ResourceManager
- {
- get
- {
- if (object.ReferenceEquals(resourceMan, null))
- {
+ public static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WeatherInformation.Resources.AppResources", typeof(AppResources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
-
+
/// <summary>
- /// Invalida la propiedad CurrentUICulture del subproceso actual para todas las
- /// búsquedas de recursos usando esta clase de recursos fuertemente tipados.
+ /// Reemplaza la propiedad CurrentUICulture del subproceso actual para todas las
+ /// búsquedas de recursos mediante esta clase de recurso fuertemente tipado.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- public static global::System.Globalization.CultureInfo Culture
- {
- get
- {
+ public static global::System.Globalization.CultureInfo Culture {
+ get {
return resourceCulture;
}
- set
- {
+ set {
resourceCulture = value;
}
}
-
+
/// <summary>
- /// Busca una cadena traducida similar a LeftToRight.
+ /// Busca una cadena traducida similar a agregar.
/// </summary>
- public static string ResourceFlowDirection
- {
- get
- {
- return ResourceManager.GetString("ResourceFlowDirection", resourceCulture);
+ public static string AppBarButtonText {
+ get {
+ return ResourceManager.GetString("AppBarButtonText", resourceCulture);
}
}
-
+
/// <summary>
- /// Busca una cadena traducida similar a us-EN.
+ /// Busca una cadena traducida similar a Elemento de menú.
/// </summary>
- public static string ResourceLanguage
- {
- get
- {
- return ResourceManager.GetString("ResourceLanguage", resourceCulture);
+ public static string AppBarMenuItemText {
+ get {
+ return ResourceManager.GetString("AppBarMenuItemText", resourceCulture);
}
}
-
+
/// <summary>
/// Busca una cadena traducida similar a MI APLICACIÓN.
/// </summary>
- public static string ApplicationTitle
- {
- get
- {
+ public static string ApplicationTitle {
+ get {
return ResourceManager.GetString("ApplicationTitle", resourceCulture);
}
}
-
+
/// <summary>
- /// Busca una cadena traducida similar a Valor de propiedad en tiempo de ejecución de ejemplo.
+ /// Busca una cadena traducida similar a Language.
/// </summary>
- public static string SampleProperty
- {
- get
- {
- return ResourceManager.GetString("SampleProperty", resourceCulture);
+ public static string LanguageSettingsText {
+ get {
+ return ResourceManager.GetString("LanguageSettingsText", resourceCulture);
}
}
-
+
/// <summary>
- /// Busca una cadena traducida similar al texto del botón.
+ /// Busca una cadena traducida similar a LeftToRight.
/// </summary>
- public static string AppBarButtonText
- {
- get
- {
- return ResourceManager.GetString("AppBarButtonText", resourceCulture);
+ public static string ResourceFlowDirection {
+ get {
+ return ResourceManager.GetString("ResourceFlowDirection", resourceCulture);
}
}
-
+
/// <summary>
- /// Busca una cadena traducida similar a elemento de menú.
+ /// Busca una cadena traducida similar a es-ES.
/// </summary>
- public static string AppBarMenuItemText
- {
- get
- {
- return ResourceManager.GetString("AppBarMenuItemText", resourceCulture);
+ public static string ResourceLanguage {
+ get {
+ return ResourceManager.GetString("ResourceLanguage", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Busca una cadena traducida similar a Valor de propiedad en tiempo de ejecución de ejemplo.
+ /// </summary>
+ public static string SampleProperty {
+ get {
+ return ResourceManager.GetString("SampleProperty", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Busca una cadena traducida similar a Temperature units.
+ /// </summary>
+ public static string TemperatureSettingsText {
+ get {
+ return ResourceManager.GetString("TemperatureSettingsText", resourceCulture);
}
}
}
-}
\ No newline at end of file
+}
<?xml version="1.0" encoding="utf-8"?>
<root>
- <!--
- Microsoft ResX Schema
-
+ <!--
+ Microsoft ResX Schema
+
Version 2.0
-
- The primary goals of this format is to allow a simple XML format
- that is mostly human readable. The generation and parsing of the
- various data types are done through the TypeConverter classes
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
associated with the data types.
-
+
Example:
-
+
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
-
- There are any number of "resheader" rows that contain simple
+
+ There are any number of "resheader" rows that contain simple
name/value pairs.
-
- Each data row contains a name, and value. The row also contains a
- type or mimetype. Type corresponds to a .NET class that support
- text/value conversion through the TypeConverter architecture.
- Classes that don't support this are serialized and stored with the
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
mimetype set.
-
- The mimetype is used for serialized objects, and tells the
- ResXResourceReader how to depersist the object. This is currently not
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
-
- Note - application/x-microsoft.net.object.binary.base64 is the format
- that the ResXResourceWriter will generate, however the reader can
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
-
+
mimetype: application/x-microsoft.net.object.binary.base64
- value : The object must be serialized with
+ value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
-
+
mimetype: application/x-microsoft.net.object.soap.base64
- value : The object must be serialized with
+ value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
- value : The object must be serialized into a byte array
+ value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<data name="AppBarMenuItemText" xml:space="preserve">
<value>Elemento de menú</value>
</data>
+ <data name="LanguageSettingsText" xml:space="preserve">
+ <value>Language</value>
+ <comment>Text in settings page</comment>
+ </data>
+ <data name="TemperatureSettingsText" xml:space="preserve">
+ <value>Temperature units</value>
+ <comment>Text in settings page</comment>
+ </data>
</root>
\ No newline at end of file
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
mc:Ignorable="d"
d:DataContext="{d:DesignData SampleData/SettingsViewModelSampleData.xaml}"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
<phone:Pivot Title="WEATHER INFORMATION">
<!-- Elemento Pivot uno -->
<phone:PivotItem Header="settings">
- <!-- de líneas dobles con ajuste de texto -->
- <phone:LongListSelector x:Name="SettingsList" Margin="0,0,-12,0" ItemsSource="{Binding SettingsItems}" SelectionChanged="LongListSelector_SelectionChanged">
- <phone:LongListSelector.ItemTemplate>
- <DataTemplate>
- <StackPanel Orientation="Vertical" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="0,10" Tap="StackPanel_Tap">
- <TextBlock Text="{Binding LineOne}" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}" HorizontalAlignment="Left" VerticalAlignment="Center" FontWeight="Bold"/>
- <TextBlock Text="{Binding LineTwo}" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24"/>
- </StackPanel>
- </DataTemplate>
- </phone:LongListSelector.ItemTemplate>
- </phone:LongListSelector>
+ <Grid VerticalAlignment="Top">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="*" />
+ <RowDefinition Height="*" />
+ </Grid.RowDefinitions>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="*" />
+ </Grid.ColumnDefinitions>
+ <StackPanel Grid.Column="0" Grid.Row="0" Orientation="Vertical">
+ <TextBox x:Name="TemperatureUnitsText" Text="{Binding LocalizedResources.TemperatureSettingsText, Mode=OneWay, Source={StaticResource LocalizedStrings}}" HorizontalAlignment="Left" Background="Transparent" BorderBrush="Transparent" Foreground="#FFA4A2A2" />
+ <toolkit:ListPicker x:Name="ListUnitsSelection">
+ <toolkit:ListPickerItem x:Name="fahrenheit" Content="fahrenheit" Background="Transparent" />
+ <toolkit:ListPickerItem x:Name="centigrade" Content="centigrade" />
+ </toolkit:ListPicker>
+ </StackPanel>
+ <StackPanel Grid.Column="0" Grid.Row="1" Orientation="Vertical" VerticalAlignment="Center">
+ <TextBox x:Name="LanguageTextBox" Text="{Binding LocalizedResources.LanguageSettingsText, Mode=OneWay, Source={StaticResource LocalizedStrings}}" HorizontalAlignment="Left" Background="Transparent" BorderBrush="Transparent" Foreground="#FFA4A2A2" />
+ <toolkit:ListPicker x:Name="LanguageSelection">
+ <toolkit:ListPickerItem x:Name="english" Content="english" Background="Transparent" />
+ <toolkit:ListPickerItem x:Name="spanish" Content="spanish" />
+ </toolkit:ListPicker>
+ </StackPanel>
+ </Grid>
</phone:PivotItem>
<!-- Elemento Pivot dos -->
<phone:PivotItem Header="notifications">
<Grid/>
</phone:PivotItem>
-
+
</phone:Pivot>
+ <phone:LongListSelector HorizontalAlignment="Left" Height="100" Margin="825,108,-445,0" VerticalAlignment="Top" Width="100"/>
</Grid>
- <phone:PhoneApplicationPage.Resources>
- <DataTemplate x:Key="LongListGroupHeader">
- <Grid Margin="12,0,0,0">
- <Grid Width="75" Height="75" HorizontalAlignment="Left">
- <TextBlock Margin="12,0,1,7" TextWrapping="Wrap" d:LayoutOverrides="Width, Height" Style="{StaticResource PhoneTextLargeStyle}" Text="{Binding Title}" VerticalAlignment="Bottom"/>
- <Border BorderThickness="1">
- <Border.BorderBrush>
- <SolidColorBrush Color="{StaticResource PhoneAccentColor}"/>
- </Border.BorderBrush>
- </Border>
- </Grid>
- </Grid>
- </DataTemplate>
- </phone:PhoneApplicationPage.Resources>
-
</phone:PhoneApplicationPage>
\ No newline at end of file
App.SettingsViewModel.LoadData();
}
}
-
- private void LongListSelector_SelectionChanged(object sender, SelectionChangedEventArgs e)
- {
- LongListSelector selector = sender as LongListSelector;
- ItemViewModel item = selector.SelectedItem as ItemViewModel;
- switch(item.LineOne)
- {
- case "Temperature units":
- NavigationService.Navigate(new Uri("/SettingsTemperatureUnitsPage.xaml", UriKind.Relative));
- break;
- default:
- break;
- }
- }
-
- private void StackPanel_Tap(object sender, System.Windows.Input.GestureEventArgs e)
- {
-
- }
}
}
\ No newline at end of file
+++ /dev/null
-<phone:PhoneApplicationPage
- x:Class="WeatherInformation.SettingsTemperatureUnitsPage"
- 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:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- mc:Ignorable="d"
- d:DataContext="{d:DesignData SampleData/TemperatureUnitsViewModelSampleData.xaml}"
- FontFamily="{StaticResource PhoneFontFamilyNormal}"
- FontSize="{StaticResource PhoneFontSizeNormal}"
- Foreground="{StaticResource PhoneForegroundBrush}"
- SupportedOrientations="Portrait" Orientation="Portrait"
- shell:SystemTray.IsVisible="True">
-
- <!--LayoutRoot es la cuadrícula raíz donde se coloca todo el contenido de la página-->
- <Grid x:Name="LayoutRoot" Background="Transparent">
- <!--Control Pivot-->
- <phone:Pivot Title="WEATHER INFORMATION">
- <!--Elemento Pivot uno-->
- <phone:PivotItem Header="temperature">
- <!-- de líneas dobles con ajuste de texto -->
- <phone:LongListSelector x:Name="SettingsList" Margin="0,0,-12,0" ItemsSource="{Binding TemperatureUnitsItems}">
- <phone:LongListSelector.ItemTemplate>
- <DataTemplate>
- <StackPanel Orientation="Vertical" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="0,10">
- <TextBlock Text="{Binding LineOne}" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}" HorizontalAlignment="Left" VerticalAlignment="Center" FontWeight="Bold"/>
- <TextBlock Text="{Binding LineTwo}" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24"/>
- </StackPanel>
- </DataTemplate>
- </phone:LongListSelector.ItemTemplate>
- </phone:LongListSelector>
- </phone:PivotItem>
- </phone:Pivot>
- </Grid>
-
-</phone:PhoneApplicationPage>
\ No newline at end of file
+++ /dev/null
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Net;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Navigation;
-using Microsoft.Phone.Controls;
-using Microsoft.Phone.Shell;
-
-namespace WeatherInformation
-{
- public partial class SettingsTemperatureUnitsPage : PhoneApplicationPage
- {
- public SettingsTemperatureUnitsPage()
- {
- InitializeComponent();
-
- // Establecer el contexto de datos del control ListBox control en los datos de ejemplo
- DataContext = App.TemperatureUnitsViewModel;
- }
-
- protected override void OnNavigatedTo(NavigationEventArgs e)
- {
- if (!App.TemperatureUnitsViewModel.IsDataLoaded)
- {
- App.TemperatureUnitsViewModel.LoadData();
- }
- }
- }
-}
\ No newline at end of file
<Compile Include="SettingsPage.xaml.cs">
<DependentUpon>SettingsPage.xaml</DependentUpon>
</Compile>
- <Compile Include="SettingsTemperatureUnitsPage.xaml.cs">
- <DependentUpon>SettingsTemperatureUnitsPage.xaml</DependentUpon>
- </Compile>
<Compile Include="ViewModels\ItemViewModel.cs" />
<Compile Include="ViewModels\MainViewModel.cs" />
<Compile Include="ViewModels\TemperatureUnitsViewModel.cs" />
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
- <Page Include="SettingsTemperatureUnitsPage.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</Content>
<Content Include="Images\add.png" />
<Content Include="Images\feature.settings.png" />
+ <Content Include="README_FIRST.txt" />
+ <Content Include="Toolkit.Content\ApplicationBar.Add.png" />
+ <Content Include="Toolkit.Content\ApplicationBar.Cancel.png" />
+ <Content Include="Toolkit.Content\ApplicationBar.Check.png" />
+ <Content Include="Toolkit.Content\ApplicationBar.Delete.png" />
+ <Content Include="Toolkit.Content\ApplicationBar.Select.png" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\AppResources.resx">
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.Phone.Controls, Version=8.0.0.0, Culture=neutral, PublicKeyToken=24eec0d8c86cda1e, processorArchitecture=MSIL" />
+ <Reference Include="Microsoft.Phone.Controls.Toolkit">
+ <HintPath>..\packages\WPtoolkit.4.2013.08.16\lib\wp8\Microsoft.Phone.Controls.Toolkit.dll</HintPath>
+ </Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>..\packages\Newtonsoft.Json.6.0.3\lib\portable-net45+wp80+win8+wpa81\Newtonsoft.Json.dll</HintPath>
</Reference>
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="6.0.3" targetFramework="wp80" />
+ <package id="WPtoolkit" version="4.2013.08.16" targetFramework="wp80" />
</packages>
\ No newline at end of file