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.
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
Can anyone tell me how to solve this issue?
Here is the TimePickerPage.xaml
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">