Windows phone 8 WinPhone 8 RadTextBox-无法设置PhoneForegroundBrush颜色

Windows phone 8 WinPhone 8 RadTextBox-无法设置PhoneForegroundBrush颜色,windows-phone-8,textbox,telerik,foreground,Windows Phone 8,Textbox,Telerik,Foreground,我正在为WinPhone8SDK开发一个应用程序,使用Telerik控制其RadTextBox。我需要更改不同主题的前景色-暗/亮 在我的xml中: <phone:PhoneApplicationPage xmlns:Controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Primitives" x:Class="PanicMe.OptionPages.ProfilePage"

我正在为WinPhone8SDK开发一个应用程序,使用Telerik控制其RadTextBox。我需要更改不同主题的前景色-暗/亮

在我的xml中:

<phone:PhoneApplicationPage xmlns:Controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Primitives" 
x:Class="PanicMe.OptionPages.ProfilePage"
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"
xmlns:telerikCore="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Core"
xmlns:controls="clr-namespace:PanicMe.Controls"
                        FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="Portrait" Orientation="Portrait"
mc:Ignorable="d"
shell:SystemTray.IsVisible="True">


<Controls:RadTextBox Grid.Row="0" HorizontalAlignment="Stretch" 
 Text="{Binding FirstName, Mode=TwoWay}" ClearButtonVisibility="Visible" 
 Watermark="First Name" />
我尝试了不同的方法来设置PhoneForegroundBrush的值,但在输出结果中没有看到任何差异。我面临的问题是黑暗/光明主题。如何设置1种颜色,使其在所有情况下都可用(文本框中的文本可见)

我是WinPhone8开发的新手,请帮我做到最好


谢谢

我没有使用pHONEfOREGROUNDbRUSH,而是使用PhoneAccentBrush。这对文本框起到了作用

文本框的背景在聚焦时将是手机的前景色,如果文本也是以相同的颜色书写的,那么它将不可见。因此,我将前景色更改为PhoneAccentBrush值,以确保在所有情况下文本都可见

它成功了


希望这对某人有所帮助。

请清楚地告诉我。你想设置什么颜色作为前景画笔?@MohamedThaufeeq想知道哪种颜色适用于这两个主题的明暗。我想我会配蓝色的。
    public ProfilePage()
    {
        Resources.Remove("PhoneForegroundBrush");
        Resources.Add("PhoneForegroundBrush", System.Windows.Media.Colors.Red);
        // THIS BELOW LINE SHOWS ERROR
        //((System.Windows.Media.SolidColorBrush)Resources["PhoneForegroundBrush"]).Color = System.Windows.Media.Colors.Magenta;

        InitializeComponent();

        Resources.Remove("PhoneForegroundBrush");
        Resources.Add("PhoneForegroundBrush", System.Windows.Media.Colors.Red);
    }