如何在LongListMultiSelector中更改CheckBox和CheckBox刻度的颜色?WP8

沙希姆·约翰(Shaheem John)

是否可以在LongListMultiSelector中更改CheckBox和CheckBox刻度的颜色。我已经尝试过George Nikolaides解决方案,但无法满足需要。还有其他方法吗?请有人能详细解释一下吗?如果它是可能的。预先感谢,以下是George Nikolaides解决方案:

我可以在LongListMultiSelector中更改CheckBox颜色吗?WP8

Chubosaurus软件

记得有xmlns:toolkitxmlns:toolkitPrimitives像这样定义的:

<phone:PhoneApplicationPage
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"   
    xmlns:toolkitPrimitives="clr-namespace:Microsoft.Phone.Controls.Primitives;assembly=Microsoft.Phone.Controls.Toolkit">

然后将整个混乱复制到 <phone:PhoneApplicationPage.Resources>

<Style x:Key="PhoneButtonBase" TargetType="ButtonBase">
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="{StaticResource PhoneForegroundBrush}"/>
    <Setter Property="Foreground" Value="{StaticResource PhoneForegroundBrush}"/>
    <Setter Property="BorderThickness" Value="{StaticResource PhoneBorderThickness}"/>
    <Setter Property="FontFamily" Value="{StaticResource PhoneFontFamilySemiBold}"/>
    <Setter Property="FontSize" Value="{StaticResource PhoneFontSizeMedium}"/>
    <Setter Property="Padding" Value="10,5,10,6"/>
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="ButtonBase">
                <Grid Background="Transparent">
                    <VisualStateManager.VisualStateGroups>
                        <VisualStateGroup x:Name="CommonStates">
                            <VisualState x:Name="Normal"/>
                            <VisualState x:Name="MouseOver"/>
                            <VisualState x:Name="Pressed">
                                <Storyboard>
                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentContainer">
                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneButtonBasePressedForegroundBrush}"/>
                                    </ObjectAnimationUsingKeyFrames>
                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="ButtonBackground">
                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneAccentBrush}"/>
                                    </ObjectAnimationUsingKeyFrames>
                                </Storyboard>
                            </VisualState>
                            <VisualState x:Name="Disabled">
                                <Storyboard>
                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentContainer">
                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneDisabledBrush}"/>
                                    </ObjectAnimationUsingKeyFrames>
                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="ButtonBackground">
                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneDisabledBrush}"/>
                                    </ObjectAnimationUsingKeyFrames>
                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="ButtonBackground">
                                        <DiscreteObjectKeyFrame KeyTime="0" Value="Transparent"/>
                                    </ObjectAnimationUsingKeyFrames>
                                </Storyboard>
                            </VisualState>
                        </VisualStateGroup>
                    </VisualStateManager.VisualStateGroups>
                    <Border x:Name="ButtonBackground" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="0" Margin="{StaticResource PhoneTouchTargetOverhang}">
                        <ContentControl x:Name="ContentContainer" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
                    </Border>
                </Grid>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>
<Style x:Key="PhoneRadioButtonCheckBoxBase" BasedOn="{StaticResource PhoneButtonBase}" TargetType="ToggleButton">
    <Setter Property="Background" Value="{StaticResource PhoneRadioCheckBoxBrush}"/>
    <Setter Property="BorderBrush" Value="{StaticResource PhoneRadioCheckBoxBorderBrush}"/>
    <Setter Property="FontSize" Value="{StaticResource PhoneFontSizeMedium}"/>
    <Setter Property="FontFamily" Value="{StaticResource PhoneFontFamilyNormal}"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="0"/>
</Style>
<Style x:Key="CheckBoxStyle1" BasedOn="{StaticResource PhoneRadioButtonCheckBoxBase}" TargetType="CheckBox">
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="CheckBox">
                <Grid Background="Transparent" HorizontalAlignment="Left">
                    <VisualStateManager.VisualStateGroups>
                        <VisualStateGroup x:Name="CommonStates">
                            <VisualState x:Name="Normal"/>
                            <VisualState x:Name="MouseOver"/>
                            <VisualState x:Name="Pressed">
                                <Storyboard>
                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="CheckBackground">
                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneRadioCheckBoxPressedBrush}"/>
                                    </ObjectAnimationUsingKeyFrames>
                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="CheckMark">
                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneButtonBasePressedForegroundBrush}"/>
                                    </ObjectAnimationUsingKeyFrames>
                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="IndeterminateMark">
                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneButtonBasePressedForegroundBrush}"/>
                                    </ObjectAnimationUsingKeyFrames>
                                </Storyboard>
                            </VisualState>
                            <VisualState x:Name="Disabled">
                                <Storyboard>
                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="CheckBackground">
                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneDisabledBrush}"/>
                                    </ObjectAnimationUsingKeyFrames>
                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="CheckMark">
                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneDisabledBrush}"/>
                                    </ObjectAnimationUsingKeyFrames>
                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="IndeterminateMark">
                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneDisabledBrush}"/>
                                    </ObjectAnimationUsingKeyFrames>
                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentContainer">
                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneDisabledBrush}"/>
                                    </ObjectAnimationUsingKeyFrames>
                                </Storyboard>
                            </VisualState>
                        </VisualStateGroup>
                        <VisualStateGroup x:Name="CheckStates">
                            <VisualState x:Name="Checked">
                                <Storyboard>
                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="CheckMark">
                                        <DiscreteObjectKeyFrame KeyTime="0">
                                            <DiscreteObjectKeyFrame.Value>
                                                <Visibility>Visible</Visibility>
                                            </DiscreteObjectKeyFrame.Value>
                                        </DiscreteObjectKeyFrame>
                                    </ObjectAnimationUsingKeyFrames>
                                </Storyboard>
                            </VisualState>
                            <VisualState x:Name="Unchecked"/>
                            <VisualState x:Name="Indeterminate">
                                <Storyboard>
                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="IndeterminateMark">
                                        <DiscreteObjectKeyFrame KeyTime="0">
                                            <DiscreteObjectKeyFrame.Value>
                                                <Visibility>Visible</Visibility>
                                            </DiscreteObjectKeyFrame.Value>
                                        </DiscreteObjectKeyFrame>
                                    </ObjectAnimationUsingKeyFrames>
                                </Storyboard>
                            </VisualState>
                        </VisualStateGroup>
                    </VisualStateManager.VisualStateGroups>
                    <Grid Margin="{StaticResource PhoneTouchTargetLargeOverhang}">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="32"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <Grid Grid.Column="0" VerticalAlignment="Top">
                            <Border x:Name="CheckBackground" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{StaticResource PhoneBorderThickness}" Background="{TemplateBinding Background}" HorizontalAlignment="Left" Height="32" IsHitTestVisible="False" VerticalAlignment="Center" Width="32"/>
                            <Rectangle x:Name="IndeterminateMark" Fill="{StaticResource PhoneRadioCheckBoxCheckBrush}" HorizontalAlignment="Center" Height="16" IsHitTestVisible="False" Visibility="Collapsed" VerticalAlignment="Center" Width="16"/>
                            <Path x:Name="CheckMark" Data="M0,123 L39,93 L124,164 L256,18 L295,49 L124,240 z" Fill="{TemplateBinding Foreground}" FlowDirection="LeftToRight" HorizontalAlignment="Center" Height="21" IsHitTestVisible="False" Stretch="Fill" StrokeThickness="3" StrokeLineJoin="Round" Visibility="Collapsed" VerticalAlignment="Center" Width="23"/>
                        </Grid>
                        <ContentControl x:Name="ContentContainer" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Grid.Column="1" Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="12,0,0,0" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
                    </Grid>
                </Grid>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>
<Style x:Key="LongListMultiSelectorItemListStyle" TargetType="toolkit:LongListMultiSelectorItem">
    <Setter Property="Background" Value="{StaticResource PhoneAccentBrush}"/>
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="toolkit:LongListMultiSelectorItem">
                <Grid MinHeight="52">
                    <Grid.Resources>
                        <ExponentialEase EasingMode="EaseIn" Exponent="8" x:Key="ExponentialEaseIn"/>
                        <QuadraticEase EasingMode="EaseOut" x:Key="QuadraticEaseOut"/>
                    </Grid.Resources>
                    <VisualStateManager.VisualStateGroups>
                        <VisualStateGroup x:Name="SelectionEnabledStates">
                            <VisualStateGroup.Transitions>
                                <VisualTransition x:Name="ClosedToExposed" 
                                    From="Closed" To="Exposed"
                                    GeneratedDuration="0:0:0.30">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" 
                                            Storyboard.TargetName="OuterHintPanel">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.0" Value="0.0" EasingFunction="{StaticResource QuadraticEaseOut}"/>
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.30" Value="1.0" EasingFunction="{StaticResource QuadraticEaseOut}"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualTransition>
                                <VisualTransition x:Name="ExposedToClosed" 
                                    From="Exposed" To="Closed"
                                    GeneratedDuration="0:0:0.30">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" 
                                            Storyboard.TargetName="OuterHintPanel">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.0" Value="1.0" EasingFunction="{StaticResource QuadraticEaseOut}"/>
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.30" Value="0.0" EasingFunction="{StaticResource QuadraticEaseOut}"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualTransition>
                                <VisualTransition x:Name="ExposedToOpened"
                                    From="Exposed" To="Opened"
                                    GeneratedDuration="0:0:0.30">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" 
                                            Storyboard.TargetName="SelectBox">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.0" Value="-58" EasingFunction="{StaticResource ExponentialEaseIn}"/>
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="0" EasingFunction="{StaticResource ExponentialEaseIn}"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" 
                                            Storyboard.TargetName="Presenter">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.0" Value="24" EasingFunction="{StaticResource ExponentialEaseIn}"/>
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="86" EasingFunction="{StaticResource ExponentialEaseIn}"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" 
                                            Storyboard.TargetName="OuterHintPanel">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.0" Value="1.0" EasingFunction="{StaticResource QuadraticEaseOut}"/>
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.30" Value="0.0" EasingFunction="{StaticResource QuadraticEaseOut}"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" 
                                            Storyboard.TargetName="SelectBox">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0.0" Value="Visible"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.IsHitTestVisible)" 
                                            Storyboard.TargetName="OuterHintPanel">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="False"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.IsHitTestVisible)" 
                                            Storyboard.TargetName="InnerHintPanel">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="False"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualTransition>
                                <VisualTransition x:Name="ClosedToOpened"
                                    From="Closed" To="Opened"
                                    GeneratedDuration="0:0:0.15">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" 
                                            Storyboard.TargetName="SelectBox">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.0" Value="-58" EasingFunction="{StaticResource ExponentialEaseIn}"/>
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="0" EasingFunction="{StaticResource ExponentialEaseIn}"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" 
                                            Storyboard.TargetName="Presenter">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.0" Value="24" EasingFunction="{StaticResource ExponentialEaseIn}"/>
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="86" EasingFunction="{StaticResource ExponentialEaseIn}"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" 
                                            Storyboard.TargetName="SelectBox">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0.0" Value="Visible"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.IsHitTestVisible)" 
                                            Storyboard.TargetName="OuterHintPanel">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="False"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.IsHitTestVisible)" 
                                            Storyboard.TargetName="InnerHintPanel">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="False"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualTransition>
                                <VisualTransition x:Name="OpenedToClosed"
                                    From="Opened" To="Closed"
                                    GeneratedDuration="0:0:0.15">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" 
                                            Storyboard.TargetName="SelectBox">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.0" Value="0" EasingFunction="{StaticResource ExponentialEaseIn}"/>
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="-58" EasingFunction="{StaticResource ExponentialEaseIn}"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" 
                                            Storyboard.TargetName="Presenter">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.0" Value="86" EasingFunction="{StaticResource ExponentialEaseIn}"/>
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="24" EasingFunction="{StaticResource ExponentialEaseIn}"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" 
                                            Storyboard.TargetName="SelectBox">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0.15" Value="Collapsed"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualTransition>
                            </VisualStateGroup.Transitions>
                            <VisualState x:Name="Closed"/>
                            <VisualState x:Name="Exposed">
                                <Storyboard>
                                    <DoubleAnimation Storyboard.TargetProperty="(UIElement.Opacity)" 
                                        Storyboard.TargetName="OuterHintPanel"
                                        Duration="0" To="1.0"/>
                                </Storyboard>
                            </VisualState>
                            <VisualState x:Name="Opened">
                                <Storyboard>
                                    <DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" 
                                        Storyboard.TargetName="SelectBox"
                                        Duration="0" To="0"/>
                                    <DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" 
                                        Storyboard.TargetName="Presenter"
                                        Duration="0" To="86"/>
                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" 
                                        Storyboard.TargetName="SelectBox">
                                        <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="Visible"/>
                                    </ObjectAnimationUsingKeyFrames>
                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" 
                                        Storyboard.TargetName="OuterCover">
                                        <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="Visible"/>
                                    </ObjectAnimationUsingKeyFrames>
                                    <DoubleAnimation Storyboard.TargetProperty="(UIElement.Opacity)" 
                                        Storyboard.TargetName="OuterHintPanel"
                                        Duration="0" To="0.0"/>
                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.IsHitTestVisible)" 
                                        Storyboard.TargetName="OuterHintPanel">
                                        <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="False"/>
                                    </ObjectAnimationUsingKeyFrames>
                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.IsHitTestVisible)" 
                                        Storyboard.TargetName="InnerHintPanel">
                                        <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="False"/>
                                    </ObjectAnimationUsingKeyFrames>
                                </Storyboard>
                            </VisualState>
                        </VisualStateGroup>
                    </VisualStateManager.VisualStateGroups>
                    <Grid HorizontalAlignment="Stretch">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        <Grid Grid.Column="0" HorizontalAlignment="Stretch" toolkitPrimitives:ClipToBounds.IsEnabled="True">
                            <ContentPresenter x:Name="Presenter">
                                <ContentPresenter.RenderTransform>
                                    <CompositeTransform TranslateX="24"/>
                                </ContentPresenter.RenderTransform>
                            </ContentPresenter>
                        </Grid>
                        <Rectangle x:Name="InnerHintPanel" Grid.Column="0" Width="24"
                            Height="{TemplateBinding HintPanelHeight}"
                            HorizontalAlignment="Left"
                            Fill="Transparent"
                            StrokeThickness="0">
                            <Rectangle.RenderTransform>
                                <CompositeTransform TranslateX="24"/>
                            </Rectangle.RenderTransform>
                        </Rectangle>
                        <ContentControl x:Name="InfoPresenter" Grid.Column="1" 
                            VerticalAlignment="Top"
                            Content="{TemplateBinding ContentInfo}"
                            ContentTemplate="{TemplateBinding ContentInfoTemplate}"/>
                    </Grid>
                    <Rectangle x:Name="OuterHintPanel" Width="24"
                        HorizontalAlignment="Left"
                        Height="{TemplateBinding HintPanelHeight}"
                        Fill="{TemplateBinding Background}"
                        StrokeThickness="0" Opacity="0.0"/>
                    <Grid x:Name="OuterCover" IsHitTestVisible="True"
                        Visibility="Collapsed" Background="Transparent"/>
                    <Canvas HorizontalAlignment="Left">
                        <CheckBox x:Name="SelectBox" VerticalAlignment="Top" Margin="12,-20,5,0" Visibility="Collapsed"
                            IsChecked="{Binding IsSelected, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource CheckBoxStyle1}" Foreground="Red" BorderBrush="#FF00FF46">
                            <CheckBox.RenderTransform>
                                <CompositeTransform TranslateX="-58"/>
                            </CheckBox.RenderTransform>
                        </CheckBox>
                    </Canvas>
                </Grid>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>

<toolkit:LongListMultiSelector ItemContainerStyle="{StaticResource LongListMultiSelectorItemListStyle}">

选择样式中的CheckBox,然后更改BorderBrush颜色和Foreground颜色以实现所需的效果。我把前景色和复选标记绑在一起。


在此处输入图片说明

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

如何在LongListMultiSelector中更改CheckBox和CheckBox刻度的颜色?WP8

来自分类Dev

如何在WP8.1中更改CheckBox的CheckMark颜色?

来自分类Dev

如何在wp8日历控件中更改多天的颜色

来自分类Dev

如何在ListPicker Wp8中保存更改

来自分类Dev

如何在WP8中给不同颜色的文本加上下划线?

来自分类Dev

如何在wp8中更新数据文件

来自分类Dev

如何在xml文件wp8中写入数据

来自分类Dev

如何在wp8中获取当前的Mainpage实例

来自分类Dev

如何在WP8中播放声音?

来自分类Dev

如何在WP8 App中打开Excel表

来自分类Dev

如何在 CSS3 中更改 mat-checkbox 背景颜色?角6

来自分类Dev

如何在Android中更改复选框刻度颜色

来自分类Dev

如何更改CheckBox复选标记的颜色?

来自分类Dev

在WP8中录制视频时如何更改相机的分辨率

来自分类Dev

何时以及如何在Windows Phone wp8中的ViewModel中调用异步方法

来自分类Dev

如何在WP8中检测当前的键盘书写语言

来自分类Dev

如何在WP8应用中创建类似于UI的图块?

来自分类Dev

如何在Wp8中显示图像我有一个流路径

来自分类Dev

如何在wp8中获取满足查询条件的记录

来自分类Dev

如何在wp8中以编程方式获取主要或辅助电子邮件地址?

来自分类Dev

如何在WP8中同时为容器的所有子代设置动画

来自分类Dev

如何在WP8中使用AudioVideoCptureDevice录制视频

来自分类Dev

如何在物理设备上的WP8中调试PhotoTaskChooser?

来自分类Dev

如何在WP8中检测当前的键盘书写语言

来自分类Dev

如何在wp8中每个星期五仅运行一次提醒

来自分类Dev

如何在wp8中以编程方式获取主要或辅助电子邮件地址?

来自分类Dev

如何在R中的轮廓图颜色栏中更改刻度标签的字体大小?

来自分类Dev

如何在颜色条上选择颜色和刻度?

来自分类Dev

WP8中的BaasBox和C#?

Related 相关文章

  1. 1

    如何在LongListMultiSelector中更改CheckBox和CheckBox刻度的颜色?WP8

  2. 2

    如何在WP8.1中更改CheckBox的CheckMark颜色?

  3. 3

    如何在wp8日历控件中更改多天的颜色

  4. 4

    如何在ListPicker Wp8中保存更改

  5. 5

    如何在WP8中给不同颜色的文本加上下划线?

  6. 6

    如何在wp8中更新数据文件

  7. 7

    如何在xml文件wp8中写入数据

  8. 8

    如何在wp8中获取当前的Mainpage实例

  9. 9

    如何在WP8中播放声音?

  10. 10

    如何在WP8 App中打开Excel表

  11. 11

    如何在 CSS3 中更改 mat-checkbox 背景颜色?角6

  12. 12

    如何在Android中更改复选框刻度颜色

  13. 13

    如何更改CheckBox复选标记的颜色?

  14. 14

    在WP8中录制视频时如何更改相机的分辨率

  15. 15

    何时以及如何在Windows Phone wp8中的ViewModel中调用异步方法

  16. 16

    如何在WP8中检测当前的键盘书写语言

  17. 17

    如何在WP8应用中创建类似于UI的图块?

  18. 18

    如何在Wp8中显示图像我有一个流路径

  19. 19

    如何在wp8中获取满足查询条件的记录

  20. 20

    如何在wp8中以编程方式获取主要或辅助电子邮件地址?

  21. 21

    如何在WP8中同时为容器的所有子代设置动画

  22. 22

    如何在WP8中使用AudioVideoCptureDevice录制视频

  23. 23

    如何在物理设备上的WP8中调试PhotoTaskChooser?

  24. 24

    如何在WP8中检测当前的键盘书写语言

  25. 25

    如何在wp8中每个星期五仅运行一次提醒

  26. 26

    如何在wp8中以编程方式获取主要或辅助电子邮件地址?

  27. 27

    如何在R中的轮廓图颜色栏中更改刻度标签的字体大小?

  28. 28

    如何在颜色条上选择颜色和刻度?

  29. 29

    WP8中的BaasBox和C#?

热门标签

归档