<RepeatButton BorderThickness="3">
            <Setter Property="Border.BorderThickness">
                <Setter.Value>
                    <Thickness>1,1,1,1</Thickness>
                </Setter.Value>
            </Setter>
        </RepeatButton>这里的Border.BorderThickness跟RepeatButton BorderThickness的BorderThickness,不是一回事。BorderThickness是BorderThickness的属性,边框厚度。而Border.BorderThickness是引用的资源字典里的属性。
比如:
 <Style x:Key="CircleButtonStyle" TargetType="{x:Type Button}">
        <Setter Property="Border.BorderThickness" Value="1,1,1,1" />
 </Style>

解决方案 »

  1.   

    Border.BorderThickness是引用的资源字典里的属性?
    Button的样式,设置Border.BorderThickness属性?还是看不懂诶
    ,Border.BorderThickness指的是什么?
      

  2.   

    BorderThickness是线型,实线,虚线,点划线等等
      

  3.   

    那1楼的代码:
    <RepeatButton BorderThickness="3">
         <Setter Property="Border.BorderThickness">
             <Setter.Value>
                  <Thickness>1,1,1,1</Thickness>
             </Setter.Value>
         </Setter>
    </RepeatButton>RepeatButton的边框宽度设置为了3,那Border.BorderThickness设置为1,1,1,1,这是设置的什么东西?不会又是边框宽度吧
      

  4.   

    RepeatButton的边框宽度设置为了3,那Border.BorderThickness设置为1,1,1,1,这是设置的什么东西?不会又是边框宽度吧 
      

  5.   

    RepeatButton的边框宽度设置为了3,那Border.BorderThickness设置为1,1,1,1,这是设置的什么东西?不会又是边框宽度吧  
      

  6.   

    Border.BorderThickness设置为1,1,1,1,比如如果是绑定到button的样式的话,就是button的左、上、右、下4个边框的宽度。
      

  7.   

    4个边框的宽度不是用BorderThickness表示的吗?为什么是Border.BorderThickness
      

  8.   

    你代码没贴全,RepeatButton中应该用到Border的。
      

  9.   

    标准的RepeatButton模板如下:<RepeatButton Command="ScrollBar.LineUpCommand" Name="PART_LineUpButton" IsEnabled="{TemplateBinding UIElement.IsMouseOver}">
                                    <RepeatButton.Style>
                                        <Style TargetType="RepeatButton">
                                            <Style.Resources>
                                                <ResourceDictionary />
                                            </Style.Resources>
                                            <Setter Property="FrameworkElement.FocusVisualStyle">
                                                <Setter.Value>
                                                    <Style TargetType="IFrameworkInputElement">
                                                        <Style.Resources>
                                                            <ResourceDictionary />
                                                        </Style.Resources>
                                                        <Setter Property="Control.Template">
                                                            <Setter.Value>
                                                                <ControlTemplate>
                                                                    <Rectangle Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2" Margin="2,2,2,2" SnapsToDevicePixels="True" />
                                                                </ControlTemplate>
                                                            </Setter.Value>
                                                        </Setter>
                                                    </Style>
                                                </Setter.Value>
                                            </Setter>
                                            <Setter Property="Border.BorderThickness">
                                                <Setter.Value>
                                                    <Thickness>1,1,1,1</Thickness>
                                                </Setter.Value>
                                            </Setter>
                                            <Setter Property="Control.HorizontalContentAlignment">
                                                <Setter.Value>
                                                    <x:Static Member="HorizontalAlignment.Center" />
                                                </Setter.Value>
                                            </Setter>
                                            <Setter Property="Control.VerticalContentAlignment">
                                                <Setter.Value>
                                                    <x:Static Member="VerticalAlignment.Center" />
                                                </Setter.Value>
                                            </Setter>
                                            <Setter Property="Control.Padding">
                                                <Setter.Value>
                                                    <Thickness>1,1,1,1</Thickness>
                                                </Setter.Value>
                                            </Setter>
                                            <Setter Property="UIElement.Focusable">
                                                <Setter.Value>
                                                    <s:Boolean>False</s:Boolean>
                                                </Setter.Value>
                                            </Setter>
                                            <Setter Property="KeyboardNavigation.IsTabStop">
                                                <Setter.Value>
                                                    <s:Boolean>False</s:Boolean>
                                                </Setter.Value>
                                            </Setter>
                                            <Setter Property="Control.Template">
                                                <Setter.Value>
                                                    <ControlTemplate TargetType="RepeatButton">
                                                        <Border BorderThickness="1,1,1,1" BorderBrush="#FFF0F0F0" Background="#FFF0F0F0" Name="border" SnapsToDevicePixels="True">
                                                            <ContentPresenter Content="{TemplateBinding ContentControl.Content}" ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}" ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}" Name="contentPresenter" Margin="{TemplateBinding Control.Padding}" HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" Focusable="False" />
                                                        </Border>
                                                        <ControlTemplate.Triggers>
                                                            <Trigger Property="UIElement.IsMouseOver">
                                                                <Setter Property="Panel.Background" TargetName="border">
                                                                    <Setter.Value>
                                                                        <SolidColorBrush>#FFDADADA</SolidColorBrush>
                                                                    </Setter.Value>
                                                                </Setter>
                                                                <Setter Property="Border.BorderBrush" TargetName="border">
                                                                    <Setter.Value>
                                                                        <SolidColorBrush>#FFDADADA</SolidColorBrush>
                                                                    </Setter.Value>
                                                                </Setter>
                                                                <Trigger.Value>
                                                                    <s:Boolean>True</s:Boolean>
                                                                </Trigger.Value>
                                                            </Trigger>
                                                            <Trigger Property="ButtonBase.IsPressed">
                                                                <Setter Property="Panel.Background" TargetName="border">
                                                                    <Setter.Value>
                                                                        <SolidColorBrush>#FF606060</SolidColorBrush>
                                                                    </Setter.Value>
                                                                </Setter>
                                                                <Setter Property="Border.BorderBrush" TargetName="border">
                                                                    <Setter.Value>
                                                                        <SolidColorBrush>#FF606060</SolidColorBrush>
                                                                    </Setter.Value>
                                                                </Setter>
                                                                <Trigger.Value>
                                                                    <s:Boolean>True</s:Boolean>
                                                                </Trigger.Value>
                                                            </Trigger>
                                                            <Trigger Property="UIElement.IsEnabled">
                                                                <Setter Property="UIElement.Opacity" TargetName="contentPresenter">
                                                                    <Setter.Value>
                                                                        <s:Double>0.56</s:Double>
                                                                    </Setter.Value>
                                                                </Setter>
                                                                <Setter Property="Panel.Background" TargetName="border">
                                                                    <Setter.Value>
                                                                        <SolidColorBrush>#FFF0F0F0</SolidColorBrush>
                                                                    </Setter.Value>
                                                                </Setter>
                                                                <Setter Property="Border.BorderBrush" TargetName="border">
                                                                    <Setter.Value>
                                                                        <SolidColorBrush>#FFF0F0F0</SolidColorBrush>
                                                                    </Setter.Value>
                                                                </Setter>
                                                                <Trigger.Value>
                                                                    <s:Boolean>False</s:Boolean>
                                                                </Trigger.Value>
                                                            </Trigger>
                                                        </ControlTemplate.Triggers>
                                                    </ControlTemplate>
                                                </Setter.Value>
                                            </Setter>
                                        </Style>
                                    </RepeatButton.Style>
                                    <Path Data="M0,4C0,4 0,6 0,6 0,6 3.5,2.5 3.5,2.5 3.5,2.5 7,6 7,6 7,6 7,4 7,4 7,4 3.5,0.5 3.5,0.5 3.5,0.5 0,4 0,4z" Stretch="Uniform" Fill="#FF606060" Name="ArrowTop" Margin="3,4,3,3" />
                                </RepeatButton>
    [/code]
      

  10.   

    这是因为是为RepeatButton.Border.BorderThickness设置样式!