Subversion Repository Public Repository

Nextrek

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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Facebook.Client.Controls">

    <local:ColorLuminosityConverter x:Key="ColorLuminosityConverter" />
    <local:ScaleConverter x:Key="ScaleConverter" />
    <local:IsNullOrEmptyConverter x:Key="IsNullOrEmptyConverter" />

    <Style TargetType="local:LoginButton">
        <Setter Property="Background">
            <Setter.Value>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FF506DA0"/>
                    <GradientStop Color="#FF385588" Offset="1"/>
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground" Value="{StaticResource ButtonForegroundThemeBrush}"/>
        <Setter Property="BorderBrush" Value="{StaticResource ButtonBorderThemeBrush}"/>
        <Setter Property="BorderThickness" Value="{StaticResource ButtonBorderThemeThickness}"/>
        <Setter Property="Padding" Value="12,2,12,2"/>
        <Setter Property="FontFamily" Value="{StaticResource ContentControlThemeFontFamily}"/>
        <Setter Property="FontWeight" Value="Medium" />
        <Setter Property="CornerRadius" Value="8" />
        <Setter Property="FontFamily" Value="Segoe UI" />
        <Setter Property="Width" Value="140" />
        <Setter Property="Height" Value="50" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:LoginButton">
                    <Button x:Name="PART_LoginButton"
                            IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ApplicationId, Converter={StaticResource IsNullOrEmptyConverter}, ConverterParameter=True}"
                            Background="{TemplateBinding Background}" 
                            Foreground="{TemplateBinding Foreground}" 
                            BorderBrush="{TemplateBinding BorderBrush}" 
                            BorderThickness="{TemplateBinding BorderThickness}" 
                            Padding="{TemplateBinding Padding}" 
                            FontFamily="{TemplateBinding FontFamily}" 
                            FontWeight="{TemplateBinding FontWeight}"
                            Width="{TemplateBinding Width}" 
                            Height="{TemplateBinding Height}">
                        <Button.Template>
                            <ControlTemplate>
                                <Grid>
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualState x:Name="Normal"/>
                                            <VisualState x:Name="PointerOver">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="Border">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, 
                                                                                                            Path=Background,
                                                                                                            Converter={StaticResource ColorLuminosityConverter},
                                                                                                            ConverterParameter=0.7}"/>
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonPointerOverForegroundThemeBrush}"/>
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="Border">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, 
                                                                                                            Path=Background,
                                                                                                            Converter={StaticResource ColorLuminosityConverter},
                                                                                                            ConverterParameter=1.3}"/>
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Disabled">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="Border">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, 
                                                                                                            Path=Background,
                                                                                                            Converter={StaticResource ColorLuminosityConverter},
                                                                                                            ConverterParameter=0.7}"/>
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="Border">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonDisabledBorderThemeBrush}"/>
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonDisabledForegroundThemeBrush}"/>
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                        <VisualStateGroup x:Name="FocusStates">
                                            <VisualState x:Name="Focused">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualWhite"/>
                                                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualBlack"/>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Unfocused"/>
                                            <VisualState x:Name="PointerFocused"/>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Border x:Name="Border" 
                                            BorderBrush="{TemplateBinding BorderBrush}" 
                                            BorderThickness="{TemplateBinding BorderThickness}" 
                                            Background="{TemplateBinding Background}" 
                                            CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext.CornerRadius}"
                                            Padding="{TemplateBinding Padding}">
                                        <ContentPresenter x:Name="ContentPresenter" 
                                                          Foreground="{TemplateBinding Foreground}">
                                            <Grid>
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="40*"/>
                                                    <ColumnDefinition Width="2"/>
                                                    <ColumnDefinition Width="2"/>
                                                    <ColumnDefinition Width="100*"/>
                                                </Grid.ColumnDefinitions>
                                                <TextBlock
                                                        Grid.Column="0" 
                                                        Text="f"
                                                        VerticalAlignment="Center"
                                                        HorizontalAlignment="Center"
                                                        FontFamily="{TemplateBinding FontFamily}"
                                                        FontWeight="Bold"
                                                        FontSize="{Binding RelativeSource={RelativeSource TemplatedParent}, 
                                                                            Path=Width,
                                                                            Converter={StaticResource ScaleConverter},
                                                                            ConverterParameter=0.30}"/>
                                                <Rectangle Grid.Column="1" 
                                                           VerticalAlignment="Stretch" 
                                                           HorizontalAlignment="Stretch" 
                                                           Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, 
                                                                            Path=Background,
                                                                            Converter={StaticResource ColorLuminosityConverter},
                                                                            ConverterParameter=0.75}"/>
                                                <Rectangle Grid.Column="2" 
                                                           VerticalAlignment="Stretch" 
                                                           HorizontalAlignment="Stretch" 
                                                           Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, 
                                                                            Path=Background,
                                                                            Converter={StaticResource ColorLuminosityConverter},
                                                                            ConverterParameter=1.25}"/>
                                                <TextBlock
                                                    Grid.Column="3"
                                                    Padding="10"
                                                    HorizontalAlignment="Center" 
                                                    VerticalAlignment="Center" 
                                                    TextWrapping="Wrap"
                                                    TextAlignment="Center"
                                                    FontSize="{Binding RelativeSource={RelativeSource TemplatedParent}, 
                                                                        Path=Width,
                                                                        Converter={StaticResource ScaleConverter},
                                                                        ConverterParameter=0.11}"
                                                    Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext.Caption}"
                                                    />
                                                
                                                
                                            </Grid>
                                        </ContentPresenter>
                                    </Border>
                                    <Rectangle x:Name="FocusVisualWhite" 
                                               IsHitTestVisible="False" 
                                               Opacity="0" 
                                               StrokeDashOffset="1.5" 
                                               StrokeEndLineCap="Square" 
                                               Stroke="{StaticResource FocusVisualWhiteStrokeThemeBrush}" 
                                               StrokeDashArray="1,1"/>
                                    <Rectangle x:Name="FocusVisualBlack" 
                                               IsHitTestVisible="False" 
                                               Opacity="0" 
                                               StrokeDashOffset="0.5" 
                                               StrokeEndLineCap="Square" 
                                               Stroke="{StaticResource FocusVisualBlackStrokeThemeBrush}" 
                                               StrokeDashArray="1,1"/>
                                </Grid>
                            </ControlTemplate>
                        </Button.Template>
                    </Button>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>

Commits for Nextrek/Android/SmartCharging/SmartCharging_WP/packages/Facebook.Client.1.0.4/lib/win8/Facebook.Client/Controls/LoginButton/LoginButton.xaml

Diff revisions: vs.
Revision Author Commited Message
799 JMBauan picture JMBauan Thu 08 Oct, 2015 13:36:32 +0000