1

I'm using <toolkit:TimePicker/> from WP Toolkit
and it's PickerPageUri is set to /Microsoft.Phone.Controls.Toolkit;component/DateTimePickers/TimePickerPage.xaml

I want some customization in this page like it's background should be White,
text tile should be PICK TIME the app bar background should be Grey
and icons should be Black.

enter image description here

I downloaded TimePickerPage.xaml and TimePickerPage.xaml.cs so that I can quickly change its property and set it source to my new CustomTimePickerPage.xaml which actually contains the 99% code of TimePickerPage.xaml.

But it gives me errors below enter image description here

Can anyone tell me how to solve this issue?

Here is the TimePickerPage.xaml

Inder Kumar Rathore
  • 39,458
  • 17
  • 135
  • 184
  • You must have changed something in the page, otherwise it wouldn't tell you that the "primitives" prefix is undeclared. The same way, the "1f1f1f" string is nowhere to be found in the original TimePickerPage.xaml page. – Kevin Gosse Aug 02 '13 at 10:56
  • I have changed nothing. I'm using the the exact code but with different class name. – Inder Kumar Rathore Aug 05 '13 at 04:09

1 Answers1

1

The problem was declaring the xmlns, below is the correct way of declaring primitives and controls xmlns

<primitives:DateTimePickerPageBase
    x:Class="FamilyMap.CustomUIElements.CustomTimePicker"
    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.Toolkit"
    xmlns:primitives="clr-namespace:Microsoft.Phone.Controls.Primitives;assembly=Microsoft.Phone.Controls.Toolkit"
    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="PortraitOrLandscape" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="728" d:DesignWidth="480">
Inder Kumar Rathore
  • 39,458
  • 17
  • 135
  • 184