Skip to content
This repository has been archived by the owner on Apr 10, 2020. It is now read-only.

Commit

Permalink
86288
Browse files Browse the repository at this point in the history
  • Loading branch information
Kinnara committed Jul 30, 2013
1 parent 6683fba commit 6aff65b
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 9 deletions.
4 changes: 4 additions & 0 deletions Microsoft.Phone.Controls.Toolkit.WP7/Themes/Generic.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,7 @@

<Style TargetType="controls:DatePicker">
<Setter Property="Background" Value="{StaticResource PhoneTextBoxBrush}"/>
<Setter Property="BorderBrush" Value="{StaticResource PhoneForegroundBrush}"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Foreground" Value="{StaticResource PhoneTextBoxForegroundBrush}"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
Expand All @@ -530,6 +531,7 @@
x:Name="DateTimeButton"
Content="{TemplateBinding ValueString}"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
FontFamily="{TemplateBinding FontFamily}"
Foreground="{TemplateBinding Foreground}"
Expand All @@ -543,6 +545,7 @@

<Style TargetType="controls:TimePicker">
<Setter Property="Background" Value="{StaticResource PhoneTextBoxBrush}"/>
<Setter Property="BorderBrush" Value="{StaticResource PhoneForegroundBrush}"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Foreground" Value="{StaticResource PhoneTextBoxForegroundBrush}"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
Expand All @@ -565,6 +568,7 @@
x:Name="DateTimeButton"
Content="{TemplateBinding ValueString}"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
FontFamily="{TemplateBinding FontFamily}"
Foreground="{TemplateBinding Foreground}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ protected override void OnOrientationChanged(OrientationChangedEventArgs e)
/// Sets the selectors and title flow direction.
/// </summary>
/// <param name="flowDirection">Flow direction to set.</param>
internal override void SetFlowDirection(FlowDirection flowDirection)
public override void SetFlowDirection(FlowDirection flowDirection)
{
HeaderTitle.FlowDirection = flowDirection;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ protected override void OnOrientationChanged(OrientationChangedEventArgs e)
/// Sets the selectors and title flow direction.
/// </summary>
/// <param name="flowDirection">Flow direction to set.</param>
internal override void SetFlowDirection(FlowDirection flowDirection)
public override void SetFlowDirection(FlowDirection flowDirection)
{
HeaderTitle.FlowDirection = flowDirection;

Expand Down
4 changes: 4 additions & 0 deletions Microsoft.Phone.Controls.Toolkit.WP8/Themes/Generic.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,7 @@

<Style TargetType="controls:DatePicker">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderBrush" Value="{StaticResource PhoneForegroundBrush}"/>
<Setter Property="BorderThickness" Value="{StaticResource PhoneBorderThickness}"/>
<Setter Property="Foreground" Value="{StaticResource PhoneForegroundBrush}"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
Expand All @@ -525,6 +526,7 @@
x:Name="DateTimeButton"
Content="{TemplateBinding ValueString}"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
FontFamily="{TemplateBinding FontFamily}"
Foreground="{TemplateBinding Foreground}"
Expand All @@ -538,6 +540,7 @@

<Style TargetType="controls:TimePicker">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderBrush" Value="{StaticResource PhoneForegroundBrush}"/>
<Setter Property="BorderThickness" Value="{StaticResource PhoneBorderThickness}"/>
<Setter Property="Foreground" Value="{StaticResource PhoneForegroundBrush}"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
Expand All @@ -560,6 +563,7 @@
x:Name="DateTimeButton"
Content="{TemplateBinding ValueString}"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
FontFamily="{TemplateBinding FontFamily}"
Foreground="{TemplateBinding Foreground}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ protected override void OnOrientationChanged(OrientationChangedEventArgs e)
/// Sets the selectors and title flow direction.
/// </summary>
/// <param name="flowDirection">Flow direction to set.</param>
internal override void SetFlowDirection(FlowDirection flowDirection)
public override void SetFlowDirection(FlowDirection flowDirection)
{
HeaderTitle.FlowDirection = flowDirection;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,14 +301,14 @@ private void OnFrameNavigated(object sender, NavigationEventArgs e)
else if (null == _dateTimePickerPage)
{
// Navigation to a new page; capture it and push the value in
var page = e.Content as DateTimePickerPageBase;
var pickerPage = e.Content as IDateTimePickerPage;

if (null != page)
if (null != pickerPage)
{
_dateTimePickerPage = page;
_dateTimePickerPage = pickerPage;
_dateTimePickerPage.Value = Value.GetValueOrDefault(DateTime.Now);

page.SetFlowDirection(this.FlowDirection);
pickerPage.SetFlowDirection(this.FlowDirection);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,6 @@ protected override void OnNavigatedTo(NavigationEventArgs e)
/// Sets the selectors and title flow direction.
/// </summary>
/// <param name="flowDirection">Flow direction to set.</param>
internal abstract void SetFlowDirection(FlowDirection flowDirection);
public abstract void SetFlowDirection(FlowDirection flowDirection);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// All other rights reserved.

using System;
using System.Windows;

namespace Microsoft.Phone.Controls.Primitives
{
Expand All @@ -16,5 +17,11 @@ public interface IDateTimePickerPage
/// Gets or sets the DateTime to show in the picker page and to set when the user makes a selection.
/// </summary>
DateTime? Value { get; set; }

/// <summary>
/// Sets the flow direction on any children controls that need it.
/// </summary>
/// <param name="flowDirection">Flow direction to set.</param>
void SetFlowDirection(FlowDirection flowDirection);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ protected override void OnOrientationChanged(OrientationChangedEventArgs e)
/// Sets the selectors and title flow direction.
/// </summary>
/// <param name="flowDirection">Flow direction to set.</param>
internal override void SetFlowDirection(FlowDirection flowDirection)
public override void SetFlowDirection(FlowDirection flowDirection)
{
HeaderTitle.FlowDirection = flowDirection;

Expand Down

0 comments on commit 6aff65b

Please sign in to comment.