Created
October 8, 2010 21:02
-
-
Save rkusa/617543 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Style TargetType="controls:PickerBox"> | |
<Setter Property="Template"> | |
<Setter.Value> | |
<ControlTemplate TargetType="controls:PickerBox"> | |
<StackPanel> | |
<VisualStateManager.VisualStateGroups> | |
<VisualStateGroup x:Name="ButtonStates"> | |
<VisualStateGroup.Transitions> | |
<VisualTransition GeneratedDuration="0:0:0.1"/> | |
</VisualStateGroup.Transitions> | |
<VisualState x:Name="Pressed"> | |
<Storyboard> | |
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PopupToggle" Storyboard.TargetProperty="Background"> | |
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneRadioCheckBoxPressedBrush}" /> | |
</ObjectAnimationUsingKeyFrames> | |
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PopupToggle" Storyboard.TargetProperty="BorderBrush"> | |
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneRadioCheckBoxPressedBorderBrush}" /> | |
</ObjectAnimationUsingKeyFrames> | |
</Storyboard> | |
</VisualState> | |
<VisualState x:Name="Normal"/> | |
</VisualStateGroup> | |
</VisualStateManager.VisualStateGroups> | |
<TextBlock Text="{TemplateBinding Label}" Style="{StaticResource PhoneTextSubtleStyle}" /> | |
<ListBoxItem Content="{TemplateBinding SelectedItem}" | |
ContentTemplate="{TemplateBinding ItemTemplate}" | |
x:Name="PopupToggle" Margin="20,0" controls:TiltEffect.IsTiltEnabled="True" | |
BorderThickness="2" BorderBrush="{StaticResource PhoneRadioCheckBoxBrush}" | |
Background="{StaticResource PhoneRadioCheckBoxBrush}" Foreground="{TemplateBinding Foreground}"/> | |
<Popup x:Name="PickerPopup" IsOpen="False" Width="480" Height="800"> | |
<Border Background="{StaticResource PhoneChromeBrush}" Width="480" Height="800" Padding="0,32,0,0"> | |
<StackPanel> | |
<TextBlock x:Name="PickerListHeader" Text="{TemplateBinding Header}" Style="{StaticResource PhoneTextBlockBase}" FontSize="24" Margin="25,20,0,20"/> | |
<ListBox x:Name="PickerListBox" Height="696" controls:TiltEffect.IsTiltEnabled="True" ItemContainerStyle="{StaticResource PickerBoxItemStyle}" ItemTemplate="{TemplateBinding ItemTemplate}" /> | |
</StackPanel> | |
</Border> | |
</Popup> | |
</StackPanel> | |
</ControlTemplate> | |
</Setter.Value> | |
</Setter> | |
</Style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment