2Bbear's knowledge workshop

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<Style x:Key="TopReportCheckBox" TargetType="CheckBox">
        <Setter Property="FontSize" Value="14"/>
        <Setter Property="Foreground" Value="#6D6E71" /> <!-- 이건 옆에 글자 색상을 정함 -->
        <Setter Property="BorderBrush" Value="AliceBlue"/> <!-- 이 부분이 사각형의 색상을 바꾸는 부분인거 같다.-->
        <Setter Property="SnapsToDevicePixels" Value="True"/> <!-- 이게 뭘까....-->
        <Setter Property="OverridesDefaultStyle" Value="True"/> <!-- 기본 체크박스 스타일을 상속받겠다는 의미-->
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="CheckBox">
                    <BulletDecorator Background="Transparent"> <!-- 게시판 데코레이터를 이용한다-->
                        <BulletDecorator.Bullet>
                            <Border x:Name="Border" Width="13" Height="13" CornerRadius="0" Background="White" BorderThickness="1" BorderBrush="#FF4590FD"  >
                                <Path Width="10" Height="10"  x:Name="CheckMark" SnapsToDevicePixels="False" Stroke="#FF4590FD" StrokeThickness="2" Data="M 0 0 L 5 9 M 5 9 L 9 0" /> <!-- 이 부분이 체크 할때 생겨나는 체크 표시를 나타내는 V 표시를 그리는 부분 -->
                            </Border>
                        </BulletDecorator.Bullet>
                        <ContentPresenter Margin="4,0,0,0"  VerticalAlignment="Center" HorizontalAlignment="Left" RecognizesAccessKey="True"/>
                    </BulletDecorator>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked" Value="false">
                            <Setter TargetName="CheckMark" Property="Visibility" Value="Collapsed"/>
                        </Trigger>
                        <Trigger Property="IsChecked" Value="{x:Null}">
                            <Setter TargetName="CheckMark" Property="Data" Value="M 0 7 L 7 0" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter TargetName="Border" Property="Background" Value="#808080" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="true">
                            <Setter TargetName="Border" Property="Background" Value="#E0E0E0" />
                            <Setter TargetName="Border" Property="BorderBrush" Value="#606060" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter TargetName="Border" Property="Background" Value="#EEEEEE" />
                            <Setter TargetName="Border" Property="BorderBrush" Value="#AAAAAA" />
                            <Setter Property="Foreground" Value="#888888"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
http://colorscripter.com/info#e" target="_blank" style="color:#4f4f4f; text-decoration:none">Colored by Color Scripter
http://colorscripter.com/info#e" target="_blank" style="text-decoration:none; color:white">cs

Comment +0