styled windows push sample.
Двоичные данные
Assets/Logo.png
До Ширина: | Высота: | Размер: 801 B |
Двоичные данные
Assets/SmallLogo.png
До Ширина: | Высота: | Размер: 329 B |
Двоичные данные
Assets/SplashScreen.png
До Ширина: | Высота: | Размер: 2.1 KiB |
Двоичные данные
Assets/SplashScreen.scale-100.png
До Ширина: | Высота: | Размер: 7.0 KiB |
Двоичные данные
Assets/StoreLogo.png
До Ширина: | Высота: | Размер: 429 B |
После Ширина: | Высота: | Размер: 2.6 KiB |
После Ширина: | Высота: | Размер: 372 B |
После Ширина: | Высота: | Размер: 485 B |
После Ширина: | Высота: | Размер: 632 B |
После Ширина: | Высота: | Размер: 7.2 KiB |
Двоичные данные
Assets/tile_telerik_platform_150x150.png
До Ширина: | Высота: | Размер: 6.4 KiB |
Двоичные данные
Assets/tile_telerik_platform_24x24.png
До Ширина: | Высота: | Размер: 1.7 KiB |
Двоичные данные
Assets/tile_telerik_platform_30x30.png
До Ширина: | Высота: | Размер: 1.8 KiB |
Двоичные данные
Assets/tile_telerik_platform_50x50.png
До Ширина: | Высота: | Размер: 1.7 KiB |
Двоичные данные
Assets/tile_telerik_platform_620x300.png
До Ширина: | Высота: | Размер: 7.0 KiB |
509
MainPage.xaml
|
@ -9,123 +9,424 @@
|
|||
|
||||
<Page.Resources>
|
||||
<local:InverseBooleanConverter x:Name="inverseBooleanConverter" />
|
||||
</Page.Resources>
|
||||
<Grid Background="#2D3F51">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="300" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="200" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Margin="35" Grid.Row="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="250" />
|
||||
<ColumnDefinition Width="940" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="50" />
|
||||
<RowDefinition Height="50" />
|
||||
</Grid.RowDefinitions>
|
||||
<Button Content="Register" Click="OnRegisterClick"
|
||||
Grid.Column="0" Grid.Row="0" Width="200" Padding="5"
|
||||
IsEnabled="{Binding IsDeviceRegistered, Converter={StaticResource inverseBooleanConverter}}"/>
|
||||
<Button Content="Unregister" Click="OnUnregisterClick"
|
||||
Grid.Column="0" Grid.Row="1" Width="200" Padding="5"
|
||||
IsEnabled="{Binding IsDeviceRegistered}"/>
|
||||
<Grid Grid.Column="1" Grid.Row="0">
|
||||
<ControlTemplate x:Key="ButtonControlTemplate1" TargetType="Button">
|
||||
<Grid>
|
||||
<VisualStateManager.VisualStateGroups>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="PointerOver">
|
||||
<Storyboard>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border"
|
||||
Storyboard.TargetProperty="Background">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="#112C3D4F" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border"
|
||||
Storyboard.TargetProperty="BorderBrush">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="#B22C3D4F" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
</VisualState>
|
||||
<VisualState x:Name="Pressed">
|
||||
<Storyboard>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border"
|
||||
Storyboard.TargetProperty="BorderBrush">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="#FF2C3D4F" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border"
|
||||
Storyboard.TargetProperty="Background">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="#192C3D4F" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
</VisualState>
|
||||
<VisualState x:Name="Disabled">
|
||||
<Storyboard>
|
||||
<DoubleAnimation Storyboard.TargetName="Border"
|
||||
Storyboard.TargetProperty="Opacity"
|
||||
To="0.5"
|
||||
Duration="0" />
|
||||
</Storyboard>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
<VisualStateGroup x:Name="FocusStates">
|
||||
<VisualState x:Name="Unfocused" />
|
||||
<VisualState x:Name="PointerFocused" />
|
||||
</VisualStateGroup>
|
||||
</VisualStateManager.VisualStateGroups>
|
||||
<Border x:Name="Border"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
Margin="3">
|
||||
<ContentPresenter x:Name="ContentPresenter"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTransitions="{TemplateBinding ContentTransitions}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
|
||||
</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" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
<ControlTemplate x:Key="TextBoxControlTemplate1" TargetType="TextBox">
|
||||
<Grid>
|
||||
<Grid.Resources>
|
||||
<Style x:Name="DeleteButtonStyle" TargetType="Button">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Grid>
|
||||
<VisualStateManager.VisualStateGroups>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="PointerOver">
|
||||
<Storyboard>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundElement"
|
||||
Storyboard.TargetProperty="Background">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TextBoxButtonPointerOverBackgroundThemeBrush}" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement"
|
||||
Storyboard.TargetProperty="BorderBrush">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TextBoxButtonPointerOverBorderThemeBrush}" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="GlyphElement"
|
||||
Storyboard.TargetProperty="Foreground">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TextBoxButtonPointerOverForegroundThemeBrush}" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
</VisualState>
|
||||
<VisualState x:Name="Pressed">
|
||||
<Storyboard>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundElement"
|
||||
Storyboard.TargetProperty="Background">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TextBoxButtonPressedBackgroundThemeBrush}" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement"
|
||||
Storyboard.TargetProperty="BorderBrush">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TextBoxButtonPressedBorderThemeBrush}" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="GlyphElement"
|
||||
Storyboard.TargetProperty="Foreground">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TextBoxButtonPressedForegroundThemeBrush}" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
</VisualState>
|
||||
<VisualState x:Name="Disabled">
|
||||
<Storyboard>
|
||||
<DoubleAnimation Storyboard.TargetName="BackgroundElement"
|
||||
Storyboard.TargetProperty="Opacity"
|
||||
To="0"
|
||||
Duration="0" />
|
||||
<DoubleAnimation Storyboard.TargetName="BorderElement"
|
||||
Storyboard.TargetProperty="Opacity"
|
||||
To="0"
|
||||
Duration="0" />
|
||||
</Storyboard>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateManager.VisualStateGroups>
|
||||
<Border x:Name="BorderElement"
|
||||
BorderBrush="{StaticResource TextBoxButtonBorderThemeBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"/>
|
||||
<Border x:Name="BackgroundElement"
|
||||
Background="{StaticResource TextBoxButtonBackgroundThemeBrush}"
|
||||
Margin="{TemplateBinding BorderThickness}">
|
||||
<TextBlock x:Name="GlyphElement"
|
||||
Foreground="{StaticResource TextBoxButtonForegroundThemeBrush}"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center"
|
||||
Text=""
|
||||
FontFamily="{StaticResource SymbolThemeFontFamily}"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</Grid.Resources>
|
||||
<VisualStateManager.VisualStateGroups>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Disabled">
|
||||
<Storyboard>
|
||||
<DoubleAnimation Storyboard.TargetName="BorderElement"
|
||||
Storyboard.TargetProperty="Opacity"
|
||||
To="0.2" Duration="0" />
|
||||
<DoubleAnimation Storyboard.TargetName="BackgroundElement"
|
||||
Storyboard.TargetProperty="Opacity"
|
||||
To="0.2" Duration="0" />
|
||||
<!--<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundElement"
|
||||
Storyboard.TargetProperty="Background">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TextBoxDisabledBackgroundThemeBrush}" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement"
|
||||
Storyboard.TargetProperty="BorderBrush">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TextBoxDisabledBorderThemeBrush}" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentElement"
|
||||
Storyboard.TargetProperty="Foreground">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TextBoxDisabledForegroundThemeBrush}" />
|
||||
</ObjectAnimationUsingKeyFrames>-->
|
||||
</Storyboard>
|
||||
</VisualState>
|
||||
<VisualState x:Name="Normal">
|
||||
<Storyboard>
|
||||
<DoubleAnimation Storyboard.TargetName="BackgroundElement"
|
||||
Storyboard.TargetProperty="Opacity"
|
||||
Duration="0"
|
||||
To="{StaticResource TextControlBackgroundThemeOpacity}" />
|
||||
<DoubleAnimation Storyboard.TargetName="BorderElement"
|
||||
Storyboard.TargetProperty="Opacity"
|
||||
Duration="0"
|
||||
To="{StaticResource TextControlBorderThemeOpacity}" />
|
||||
</Storyboard>
|
||||
</VisualState>
|
||||
<VisualState x:Name="PointerOver">
|
||||
<Storyboard>
|
||||
<DoubleAnimation Storyboard.TargetName="BackgroundElement"
|
||||
Storyboard.TargetProperty="Opacity"
|
||||
Duration="0"
|
||||
To="{StaticResource TextControlPointerOverBackgroundThemeOpacity}" />
|
||||
<DoubleAnimation Storyboard.TargetName="BorderElement"
|
||||
Storyboard.TargetProperty="Opacity"
|
||||
Duration="0"
|
||||
To="{StaticResource TextControlPointerOverBorderThemeOpacity}" />
|
||||
</Storyboard>
|
||||
</VisualState>
|
||||
<VisualState x:Name="Focused" />
|
||||
</VisualStateGroup>
|
||||
<VisualStateGroup x:Name="ButtonStates">
|
||||
<VisualState x:Name="ButtonVisible">
|
||||
<Storyboard>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="DeleteButton"
|
||||
Storyboard.TargetProperty="Visibility">
|
||||
<DiscreteObjectKeyFrame KeyTime="0">
|
||||
<DiscreteObjectKeyFrame.Value>
|
||||
<Visibility>Visible</Visibility>
|
||||
</DiscreteObjectKeyFrame.Value>
|
||||
</DiscreteObjectKeyFrame>
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
</VisualState>
|
||||
<VisualState x:Name="ButtonCollapsed" />
|
||||
</VisualStateGroup>
|
||||
</VisualStateManager.VisualStateGroups>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="200" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="Toast message:"
|
||||
Grid.Column="0"
|
||||
Margin="3, 7, 0, 7" Padding="3" FontSize="20"/>
|
||||
<TextBox x:Name="pushNotificationMessage"
|
||||
Grid.Column="1" Margin="3, 7, 0, 7" Padding="3"
|
||||
<Border x:Name="BackgroundElement"
|
||||
Background="{TemplateBinding Background}"
|
||||
Margin="{TemplateBinding BorderThickness}"
|
||||
Grid.ColumnSpan="2"/>
|
||||
<Border x:Name="BorderElement"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
Grid.ColumnSpan="2"/>
|
||||
<ScrollViewer x:Name="ContentElement"
|
||||
HorizontalScrollMode="{TemplateBinding ScrollViewer.HorizontalScrollMode}"
|
||||
HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
|
||||
VerticalScrollMode="{TemplateBinding ScrollViewer.VerticalScrollMode}"
|
||||
VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
|
||||
IsHorizontalRailEnabled="{TemplateBinding ScrollViewer.IsHorizontalRailEnabled}"
|
||||
IsVerticalRailEnabled="{TemplateBinding ScrollViewer.IsVerticalRailEnabled}"
|
||||
IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}"
|
||||
Margin="{TemplateBinding BorderThickness}"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
IsTabStop="False"
|
||||
ZoomMode="Disabled" />
|
||||
<Button x:Name="DeleteButton"
|
||||
Style="{StaticResource DeleteButtonStyle}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
IsTabStop="False"
|
||||
Grid.Column="1"
|
||||
Visibility="Collapsed"
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
VerticalAlignment="Stretch"/>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
<Style x:Key="buttonStyle" TargetType="Button">
|
||||
<Setter Property="Foreground" Value="#FF2C3D4F" />
|
||||
<Setter Property="BorderBrush" Value="#FF2C3D4F" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="FontFamily" Value="Open-Sans" />
|
||||
<Setter Property="FontWeight" Value="SemiBold" />
|
||||
<Setter Property="FontSize" Value="14" />
|
||||
<Setter Property="Template" Value="{StaticResource ButtonControlTemplate1}" />
|
||||
</Style>
|
||||
<Style x:Key="textBoxStyle" TargetType="TextBox">
|
||||
<Setter Property="Foreground" Value="#FF2C3D4F" />
|
||||
<Setter Property="BorderBrush" Value="#FFDBE3E4" />
|
||||
<Setter Property="BorderThickness" Value="2" />
|
||||
<Setter Property="FontSize" Value="14" />
|
||||
<Setter Property="Height" Value="35" />
|
||||
<Setter Property="Template" Value="{StaticResource TextBoxControlTemplate1}" />
|
||||
</Style>
|
||||
<Style x:Key="textBlockStyleBold" TargetType="TextBlock">
|
||||
<Setter Property="FontSize" Value="16" />
|
||||
<Setter Property="FontWeight" Value="SemiBold" />
|
||||
<Setter Property="Foreground" Value="#FF2C3D4F" />
|
||||
<Setter Property="Margin" Value="3, 0, 0, 0" />
|
||||
</Style>
|
||||
<Style x:Key="textBlockStyle" TargetType="TextBlock">
|
||||
<Setter Property="FontSize" Value="13" />
|
||||
<Setter Property="Foreground" Value="#FF2C3D4F" />
|
||||
<Setter Property="FontFamily" Value="Open-Sans" />
|
||||
<Setter Property="FontWeight" Value="SemiBold" />
|
||||
<Setter Property="Margin" Value="3, 7, 0, 7" />
|
||||
<Setter Property="Padding" Value="3" />
|
||||
</Style>
|
||||
|
||||
</Page.Resources>
|
||||
<Grid Background="White" Width="1280" Height="900"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="40" />
|
||||
<RowDefinition Height="150" />
|
||||
<RowDefinition Height="40" />
|
||||
<RowDefinition Height="120" />
|
||||
<RowDefinition Height="40" />
|
||||
<RowDefinition Height="70" />
|
||||
<RowDefinition Height="20" />
|
||||
<RowDefinition Height="270" />
|
||||
<RowDefinition Height="150" />
|
||||
</Grid.RowDefinitions>
|
||||
<!--header row-->
|
||||
<StackPanel Grid.Row="0" Orientation="Horizontal" Background="#2D3F51">
|
||||
<Image x:Name="headerLogo" Source="Assets/logo24x24.png" Margin="20, 0, 0, 0" Height="24" Width="24"/>
|
||||
<TextBlock Text="Windows Push Sample" Margin="10, 0, 0, 0" VerticalAlignment="Center" FontSize="14"/>
|
||||
</StackPanel>
|
||||
<!--Application Management region-->
|
||||
<Border BorderBrush="#FFDBE3E4" BorderThickness="1" Width="800" Height="110" VerticalAlignment="Bottom"
|
||||
Grid.Row="1">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2.9*" />
|
||||
<ColumnDefinition Width="0.1*" />
|
||||
<ColumnDefinition Width="2*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Left"
|
||||
Margin="30, 0, 0, 0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="Application management" Grid.Row="0"
|
||||
FontSize="20" Foreground="#FF2C3D4F"
|
||||
FontFamily="Open-Sans" FontWeight="Light"/>
|
||||
<TextBlock Text="You have to register your device before you can start sending push notifications."
|
||||
Grid.Row="1" Margin="0, 5, 0, 0" TextWrapping="Wrap" LineHeight="18"
|
||||
FontSize="13" Foreground="#B22C3D4F"/>
|
||||
</Grid>
|
||||
<Grid Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Right"
|
||||
Margin="5, 0, 30, 0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Grid.Column="0" Content="Register" Click="OnRegisterClick"
|
||||
Height="35" Padding="7, 0, 7, 0" Width="120"
|
||||
Style="{StaticResource buttonStyle}"
|
||||
IsEnabled="{Binding IsDeviceRegistered, Converter={StaticResource inverseBooleanConverter}}"/>
|
||||
<Button Grid.Column="1" Content="Unregister" Click="OnUnregisterClick"
|
||||
Height="35" Margin="2, 0, 0, 0"
|
||||
Padding="7, 0, 7, 0" Width="120"
|
||||
Style="{StaticResource buttonStyle}"
|
||||
IsEnabled="{Binding IsDeviceRegistered}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
<!--Toast message region-->
|
||||
<StackPanel Grid.Row="3" Width="800" HorizontalAlignment="Center">
|
||||
<TextBlock Text="Toast message:" Style="{StaticResource textBlockStyleBold}"/>
|
||||
<TextBox x:Name="pushNotificationMessage"
|
||||
Margin="3, 7, 0, 7" Padding="3"
|
||||
HorizontalAlignment="Stretch"
|
||||
Text="My first Windows Push Notification!"
|
||||
IsEnabled="{Binding IsDeviceRegistered}"/>
|
||||
Style="{StaticResource textBoxStyle}" IsEnabled="{Binding IsDeviceRegistered}"
|
||||
/>
|
||||
<Button Content="Send Push Notification" Click="OnSendClick" Margin="0, 10, 0, 0"
|
||||
Width="170" Padding="5" Style="{StaticResource buttonStyle}" IsEnabled="{Binding IsDeviceRegistered}"
|
||||
/>
|
||||
</StackPanel>
|
||||
<!--Second tile settings region-->
|
||||
<StackPanel Grid.Row="5" Width="800" HorizontalAlignment="Center">
|
||||
<TextBlock Text="Second Tile Settings" Style="{StaticResource textBlockStyleBold}"/>
|
||||
<Grid Margin="0, 10, 0, 0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel Grid.Column="0" Orientation="Horizontal" >
|
||||
<Button Content="Pin Second Tile" Click="OnPinSecondTileClick"
|
||||
Width="170" Style="{StaticResource buttonStyle}" IsEnabled="{Binding IsSecondaryTilePinned, Converter={StaticResource inverseBooleanConverter}}"/>
|
||||
<Button Content="Register Second Tile" Click="OnRegisterSecondTileClick"
|
||||
Width="170" Style="{StaticResource buttonStyle}" IsEnabled="{Binding ShowRegisterSecondTileButton}"
|
||||
Margin="4, 0, 0, 0" />
|
||||
</StackPanel>
|
||||
<Button Content="Unpin Second Tile" Grid.Column="1" Click="OnUnpinSecondTileClick"
|
||||
Width="170" Padding="5" Style="{StaticResource buttonStyle}"
|
||||
HorizontalAlignment="Right" Template="{StaticResource ButtonControlTemplate1}"
|
||||
IsEnabled="{Binding IsSecondaryTilePinned}"/>
|
||||
</Grid>
|
||||
<Button Content="Send Push Notification" Click="OnSendClick"
|
||||
Grid.Column="1" Grid.Row="1" Width="200" Padding="5"
|
||||
IsEnabled="{Binding IsDeviceRegistered}"/>
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="1" Margin="35, 0, 0, 0">
|
||||
</StackPanel>
|
||||
<!--Second tile data region-->
|
||||
<Grid Grid.Row="7" Width="800" HorizontalAlignment="Center">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="250" />
|
||||
<ColumnDefinition Width="940" />
|
||||
<ColumnDefinition Width="100" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="50" />
|
||||
<RowDefinition Height="50" />
|
||||
<RowDefinition Height="50" />
|
||||
<RowDefinition Height="50" />
|
||||
<RowDefinition Height="50" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Button Content="Pin Second Tile" Click="OnPinSecondTileClick"
|
||||
Grid.Column="0" Grid.Row="0" Width="200" Padding="5"
|
||||
IsEnabled="{Binding IsSecondaryTilePinned, Converter={StaticResource inverseBooleanConverter}}"/>
|
||||
<Button Content="Register Second Tile" Click="OnRegisterSecondTileClick"
|
||||
Grid.Column="0" Grid.Row="1" Width="200" Padding="5"
|
||||
IsEnabled="{Binding ShowRegisterSecondTileButton}"/>
|
||||
<Button Content="Unpin Second Tile" Click="OnUnpinSecondTileClick"
|
||||
Grid.Column="0" Grid.Row="3" Width="200" Padding="5"
|
||||
IsEnabled="{Binding IsSecondaryTilePinned}"/>
|
||||
<Button Content="Unregister Second Tile" Click="OnUnregisterSecondTileClick"
|
||||
Grid.Column="0" Grid.Row="4" Width="200" Padding="5"
|
||||
<TextBlock Text="Image:" Grid.Column="0" Grid.Row="0" Style="{StaticResource textBlockStyle}"/>
|
||||
<TextBox x:Name="image1" Grid.Column="1" Grid.Row="0" HorizontalAlignment="Stretch"
|
||||
Style="{StaticResource textBoxStyle}" Text=".\Assets\logo150x150.png"
|
||||
IsEnabled="{Binding IsSecondaryTileRegistered}"/>
|
||||
<TextBlock Text="Text1:" Grid.Column="0" Grid.Row="1" Style="{StaticResource textBlockStyle}"/>
|
||||
<TextBlock Text="Text2:" Grid.Column="0" Grid.Row="2" Style="{StaticResource textBlockStyle}"/>
|
||||
<TextBlock Text="Text3:" Grid.Column="0" Grid.Row="3" Style="{StaticResource textBlockStyle}"/>
|
||||
<TextBlock Text="Text4:" Grid.Column="0" Grid.Row="4" Style="{StaticResource textBlockStyle}"/>
|
||||
|
||||
<TextBox x:Name="text1" Grid.Column="1" Grid.Row="1" HorizontalAlignment="Stretch"
|
||||
Style="{StaticResource textBoxStyle}"
|
||||
Text="WindowsPushSample" IsEnabled="{Binding IsSecondaryTileRegistered}"/>
|
||||
<TextBox x:Name="text2" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Stretch"
|
||||
Style="{StaticResource textBoxStyle}"
|
||||
Text="Text2" IsEnabled="{Binding IsSecondaryTileRegistered}"/>
|
||||
<TextBox x:Name="text3" Grid.Column="1" Grid.Row="3" HorizontalAlignment="Stretch"
|
||||
Style="{StaticResource textBoxStyle}"
|
||||
Text="Text3" IsEnabled="{Binding IsSecondaryTileRegistered}"/>
|
||||
<TextBox x:Name="text4" Grid.Column="1" Grid.Row="4" HorizontalAlignment="Stretch"
|
||||
Style="{StaticResource textBoxStyle}"
|
||||
Text="Text4" IsEnabled="{Binding IsSecondaryTileRegistered}"/>
|
||||
<Button Content="Send Push Second Tile" Click="OnSendPushToSecondTileClick"
|
||||
Margin="0, 10, 0, 0" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="5"
|
||||
Width="170" Padding="5" HorizontalAlignment="Left" Style="{StaticResource buttonStyle}"
|
||||
IsEnabled="{Binding IsSecondaryTileRegistered}"/>
|
||||
<Grid Grid.Column="1" Grid.Row="0" Grid.RowSpan="5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="100" />
|
||||
<ColumnDefinition Width="370" />
|
||||
<ColumnDefinition Width="100" />
|
||||
<ColumnDefinition Width="370" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="Text1:" Grid.Column="0" Grid.Row="0" FontSize="20" Margin="3, 7, 0, 7" Padding="3"/>
|
||||
<TextBlock Text="Text2:" Grid.Column="0" Grid.Row="1" FontSize="20" Margin="3, 7, 0, 7" Padding="3"/>
|
||||
<TextBlock Text="Text3:" Grid.Column="0" Grid.Row="2" FontSize="20" Margin="3, 7, 0, 7" Padding="3"/>
|
||||
<TextBlock Text="Text4:" Grid.Column="0" Grid.Row="3" FontSize="20" Margin="3, 7, 0, 7" Padding="3"/>
|
||||
|
||||
<TextBox x:Name="text1" Grid.Column="1" Grid.Row="0" HorizontalAlignment="Stretch"
|
||||
Margin="3, 7, 0, 7" Padding="3"
|
||||
IsEnabled="{Binding IsSecondaryTileRegistered}"
|
||||
Text="WindowsPushSample"/>
|
||||
<TextBox x:Name="text2" Grid.Column="1" Grid.Row="1" HorizontalAlignment="Stretch"
|
||||
Margin="3, 7, 0, 7" Padding="3"
|
||||
IsEnabled="{Binding IsSecondaryTileRegistered}"
|
||||
Text="Text2"/>
|
||||
<TextBox x:Name="text3" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Stretch"
|
||||
Margin="3, 7, 0, 7" Padding="3"
|
||||
IsEnabled="{Binding IsSecondaryTileRegistered}"
|
||||
Text="Text3"/>
|
||||
<TextBox x:Name="text4" Grid.Column="1" Grid.Row="3" HorizontalAlignment="Stretch"
|
||||
Margin="3, 7, 0, 7" Padding="3"
|
||||
IsEnabled="{Binding IsSecondaryTileRegistered}"
|
||||
Text="Text4"/>
|
||||
|
||||
<TextBlock Text="Image1:" Grid.Column="2" Grid.Row="0" FontSize="20" Margin="3, 7, 0, 7" Padding="3"/>
|
||||
<TextBox x:Name="image1" Grid.Column="3" Grid.Row="0" HorizontalAlignment="Stretch"
|
||||
Margin="3, 7, 0, 7" Padding="3"
|
||||
IsEnabled="{Binding IsSecondaryTileRegistered}"
|
||||
Text=".\Assets\tile_telerik_platform_150x150.png"/>
|
||||
|
||||
<Button Content="Send Push Second Tile" Click="OnSendPushToSecondTileClick"
|
||||
Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="4" Width="200" Padding="5"
|
||||
HorizontalAlignment="Left"
|
||||
IsEnabled="{Binding IsSecondaryTileRegistered}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<TextBlock x:Name="statusText" Grid.Row="2" Margin="10" FontSize="16" Padding="5"
|
||||
<TextBlock x:Name="statusText" Grid.Row="8" Margin="10" FontSize="16" Padding="5"
|
||||
VerticalAlignment="Bottom"/>
|
||||
<Image x:Name="logo" Grid.Row="2"
|
||||
Source="Assets/tile_telerik_platform_150x150.png"
|
||||
<Image x:Name="logo" Grid.Row="8"
|
||||
Source="Assets/logo150x150.png"
|
||||
Margin="0, 0, 10, 0"
|
||||
VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="150" Height="150"/>
|
||||
</Grid>
|
||||
</Page>
|
||||
|
|
|
@ -12,6 +12,7 @@ using Telerik.Everlive.Sdk.Core.Transport;
|
|||
using Windows.Foundation;
|
||||
using Windows.Foundation.Collections;
|
||||
using Windows.UI;
|
||||
using Windows.UI.Notifications;
|
||||
using Windows.UI.Popups;
|
||||
using Windows.UI.StartScreen;
|
||||
using Windows.UI.Xaml;
|
||||
|
@ -155,7 +156,6 @@ namespace WindowsPushSample
|
|||
else
|
||||
{
|
||||
everliveApp = new EverliveApp(MainPage.BackendServicesApiKey);
|
||||
everliveApp.AppSettings.ServiceUrl = "localhost:3000";
|
||||
this.CheckRegistration();
|
||||
this.CheckSecondaryTiles();
|
||||
this.CheckSecondaryTileRegistration();
|
||||
|
@ -295,8 +295,8 @@ namespace WindowsPushSample
|
|||
|
||||
private async void OnPinSecondTileClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Uri logo = new Uri("ms-appx:///Assets/tile_telerik_platform_150x150.png");
|
||||
Uri smallLogo = new Uri("ms-appx:///Assets/tile_telerik_platform_50x50.png");
|
||||
Uri logo = new Uri("ms-appx:///Assets/logo150x150.png");
|
||||
Uri smallLogo = new Uri("ms-appx:///Assets/logo24x24.png");
|
||||
|
||||
// During creation of secondary tile, an application may set additional arguments on the tile that will be passed in during activation.
|
||||
// These arguments should be meaningful to the application. In this sample, we'll pass in the date and time the secondary tile was pinned.
|
||||
|
@ -354,7 +354,7 @@ namespace WindowsPushSample
|
|||
// "template": "TileSquare150x150PeekImageAndText01",
|
||||
// "fallback": "TileSquarePeekImageAndText01"
|
||||
// "text": ["WindowsPushSample", "Text2", "Text3", "Text4"],
|
||||
// "image": [".\\Assets\\tile_telerik_platform_150x150.png"]
|
||||
// "image": [".\\Assets\\logo150x150.png"]
|
||||
// },
|
||||
// "SecondaryTileId": MainPage.SecondaryTileId
|
||||
//}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<Properties>
|
||||
<DisplayName>Windows8PushApp</DisplayName>
|
||||
<PublisherDisplayName>Telerik</PublisherDisplayName>
|
||||
<Logo>Assets\tile_telerik_platform_50x50.png</Logo>
|
||||
<Logo>Assets\logo50x50.png</Logo>
|
||||
</Properties>
|
||||
<Prerequisites>
|
||||
<OSMinVersion>6.2.1</OSMinVersion>
|
||||
|
@ -15,10 +15,10 @@
|
|||
</Resources>
|
||||
<Applications>
|
||||
<Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="WindowsPushSample.App">
|
||||
<VisualElements DisplayName="Windows Push Sample" Logo="Assets\tile_telerik_platform_150x150.png" SmallLogo="Assets\tile_telerik_platform_30x30.png" Description="WindowsPushSample" ForegroundText="light" BackgroundColor="#464646" ToastCapable="true">
|
||||
<LockScreen Notification="badge" BadgeLogo="Assets\tile_telerik_platform_24x24.png" />
|
||||
<VisualElements DisplayName="Windows Push Sample" Logo="Assets\logo150x150.png" SmallLogo="Assets\logo30x30.png" Description="WindowsPushSample" ForegroundText="light" BackgroundColor="#464646" ToastCapable="true">
|
||||
<LockScreen Notification="badge" BadgeLogo="Assets\logo24x24.png" />
|
||||
<DefaultTile ShowName="allLogos" />
|
||||
<SplashScreen Image="Assets\tile_telerik_platform_620x300.png" />
|
||||
<SplashScreen Image="Assets\logo620x300.png" />
|
||||
</VisualElements>
|
||||
<Extensions>
|
||||
<Extension Category="windows.backgroundTasks" StartPage="MainPage">
|
||||
|
|
|
@ -114,24 +114,19 @@
|
|||
</AppxManifest>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Assets\Logo.png" />
|
||||
<Content Include="Assets\SmallLogo.png" />
|
||||
<Content Include="Assets\SplashScreen.png" />
|
||||
<Content Include="Assets\SplashScreen.scale-100.png" />
|
||||
<Content Include="Assets\StoreLogo.png" />
|
||||
<Content Include="Assets\tile_telerik_platform_150x150.png">
|
||||
<Content Include="Assets\logo150x150.png">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Assets\tile_telerik_platform_24x24.png">
|
||||
<Content Include="Assets\logo24x24.png">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Assets\tile_telerik_platform_30x30.png">
|
||||
<Content Include="Assets\logo30x30.png">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Assets\tile_telerik_platform_50x50.png">
|
||||
<Content Include="Assets\logo50x50.png">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Assets\tile_telerik_platform_620x300.png">
|
||||
<Content Include="Assets\logo620x300.png">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<None Include="Package.StoreAssociation.xml" />
|
||||
|
|