-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
768c7d5
commit b13fa20
Showing
6 changed files
with
215 additions
and
12 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
|
||
<ResourceDictionary | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:k="using:Microsoft.Kinect.Xaml.Controls"> | ||
|
||
<ExponentialEase x:Key="VisualStateEasingFunction" Exponent="7" /> | ||
|
||
<Style TargetType="k:KinectRegion"> | ||
<Setter Property="Template"> | ||
<Setter.Value> | ||
<ControlTemplate TargetType="k:KinectRegion"> | ||
<Border | ||
Background="{TemplateBinding Background}" | ||
BorderBrush="{TemplateBinding BorderBrush}" | ||
BorderThickness="{TemplateBinding BorderThickness}" | ||
> | ||
<Grid> | ||
<ContentPresenter x:Name="contentHolder" /> | ||
|
||
<!-- only change from default KinectRegion style, | ||
is the addition of a user viewer under cursor layer, | ||
but above content --> | ||
<k:KinectUserViewer Height="100" Width="121" | ||
HorizontalAlignment="Center" | ||
VerticalAlignment="Top" /> | ||
|
||
<Canvas x:Name="cursorRenderingLayer" Background="{x:Null}"/> | ||
</Grid> | ||
</Border> | ||
</ControlTemplate> | ||
</Setter.Value> | ||
</Setter> | ||
</Style> | ||
|
||
<!-- | ||
BackButtons have a small visible area. | ||
The changes in this style (change margin to padding, set kinectpressinset, | ||
add border to template to support padding) enable a larger hit test region | ||
for HandPointers | ||
--> | ||
<Style x:Key="KinectBackButtonStyle" TargetType="Button"> | ||
<Setter Property="MinWidth" Value="48"/> | ||
<Setter Property="MinHeight" Value="48"/> | ||
<Setter Property="Padding" Value="36,56,36,36" /> | ||
<Setter Property="k:KinectRegion.KinectPressInset" Value="36,56,36,36" /> | ||
<Setter Property="VerticalAlignment" Value="Top"/> | ||
<Setter Property="FontFamily" Value="Segoe UI Symbol"/> | ||
<Setter Property="FontWeight" Value="Normal"/> | ||
<Setter Property="FontSize" Value="56"/> | ||
<Setter Property="AutomationProperties.AutomationId" Value="BackButton"/> | ||
<Setter Property="AutomationProperties.Name" Value="Back"/> | ||
<Setter Property="AutomationProperties.ItemType" Value="Navigation Button"/> | ||
<Setter Property="Template"> | ||
<Setter.Value> | ||
<ControlTemplate TargetType="Button"> | ||
<Grid x:Name="RootGrid"> | ||
<Border Padding="{TemplateBinding Padding}" Background="Transparent"> | ||
<Grid Margin="-1,-16,0,0"> | ||
<TextBlock x:Name="BackgroundGlyph" Text="" Foreground="{StaticResource BackButtonBackgroundThemeBrush}"/> | ||
<TextBlock x:Name="NormalGlyph" Text="" Foreground="{StaticResource BackButtonForegroundThemeBrush}"/> | ||
<TextBlock x:Name="ArrowGlyph" Text="" Foreground="{StaticResource BackButtonPressedForegroundThemeBrush}" Opacity="0"/> | ||
</Grid> | ||
</Border> | ||
<Rectangle | ||
x:Name="FocusVisualWhite" | ||
IsHitTestVisible="False" | ||
Stroke="{StaticResource FocusVisualWhiteStrokeThemeBrush}" | ||
StrokeEndLineCap="Square" | ||
StrokeDashArray="1,1" | ||
Opacity="0" | ||
StrokeDashOffset="1.5"/> | ||
<Rectangle | ||
x:Name="FocusVisualBlack" | ||
IsHitTestVisible="False" | ||
Stroke="{StaticResource FocusVisualBlackStrokeThemeBrush}" | ||
StrokeEndLineCap="Square" | ||
StrokeDashArray="1,1" | ||
Opacity="0" | ||
StrokeDashOffset="0.5"/> | ||
|
||
<VisualStateManager.VisualStateGroups> | ||
<VisualStateGroup x:Name="CommonStates"> | ||
<VisualState x:Name="Normal" /> | ||
<VisualState x:Name="PointerOver"> | ||
<Storyboard> | ||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGlyph" Storyboard.TargetProperty="Foreground"> | ||
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource BackButtonPointerOverBackgroundThemeBrush}"/> | ||
</ObjectAnimationUsingKeyFrames> | ||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalGlyph" Storyboard.TargetProperty="Foreground"> | ||
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource BackButtonPointerOverForegroundThemeBrush}"/> | ||
</ObjectAnimationUsingKeyFrames> | ||
</Storyboard> | ||
</VisualState> | ||
<VisualState x:Name="Pressed"> | ||
<Storyboard> | ||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGlyph" Storyboard.TargetProperty="Foreground"> | ||
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource BackButtonForegroundThemeBrush}"/> | ||
</ObjectAnimationUsingKeyFrames> | ||
<DoubleAnimation | ||
Storyboard.TargetName="ArrowGlyph" | ||
Storyboard.TargetProperty="Opacity" | ||
To="1" | ||
Duration="0"/> | ||
<DoubleAnimation | ||
Storyboard.TargetName="NormalGlyph" | ||
Storyboard.TargetProperty="Opacity" | ||
To="0" | ||
Duration="0"/> | ||
</Storyboard> | ||
</VisualState> | ||
<VisualState x:Name="Disabled"> | ||
<Storyboard> | ||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="Visibility"> | ||
<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/> | ||
</ObjectAnimationUsingKeyFrames> | ||
</Storyboard> | ||
</VisualState> | ||
</VisualStateGroup> | ||
<VisualStateGroup x:Name="FocusStates"> | ||
<VisualState x:Name="Focused"> | ||
<Storyboard> | ||
<DoubleAnimation | ||
Storyboard.TargetName="FocusVisualWhite" | ||
Storyboard.TargetProperty="Opacity" | ||
To="1" | ||
Duration="0"/> | ||
<DoubleAnimation | ||
Storyboard.TargetName="FocusVisualBlack" | ||
Storyboard.TargetProperty="Opacity" | ||
To="1" | ||
Duration="0"/> | ||
</Storyboard> | ||
</VisualState> | ||
<VisualState x:Name="Unfocused" /> | ||
<VisualState x:Name="PointerFocused" /> | ||
</VisualStateGroup> | ||
</VisualStateManager.VisualStateGroups> | ||
</Grid> | ||
</ControlTemplate> | ||
</Setter.Value> | ||
</Setter> | ||
</Style> | ||
|
||
</ResourceDictionary> |
This file contains 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
This file contains 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