IoT Xbox MenuFlyout mf = new MenuFlyout(); mf.ShowAt(sender, e.GetPosition(sender)); Scale Factors 100 125 150

Download Report

Transcript IoT Xbox MenuFlyout mf = new MenuFlyout(); mf.ShowAt(sender, e.GetPosition(sender)); Scale Factors 100 125 150

IoT
Xbox
MenuFlyout mf = new MenuFlyout();
mf.ShowAt(sender, e.GetPosition(sender));
Scale
Factors
100 125 150
200
250
300
400
Glenn Versweyveld (@depechie)
Deani Hansen (@deanihansen)
http://bit.ly/1P2jvAp
<VisualStateGroup x:Name="WindowSizeStates">
<VisualState x:Name="WideState">
<VisualState.StateTriggers>
<AdaptiveTrigger MinWindowWidth="720" />
</VisualState.StateTriggers>
<VisualState.Setters>
<Setter Target="MySplitView.IsPaneOpen" Value="True" />
<Setter Target="MySplitView.DisplayMode" Value="Inline" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
<VisualState x:Name="Pressed">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid"
Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource
SystemControlBackgroundBaseMediumLowBrush}" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
Storyboard.TargetProperty="BorderBrush">
DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource
SystemControlHighlightTransparentBrush}" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource
SystemControlHighlightBaseHighBrush}" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<RelativePanel x:Name="panel" Margin="4.75" Height="190">
<Image x:Name="MapImage" controls:GoogleImageDependencyObject.GoogleImageUrl="{Binding Map}" Stretch="None“
RelativePanel.AlignBottomWithPanel="True" RelativePanel.AlignLeftWithPanel="True" RelativePanel.AlignRightWithPanel="True"
RelativePanel.AlignTopWithPanel="True" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
<Rectangle x:Name="topRect" Fill="White" Opacity="0.85" Height="30“ RelativePanel.AlignBottomWithPanel="True“
RelativePanel.AlignLeftWithPanel="True" RelativePanel.AlignRightWithPanel="True" HorizontalAlignment="Stretch"/>
<Rectangle x:Name="bottomRect" Fill="White" Opacity="0.85" Height="45“ RelativePanel.AlignTopWithPanel="True“
RelativePanel.AlignLeftWithPanel="True" RelativePanel.AlignRightWithPanel="True" HorizontalAlignment="Stretch"/>
<Image Source="{Binding TypeImageUrl}" Height="18" Margin="4.75“ RelativePanel.AlignBottomWithPanel="True“
RelativePanel.AlignLeftWithPanel="True"/>
<Image Source="ms-appx:///Assets/ThumbsUp.png" Height="18" Margin="4.75" RelativePanel.AlignBottomWithPanel="True"
RelativePanel.AlignHorizontalCenterWithPanel="True"/>
<Image Source="ms-appx:///Assets/appbar.trophy.png" Height="18" Margin="4.75" RelativePanel.AlignBottomWithPanel="True"
RelativePanel.AlignRightWithPanel="True"/>
<Ellipse x:Name="profilePic" Style="{StaticResource ProfileEllipse}" Margin="4.75“ RelativePanel.AlignLeftWithPanel="True"
RelativePanel.AlignTopWithPanel="True">
…
</Ellipse>
<TextBlock x:Name="ActivityName" Text="{Binding Name}" TextTrimming="CharacterEllipsis" Foreground="{StaticResource
KlivaMainBrush}" Margin="0,0,4.75,0" FontFamily="{StaticResource OpenSansFontSemibold}“ RelativePanel.AlignTopWithPanel="True"
RelativePanel.RightOf="profilePic"/>
<TextBlock x:Name="ActivityMetaData" Text="{Binding Athlete.FullName}" RequestedTheme="Light" Margin="0,-2.375,4.75,0“
FontFamily="{StaticResource OpenSansFontLight}“ RelativePanel.RightOf="profilePic" RelativePanel.Below="ActivityName"/>
<TextBlock x:Name="ActivityDateTime" Text="{Binding StartDate, Converter={StaticResource RelativeTimeConverter}}"
FontFamily="{StaticResource OpenSansFontSemibold}" Foreground="DarkGray" Margin="4.75,-2.375,4.75,0" />
</RelativePanel>
using
using
// give haptic feedback for an error
if
"Windows.Phone.Devices.Notifications.VibrationDevice"
VibrationDevice
TimeSpan
public class InputTypeTrigger : StateTriggerBase
{
private FrameworkElement _targetElement;
private PointerDeviceType _lastPointerType, _triggerPointerType;
public FrameworkElement TargetElement
{
get { return _targetElement; }
set
{
_targetElement = value;
_targetElement.AddHandler(FrameworkElement.PointerPressedEvent, new
PointerEventHandler(_targetElement_PointerPressed), true);
}
}
public PointerDeviceType PointerType
{
get { return _triggerPointerType; }
set { _triggerPointerType = value; }
}
private void _targetElement_PointerPressed(object sender, PointerRoutedEventArgs e)
{
_lastPointerType = e.Pointer.PointerDeviceType;
SetActive(_triggerPointerType == _lastPointerType);
}
}
xmlns:triggers="using:StravaMobile.UAP.Triggers"
<VisualStateGroup x:Name="InputTypeStates">
<VisualState>
<VisualState.StateTriggers>
<triggers:InputTypeTrigger TargetElement="{x:Bind ActivityList}"
PointerType="Touch" />
<triggers:InputTypeTrigger TargetElement="{x:Bind ActivityList}"
PointerType="Pen" />
</VisualState.StateTriggers>
<VisualState.Setters>
<Setter Target="GoToTopButton.Visibility" Value="Visible" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
http://github.com/dotMorten/WindowsStateTriggers
Morten Nielsen
Windows Developer MVP (@dotMorten)
//Get the diagonal size of the integrated display
var dsc = new DisplaySizeHelper.DisplaySizeClass();
double _actualSizeInInches = dsc.GetDisplaySizeInInches();
//Guidance: If the diagonal size is <= 7" use the OneHanded optimized view
if ( _actualSizeInInches >0 && _actualSizeInInches <= ONEHANDEDSIZE)
{
rootFrame.Navigate(typeof(MainPage_OneHanded), e.Arguments);
}
else
{
rootFrame.Navigate(typeof(MainPage), e.Arguments);
}
Commands at the
top vs. bottom
SplitView vs. Pivot
Session Title
Speakers
Session
Code
What's New in XAML for Universal Windows Apps
Joe Stegman
629
XAML Performance: Techniques for Maximizing Universal Windows App
Experiences Built with XAML
Mark Alcazar
Kiran Kumar
689
API Contracts (or How I Learned to Stop Checking OS Versions and Love
Feature Detection)
Brent Rector
733
Optimizing Windows Apps for Continuum
Liz Threlkeld
703
Navigation and Windowing in Windows Apps
Roberth Karman
779
Display Scaling: What it is and why it matters to you
Steve Wright
263
New XAML Tools in Visual Studio 2015
Unni
Ravindranathan
697
Developing Universal Windows Apps in Visual Studio 2015
Navit Saxena
650