DefaultHeader

This commit is contained in:
Christian Fiedler
2013-10-07 17:13:29 +02:00
parent 3869bbda5b
commit 7bc55f6527
4 changed files with 89 additions and 0 deletions

View File

@@ -157,6 +157,9 @@
<Compile Include="Utility\AppUriMapper.cs" />
<Compile Include="Utility\BackgroundTasks.cs" />
<Compile Include="Utility\Lui\Button\AddPersonButton.cs" />
<Compile Include="Utility\Lui\Header\DefaultHeader.xaml.cs">
<DependentUpon>DefaultHeader.xaml</DependentUpon>
</Compile>
<Compile Include="Utility\Lui\Tiles\TileCreator.cs" />
<Compile Include="Utility\NDEF\NDEFMessage.cs" />
<Compile Include="Utility\NDEF\NDEFRecord.cs" />
@@ -401,6 +404,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Utility\Lui\Header\DefaultHeader.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<None Include="Assets\psd\holo_optionsbuttons.psd" />

View File

@@ -7,6 +7,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:lui="clr-namespace:CampusAppWP8.Utility.Lui.Button"
xmlns:header="clr-namespace:CampusAppWP8.Utility.Lui.Header"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
@@ -23,10 +24,13 @@
<ProgressBar x:Name="progressBar" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center" Visibility="Collapsed" IsIndeterminate="True"/>
<!-- Title and headline -->
<header:DefaultHeader HeaderName="{Binding Path=LocalizedResources.NewsApp_Title, Source={StaticResource LocalizedStrings}}"/>
<!--
<StackPanel Grid.Row="0" Margin="12,17,0,28">
<TextBlock Text="{Binding Path=LocalizedResources.ApplicationTitle, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextNormalStyle}"/>
<TextBlock Text="{Binding Path=LocalizedResources.NewsApp_Title, Source={StaticResource LocalizedStrings}}" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
</StackPanel>
-->
<!-- Content -->
<ListBox x:Name="NewsList" Grid.Row="1">
<ListBox.ItemContainerStyle>

View File

@@ -0,0 +1,12 @@
<UserControl
x:Class="CampusAppWP8.Utility.Lui.Header.DefaultHeader"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
DataContext="{Binding RelativeSource={RelativeSource Self}}">
<StackPanel Margin="12,17,0,28">
<TextBlock Text="{Binding Path=AppTitle}" Style="{StaticResource PhoneTextNormalStyle}"/>
<TextBlock Text="{Binding Path=HeaderName}" Margin="9,0,0,0" Style="{StaticResource PhoneTextTitle2Style}"/>
</StackPanel>
</UserControl>

View File

@@ -0,0 +1,66 @@
//-----------------------------------------------------------------------------
// <copyright file="DefaultHeader.xaml.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>fiedlchr</author>
// <sience>07.10.2013</sience>
//-----------------------------------------------------------------------------
namespace CampusAppWP8.Utility.Lui.Header
{
using System.Windows;
using System.Windows.Controls;
using CampusAppWP8.Resources;
/// <summary>
/// Default Header Template.
/// </summary>
public partial class DefaultHeader : UserControl
{
/// <summary>AppTitle property object.</summary>
public static readonly DependencyProperty AppTitleProperty = DependencyProperty.Register("AppTitle", typeof(string), typeof(DefaultHeader), new PropertyMetadata(null));
/// <summary>HeaderName property object.</summary>
public static readonly DependencyProperty HeaderNameProperty = DependencyProperty.Register("HeaderName", typeof(string), typeof(DefaultHeader), new PropertyMetadata(null));
/// <summary>
/// Initializes a new instance of the <see cref="DefaultHeader" /> class.
/// </summary>
public DefaultHeader()
{
this.InitializeComponent();
this.AppTitle = AppResources.ApplicationTitle;
}
/// <summary>
/// Gets or sets the AppTitle property.
/// </summary>
public string AppTitle
{
get
{
return (string)this.GetValue(AppTitleProperty);
}
set
{
this.SetValue(AppTitleProperty, value);
}
}
/// <summary>
/// Gets or sets the HeaderName property.
/// </summary>
public string HeaderName
{
get
{
return (string)this.GetValue(HeaderNameProperty);
}
set
{
this.SetValue(HeaderNameProperty, value);
}
}
}
}