push notification helper library
http://windowsteamblog.com/windows_phone/b/wpdev/archive/2011/01/14/windows-push-notification-server-side-helper-library.aspx http://create.msdn.com/en-us/education/catalog/article/pnhelp-wp7
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace WindowsPhone.Recipes.Push.Server.Resources.Converters
|
||||
{
|
||||
/// <summary>
|
||||
/// Converts null to default tile image.
|
||||
/// </summary>
|
||||
public class NullTileImageConverter : IValueConverter
|
||||
{
|
||||
/// <value>Default tile image resource relative path.</value>
|
||||
private static readonly Uri DefaultTileImage = new Uri("/Resources/TileImages/Null.jpg", UriKind.Relative);
|
||||
|
||||
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
return value ?? DefaultTileImage;
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Data;
|
||||
using System.IO;
|
||||
|
||||
namespace WindowsPhone.Recipes.Push.Server.Resources.Converters
|
||||
{
|
||||
/// <summary>
|
||||
/// Image file name to image file name with relevant path.
|
||||
/// </summary>
|
||||
public class UserFileImageConverter : IValueConverter
|
||||
{
|
||||
/// <value>Default tile image resource relative path.</value>
|
||||
private static readonly Uri DefaultTileImage = new Uri("/Resources/TileImages/Null.jpg", UriKind.Relative);
|
||||
|
||||
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
Uri imageUri = DefaultTileImage;
|
||||
string fileName = value as string;
|
||||
if (value != null)
|
||||
{
|
||||
string imageFullPath = Path.Combine(@"Resources\TileImages\Numbers", (string)value);
|
||||
if (File.Exists(imageFullPath))
|
||||
{
|
||||
imageUri = new Uri(@"\" + imageFullPath, UriKind.Relative);
|
||||
}
|
||||
}
|
||||
|
||||
return imageUri;
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:vm="clr-namespace:WindowsPhone.Recipes.Push.Server.ViewModels"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
||||
xmlns:behaviors="clr-namespace:WindowsPhone.Recipes.Push.Server.Behaviors"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<DataTemplate DataType="{x:Type vm:AskToPinPushPatternViewModel}">
|
||||
<Border Style="{DynamicResource ViewBorderStyle}">
|
||||
<Grid d:LayoutOverrides="Width">
|
||||
|
||||
<HeaderedContentControl Width="Auto" VerticalAlignment="Top">
|
||||
<HeaderedContentControl.Header>
|
||||
<TextBlock Text="Tile Message" FontWeight="Bold" />
|
||||
</HeaderedContentControl.Header>
|
||||
<Grid Height="Auto">
|
||||
<StackPanel Margin="0,0,185,84">
|
||||
<TextBlock Text="Count" Margin="4" />
|
||||
<Slider Minimum="0" Maximum="99" IsSnapToTickEnabled="True" TickFrequency="1" AutoToolTipPlacement="BottomRight" Value="{Binding Count, UpdateSourceTrigger=PropertyChanged}" />
|
||||
<TextBlock Text="Title" Margin="4" />
|
||||
<TextBox TextWrapping="Wrap" Margin="4" Text="{Binding Title, UpdateSourceTrigger=PropertyChanged}" />
|
||||
</StackPanel>
|
||||
|
||||
<ListBox ItemsSource="{Binding TileImages}"
|
||||
SelectedItem="{Binding BackgroundImageUri}"
|
||||
Margin="0,0,0,-63"
|
||||
VerticalAlignment="Bottom"
|
||||
HorizontalAlignment="Right" Width="183"
|
||||
BorderThickness="0" Background="Transparent"
|
||||
ItemContainerStyle="{DynamicResource ImageListBoxItemStyle}">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Image Source="{Binding}" Width="48" Height="48" Stretch="UniformToFill" />
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ListBox>
|
||||
|
||||
<Border BorderThickness="5" BorderBrush="#FFDEDEDE" Background="#FF333333" HorizontalAlignment="Right" VerticalAlignment="Center">
|
||||
<Grid Width="173" Height="173">
|
||||
<Image Source="{Binding BackgroundImageUri, Converter={StaticResource NullTileImageConverter}}" Stretch="UniformToFill" />
|
||||
<Grid x:Name="counter" HorizontalAlignment="Right" Height="30.733" Margin="0,12,12,0" VerticalAlignment="Top" Width="30.733">
|
||||
<Ellipse Fill="Black" HorizontalAlignment="Stretch" Height="Auto" Margin="0" Stroke="Black" VerticalAlignment="Stretch" Width="Auto" StrokeThickness="0"/>
|
||||
<TextBlock HorizontalAlignment="Center" Height="Auto" TextWrapping="Wrap" Text="{Binding Count}" VerticalAlignment="Stretch" Width="Auto" TextAlignment="Center" FontSize="21.333" d:LayoutOverrides="Height" Margin="0,-0.321,0,2.679"/>
|
||||
</Grid>
|
||||
<TextBlock Height="22" TextWrapping="NoWrap" Text="{Binding Title}" VerticalAlignment="Bottom" Margin="6,0,6,6" FontSize="18.667" FontWeight="Bold" Width="158" HorizontalAlignment="Center"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
</Grid>
|
||||
</HeaderedContentControl>
|
||||
|
||||
<Button Content="Send" Height="Auto" Command="{Binding SendCommand}" VerticalAlignment="Bottom" d:LayoutOverrides="GridBox" Width="64" RenderTransformOrigin="2.643,1.088" HorizontalAlignment="Right" Margin="0,0,0,2.68" />
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
<DataTemplate.Triggers>
|
||||
<DataTrigger Binding="{Binding Count}" Value="0">
|
||||
<Setter TargetName="counter" Property="Visibility" Value="Hidden" />
|
||||
</DataTrigger>
|
||||
</DataTemplate.Triggers>
|
||||
</DataTemplate>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -0,0 +1,60 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:vm="clr-namespace:WindowsPhone.Recipes.Push.Server.ViewModels"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
||||
xmlns:behaviors="clr-namespace:WindowsPhone.Recipes.Push.Server.Behaviors"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<DataTemplate DataType="{x:Type vm:CounterPushPatternViewModel}">
|
||||
<Border Style="{DynamicResource ViewBorderStyle}">
|
||||
<Grid d:LayoutOverrides="Width">
|
||||
|
||||
<HeaderedContentControl Width="Auto" VerticalAlignment="Top">
|
||||
<HeaderedContentControl.Header>
|
||||
<TextBlock Text="Tile Message" FontWeight="Bold" />
|
||||
</HeaderedContentControl.Header>
|
||||
<Grid Height="Auto">
|
||||
<StackPanel Margin="0,0,185,84">
|
||||
<TextBlock Text="Title" Margin="4" />
|
||||
<TextBox TextWrapping="Wrap" Margin="4" Text="{Binding Title, UpdateSourceTrigger=PropertyChanged}" />
|
||||
</StackPanel>
|
||||
|
||||
<ListBox ItemsSource="{Binding TileImages}"
|
||||
SelectedItem="{Binding BackgroundImageUri}"
|
||||
Margin="0,0,0,-63"
|
||||
VerticalAlignment="Bottom"
|
||||
HorizontalAlignment="Right"
|
||||
Width="183"
|
||||
BorderThickness="0" Background="Transparent"
|
||||
ItemContainerStyle="{DynamicResource ImageListBoxItemStyle}">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Image Source="{Binding}" Width="48" Height="48" Stretch="UniformToFill" />
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ListBox>
|
||||
|
||||
<Border BorderThickness="5" BorderBrush="#FFDEDEDE" Background="#FF333333" HorizontalAlignment="Right" VerticalAlignment="Center">
|
||||
<Grid Width="173" Height="173">
|
||||
<Image Source="{Binding BackgroundImageUri, Converter={StaticResource NullTileImageConverter}}" Stretch="UniformToFill" />
|
||||
<TextBlock Height="22" TextWrapping="NoWrap" Text="{Binding Title}" VerticalAlignment="Bottom" Margin="6,0,6,6" FontSize="18.667" FontWeight="Bold" Width="158" HorizontalAlignment="Center"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
</Grid>
|
||||
</HeaderedContentControl>
|
||||
|
||||
<Button Content="Send" Height="Auto" Command="{Binding SendCommand}" VerticalAlignment="Bottom" d:LayoutOverrides="GridBox" Width="64" RenderTransformOrigin="2.643,1.088" HorizontalAlignment="Right" Margin="0,0,0,2.68" />
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -0,0 +1,84 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:vm="clr-namespace:WindowsPhone.Recipes.Push.Server.ViewModels"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
||||
xmlns:behaviors="clr-namespace:WindowsPhone.Recipes.Push.Server.Behaviors"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<DataTemplate DataType="{x:Type vm:CustomTileImagePushPatternViewModel}">
|
||||
<Border Style="{DynamicResource ViewBorderStyle}">
|
||||
<Grid>
|
||||
|
||||
<HeaderedContentControl Width="Auto" VerticalAlignment="Top">
|
||||
<HeaderedContentControl.Header>
|
||||
<TextBlock Text="Tile Message" FontWeight="Bold" />
|
||||
</HeaderedContentControl.Header>
|
||||
<Grid>
|
||||
<Border Grid.Column="1" Grid.Row="1" BorderThickness="5" BorderBrush="#FFDEDEDE" Width="Auto" Height="Auto" Background="#FF333333" HorizontalAlignment="Right" VerticalAlignment="Top">
|
||||
<Grid Width="Auto" Height="Auto">
|
||||
<Grid Width="173" Height="173">
|
||||
<i:Interaction.Behaviors>
|
||||
<behaviors:VisualBinderBehavior />
|
||||
</i:Interaction.Behaviors>
|
||||
<Image Source="{Binding TileBackground, Converter={StaticResource NullTileImageConverter}}" Stretch="UniformToFill" />
|
||||
<TextBlock HorizontalAlignment="Center" Margin="4,48,4,0" TextWrapping="Wrap" FontSize="{Binding TextSize}" Foreground="{Binding TextColors/}" Text="{Binding FreeText}" VerticalAlignment="Top"/>
|
||||
<Rectangle Fill="Transparent" Stroke="Black">
|
||||
<Rectangle.InputBindings>
|
||||
<MouseBinding MouseAction="LeftClick" Command="{Binding PickImageCommand}" />
|
||||
</Rectangle.InputBindings>
|
||||
</Rectangle>
|
||||
</Grid>
|
||||
<Grid x:Name="counter" HorizontalAlignment="Right" Height="30.733" Margin="0,12,12,0" VerticalAlignment="Top" Width="30.733">
|
||||
<Ellipse Fill="Black" HorizontalAlignment="Stretch" Height="Auto" Margin="0" Stroke="Black" VerticalAlignment="Stretch" Width="Auto" StrokeThickness="0"/>
|
||||
<TextBlock HorizontalAlignment="Center" Height="Auto" TextWrapping="Wrap" Text="{Binding Count}" VerticalAlignment="Stretch" Width="Auto" TextAlignment="Center" FontSize="21.333" d:LayoutOverrides="Height" Margin="0,-0.321,0,2.679"/>
|
||||
</Grid>
|
||||
<TextBlock Height="22" TextWrapping="NoWrap" Text="{Binding Title}" VerticalAlignment="Bottom" Margin="6,0,6,6" FontSize="18.667" FontWeight="Bold" Width="158" HorizontalAlignment="Center"/>
|
||||
<TextBlock x:Name="ImageComment" HorizontalAlignment="Center" TextWrapping="Wrap" VerticalAlignment="Center" />
|
||||
</Grid>
|
||||
</Border>
|
||||
<StackPanel Grid.Row="0" HorizontalAlignment="Stretch" Margin="0,0,187,0" d:LayoutOverrides="GridBox">
|
||||
|
||||
<TextBlock TextWrapping="Wrap" Text="Free Text" Margin="4" />
|
||||
<TextBox TextWrapping="Wrap" Margin="4" Text="{Binding FreeText, UpdateSourceTrigger=PropertyChanged}" />
|
||||
|
||||
<TextBlock TextWrapping="Wrap" Text="Text Size" Margin="4" />
|
||||
<Slider Minimum="18" Maximum="32" IsSnapToTickEnabled="True" TickFrequency="2" AutoToolTipPlacement="BottomRight" Value="{Binding TextSize, UpdateSourceTrigger=PropertyChanged}" />
|
||||
|
||||
<TextBlock TextWrapping="Wrap" Text="Text Color" Margin="4" />
|
||||
<ComboBox ItemsSource="{Binding TextColors}" SelectedIndex="0" IsSynchronizedWithCurrentItem="True">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<DockPanel Height="36">
|
||||
<Rectangle Stroke="Black" StrokeThickness="0.5" Fill="{Binding FallbackValue=Transparent}" Width="120" Height="28" Margin="4" />
|
||||
</DockPanel>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<TextBlock TextWrapping="Wrap" Text="Count" Margin="4" />
|
||||
<Slider Minimum="0" Maximum="99" IsSnapToTickEnabled="True" TickFrequency="1" AutoToolTipPlacement="BottomRight" Value="{Binding Count, UpdateSourceTrigger=PropertyChanged}" />
|
||||
|
||||
<TextBlock TextWrapping="Wrap" Text="Title" Margin="4" />
|
||||
<TextBox TextWrapping="Wrap" Margin="4" Text="{Binding Title, UpdateSourceTrigger=PropertyChanged}" />
|
||||
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</HeaderedContentControl>
|
||||
|
||||
<Button Content="Send" Height="Auto" Command="{Binding SendCommand}" VerticalAlignment="Bottom" d:LayoutOverrides="GridBox" Width="64" RenderTransformOrigin="2.643,1.088" HorizontalAlignment="Right" Margin="0,0,0,2.68" />
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
<DataTemplate.Triggers>
|
||||
<DataTrigger Binding="{Binding Count}" Value="0">
|
||||
<Setter TargetName="counter" Property="Visibility" Value="Hidden" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding TileBackground}" Value="{x:Null}">
|
||||
<Setter TargetName="ImageComment" Property="Text" Value="Click here to pick an image" />
|
||||
</DataTrigger>
|
||||
</DataTemplate.Triggers>
|
||||
</DataTemplate>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -0,0 +1,160 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:vm="clr-namespace:WindowsPhone.Recipes.Push.Server.ViewModels"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
||||
xmlns:behaviors="clr-namespace:WindowsPhone.Recipes.Push.Server.Behaviors"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<DataTemplate DataType="{x:Type vm:MessageStatusViewModel}">
|
||||
<DataTemplate.Resources>
|
||||
<Style x:Key="DefaultGridElementStyle" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Padding" Value="15,3,0,3" />
|
||||
</Style>
|
||||
</DataTemplate.Resources>
|
||||
|
||||
<Grid>
|
||||
<DataGrid ItemsSource="{Binding Status}"
|
||||
AutoGenerateColumns="False"
|
||||
IsReadOnly="True"
|
||||
SelectionMode="Single"
|
||||
SelectionUnit="FullRow"
|
||||
CanUserResizeRows="False"
|
||||
HeadersVisibility="Column"
|
||||
BorderThickness="2"
|
||||
BorderBrush="{StaticResource ViewBackgroundBrush}"
|
||||
GridLinesVisibility="None"
|
||||
AlternatingRowBackground="#FF535353"
|
||||
RowDetailsVisibilityMode="VisibleWhenSelected"
|
||||
Background="{DynamicResource ViewBackgroundBrush}"
|
||||
Foreground="{DynamicResource ViewTextBrush}"
|
||||
RowBackground="#FF424242" ColumnHeaderStyle="{DynamicResource DataGridColumnHeaderStyle}" CellStyle="{DynamicResource DataGridCellStyle}">
|
||||
|
||||
<DataGrid.Columns>
|
||||
|
||||
<DataGridTextColumn Header="Pattern" Binding="{Binding Pattern, Mode=OneTime}" ElementStyle="{StaticResource DefaultGridElementStyle}" />
|
||||
|
||||
<DataGridTextColumn Header="Message" Binding="{Binding MessageType, Mode=OneTime}" ElementStyle="{StaticResource DefaultGridElementStyle}" />
|
||||
|
||||
<DataGridTemplateColumn Header="Status">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Margin="15,0,0,0" VerticalAlignment="Center" Orientation="Horizontal">
|
||||
<Ellipse x:Name="indicator" VerticalAlignment="Center" Margin="0,0,6,0" Width="6" Height="6" Fill="Red" />
|
||||
<TextBlock VerticalAlignment="Center" Text="{Binding StatusCode, Mode=OneTime}" />
|
||||
</StackPanel>
|
||||
<DataTemplate.Triggers>
|
||||
<DataTrigger Binding="{Binding StatusCode}" Value="OK">
|
||||
<Setter TargetName="indicator" Property="Fill" Value="LightGreen" />
|
||||
</DataTrigger>
|
||||
</DataTemplate.Triggers>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
|
||||
<DataGridTemplateColumn Header="Connection">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Margin="15,0,0,0" VerticalAlignment="Center" Orientation="Horizontal">
|
||||
<Ellipse x:Name="indicator" VerticalAlignment="Center" Margin="0,0,6,0" Width="6" Height="6" />
|
||||
<TextBlock VerticalAlignment="Center" Text="{Binding DeviceConnectionStatus, Mode=OneTime}" />
|
||||
</StackPanel>
|
||||
<DataTemplate.Triggers>
|
||||
<DataTrigger Binding="{Binding DeviceConnectionStatus}" Value="Connected">
|
||||
<Setter TargetName="indicator" Property="Fill" Value="LightGreen" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DeviceConnectionStatus}" Value="TempDisconnected">
|
||||
<Setter TargetName="indicator" Property="Fill" Value="Red" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DeviceConnectionStatus}" Value="Inactive">
|
||||
<Setter TargetName="indicator" Property="Fill" Value="Gray" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DeviceConnectionStatus}" Value="NotApplicable">
|
||||
<Setter TargetName="indicator" Property="Fill" Value="Black" />
|
||||
</DataTrigger>
|
||||
</DataTemplate.Triggers>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
|
||||
<DataGridTemplateColumn Header="Subscription">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Margin="15,0,0,0" VerticalAlignment="Center" Orientation="Horizontal">
|
||||
<Ellipse x:Name="indicator" VerticalAlignment="Center" Margin="0,0,6,0" Width="6" Height="6" />
|
||||
<TextBlock VerticalAlignment="Center" Text="{Binding SubscriptionStatus, Mode=OneTime}" />
|
||||
</StackPanel>
|
||||
<DataTemplate.Triggers>
|
||||
<DataTrigger Binding="{Binding SubscriptionStatus}" Value="Active">
|
||||
<Setter TargetName="indicator" Property="Fill" Value="LightGreen" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding SubscriptionStatus}" Value="Expired">
|
||||
<Setter TargetName="indicator" Property="Fill" Value="Red" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding SubscriptionStatus}" Value="NotApplicable">
|
||||
<Setter TargetName="indicator" Property="Fill" Value="Black" />
|
||||
</DataTrigger>
|
||||
</DataTemplate.Triggers>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
|
||||
<DataGridTemplateColumn Header="Notification">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Margin="15,0,0,0" VerticalAlignment="Center" Orientation="Horizontal">
|
||||
<Ellipse x:Name="indicator" VerticalAlignment="Center" Margin="0,0,6,0" Width="6" Height="6" />
|
||||
<TextBlock VerticalAlignment="Center" Text="{Binding NotificationStatus, Mode=OneTime}" />
|
||||
</StackPanel>
|
||||
<DataTemplate.Triggers>
|
||||
<DataTrigger Binding="{Binding NotificationStatus}" Value="Received">
|
||||
<Setter TargetName="indicator" Property="Fill" Value="LightGreen" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding NotificationStatus}" Value="QueueFull">
|
||||
<Setter TargetName="indicator" Property="Fill" Value="Red" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding NotificationStatus}" Value="Suppressed">
|
||||
<Setter TargetName="indicator" Property="Fill" Value="Gray" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding NotificationStatus}" Value="Dropped">
|
||||
<Setter TargetName="indicator" Property="Fill" Value="Gray" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding NotificationStatus}" Value="NotApplicable">
|
||||
<Setter TargetName="indicator" Property="Fill" Value="Black" />
|
||||
</DataTrigger>
|
||||
</DataTemplate.Triggers>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
|
||||
</DataGrid.Columns>
|
||||
|
||||
<DataGrid.RowDetailsTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Margin="2" Background="#FF2A2A2A">
|
||||
|
||||
<StackPanel Margin="1">
|
||||
<TextBlock FontWeight="Bold" Margin="0,0,0,1" Text="Time Stamp" />
|
||||
<TextBlock Text="{Binding Timestamp, Mode=OneTime, StringFormat=G}" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Margin="1">
|
||||
<TextBlock FontWeight="Bold" Margin="0,0,0,1" Text="Message Id" />
|
||||
<TextBlock Text="{Binding MessageId, Mode=OneTime}" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Margin="1">
|
||||
<TextBlock FontWeight="Bold" Margin="0,0,0,1" Text="Channel URI" />
|
||||
<TextBlock Text="{Binding ChannelUri, Mode=OneTime}" />
|
||||
</StackPanel>
|
||||
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</DataGrid.RowDetailsTemplate>
|
||||
|
||||
</DataGrid>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -0,0 +1,92 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:vm="clr-namespace:WindowsPhone.Recipes.Push.Server.ViewModels"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
||||
xmlns:behaviors="clr-namespace:WindowsPhone.Recipes.Push.Server.Behaviors"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<DataTemplate DataType="{x:Type vm:OneTimePushPatternViewModel}">
|
||||
<Border Style="{DynamicResource ViewBorderStyle}">
|
||||
<Grid d:LayoutOverrides="Width">
|
||||
<HeaderedContentControl Width="Auto" VerticalAlignment="Top">
|
||||
<HeaderedContentControl.Header>
|
||||
<CheckBox Content="Tile Message" FontWeight="Bold" Foreground="{StaticResource ViewTextBrush}" IsChecked="{Binding IsTileEnabled, Mode=TwoWay}" />
|
||||
</HeaderedContentControl.Header>
|
||||
<Grid Height="Auto">
|
||||
<StackPanel Margin="0,0,185,84">
|
||||
<TextBlock Text="Count" Margin="4" />
|
||||
<Slider Minimum="0" Maximum="99" IsSnapToTickEnabled="True" TickFrequency="1" AutoToolTipPlacement="BottomRight" Value="{Binding Count, UpdateSourceTrigger=PropertyChanged}" />
|
||||
<TextBlock Text="Title" Margin="4" />
|
||||
<TextBox TextWrapping="Wrap" Margin="4" Text="{Binding Title, UpdateSourceTrigger=PropertyChanged}" />
|
||||
</StackPanel>
|
||||
|
||||
<ListBox ItemsSource="{Binding TileImages}"
|
||||
SelectedItem="{Binding BackgroundImageUri}"
|
||||
Margin="0,0,0,-63"
|
||||
VerticalAlignment="Bottom"
|
||||
HorizontalAlignment="Right"
|
||||
Width="183"
|
||||
BorderThickness="0" Background="Transparent"
|
||||
ItemContainerStyle="{DynamicResource ImageListBoxItemStyle}">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Image x:Name="image" Source="{Binding}" Width="48" Height="48" Stretch="UniformToFill" />
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ListBox>
|
||||
|
||||
<Border BorderThickness="5" BorderBrush="#FFDEDEDE" Background="#FF333333" HorizontalAlignment="Right" VerticalAlignment="Center">
|
||||
<Grid Width="173" Height="173">
|
||||
<Image Source="{Binding BackgroundImageUri, Converter={StaticResource NullTileImageConverter}}" Stretch="UniformToFill" />
|
||||
<Grid x:Name="counter" HorizontalAlignment="Right" Height="30.733" Margin="0,12,12,0" VerticalAlignment="Top" Width="30.733">
|
||||
<Ellipse Fill="Black" HorizontalAlignment="Stretch" Height="Auto" Margin="0" Stroke="Black" VerticalAlignment="Stretch" Width="Auto" StrokeThickness="0"/>
|
||||
<TextBlock HorizontalAlignment="Center" Height="Auto" TextWrapping="Wrap" Text="{Binding Count}" VerticalAlignment="Stretch" Width="Auto" TextAlignment="Center" FontSize="21.333" d:LayoutOverrides="Height" Margin="0,-0.321,0,2.679"/>
|
||||
</Grid>
|
||||
<TextBlock Height="22" TextWrapping="NoWrap" Text="{Binding Title}" VerticalAlignment="Bottom" Margin="6,0,6,6" FontSize="18.667" FontWeight="Bold" Width="158" HorizontalAlignment="Center"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
</HeaderedContentControl>
|
||||
|
||||
<HeaderedContentControl Width="Auto" HorizontalContentAlignment="Stretch" Margin="0,130.6,184,0" VerticalAlignment="Top">
|
||||
<HeaderedContentControl.Header>
|
||||
<CheckBox Content="Raw Message" FontWeight="Bold" Foreground="{StaticResource ViewTextBrush}" IsChecked="{Binding IsRawEnabled, Mode=TwoWay}" />
|
||||
</HeaderedContentControl.Header>
|
||||
<StackPanel Margin="4">
|
||||
<TextBlock Text="Raw Message" Margin="4" />
|
||||
<TextBox Margin="4" Text="{Binding RawMessage, UpdateSourceTrigger=PropertyChanged}" />
|
||||
</StackPanel>
|
||||
</HeaderedContentControl>
|
||||
|
||||
<HeaderedContentControl Width="Auto" Margin="0,215.52,184,0" VerticalAlignment="Stretch" d:LayoutOverrides="Height">
|
||||
<HeaderedContentControl.Header>
|
||||
<CheckBox Content="Toast Message" FontWeight="Bold" Foreground="{StaticResource ViewTextBrush}" IsChecked="{Binding IsToastEnabled, Mode=TwoWay}" />
|
||||
</HeaderedContentControl.Header>
|
||||
<StackPanel Margin="4">
|
||||
<TextBlock Text="Title" Margin="4" />
|
||||
<TextBox Margin="4" Text="{Binding ToastTitle, UpdateSourceTrigger=PropertyChanged}" />
|
||||
|
||||
<TextBlock Text="Subtitle" Margin="4" />
|
||||
<TextBox Margin="4" Text="{Binding ToastSubTitle, UpdateSourceTrigger=PropertyChanged}" />
|
||||
</StackPanel>
|
||||
</HeaderedContentControl>
|
||||
|
||||
<Button Content="Send" Height="Auto" Command="{Binding SendCommand}" VerticalAlignment="Bottom" d:LayoutOverrides="GridBox" Width="64" RenderTransformOrigin="2.643,1.088" HorizontalAlignment="Right" Margin="0,0,0,2.68" />
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
<DataTemplate.Triggers>
|
||||
<DataTrigger Binding="{Binding Count}" Value="0">
|
||||
<Setter TargetName="counter" Property="Visibility" Value="Hidden" />
|
||||
</DataTrigger>
|
||||
</DataTemplate.Triggers>
|
||||
</DataTemplate>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -0,0 +1,38 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:vm="clr-namespace:WindowsPhone.Recipes.Push.Server.ViewModels"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
||||
xmlns:behaviors="clr-namespace:WindowsPhone.Recipes.Push.Server.Behaviors"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<DataTemplate DataType="{x:Type vm:TileSchedulePushPatternViewModel}">
|
||||
<Border Style="{DynamicResource ViewBorderStyle}">
|
||||
<Grid d:LayoutOverrides="Width">
|
||||
|
||||
<HeaderedContentControl Width="Auto" VerticalAlignment="Top">
|
||||
<HeaderedContentControl.Header>
|
||||
<TextBlock Text="User Parameters" FontWeight="Bold" />
|
||||
</HeaderedContentControl.Header>
|
||||
<Grid Height="Auto">
|
||||
<StackPanel Margin="0,0,185,84">
|
||||
<TextBlock Text="Image File Name" Margin="4" />
|
||||
<TextBox IsReadOnly="True" TextWrapping="Wrap" Margin="4" Text="{Binding ImageFileName, UpdateSourceTrigger=PropertyChanged}" />
|
||||
</StackPanel>
|
||||
|
||||
<Border BorderThickness="5" BorderBrush="#FFDEDEDE" Background="#FF333333" HorizontalAlignment="Right" VerticalAlignment="Center">
|
||||
<Grid Width="173" Height="173">
|
||||
<Image Source="{Binding ImageFileName, Converter={StaticResource UserFileImageConverter}}" Stretch="UniformToFill" />
|
||||
<TextBlock Height="22" TextWrapping="NoWrap" Text="{Binding Title}" VerticalAlignment="Bottom" Margin="6,0,6,6" FontSize="18.667" FontWeight="Bold" Width="158" HorizontalAlignment="Center"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
</Grid>
|
||||
</HeaderedContentControl>
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -0,0 +1,507 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:vm="clr-namespace:WindowsPhone.Recipes.Push.Server.ViewModels"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
||||
xmlns:behaviors="clr-namespace:WindowsPhone.Recipes.Push.Server.Behaviors"
|
||||
xmlns:converters="clr-namespace:WindowsPhone.Recipes.Push.Server.Resources.Converters"
|
||||
xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<!-- Converters -->
|
||||
<converters:NullTileImageConverter x:Key="NullTileImageConverter" />
|
||||
<converters:UserFileImageConverter x:Key="UserFileImageConverter" />
|
||||
|
||||
<!-- Brushes -->
|
||||
<SolidColorBrush x:Key="ViewBackgroundBrush" Color="#FF595959"/>
|
||||
<SolidColorBrush x:Key="SelectedViewBackgroundBrush" Color="Gray"/>
|
||||
<SolidColorBrush x:Key="ViewTextBrush" Color="#FFF3F3F3"/>
|
||||
<SolidColorBrush x:Key="TabControlNormalBorderBrush" Color="#8C8E94"/>
|
||||
<SolidColorBrush x:Key="StandardBorderBrush" Color="DarkGray"></SolidColorBrush>
|
||||
<SolidColorBrush x:Key="StandardBrush" Color="LightGray"></SolidColorBrush>
|
||||
<SolidColorBrush x:Key="PressedBrush" Color="Gray"></SolidColorBrush>
|
||||
<SolidColorBrush x:Key="HoverBrush" Color="#fefefe"></SolidColorBrush>
|
||||
<SolidColorBrush x:Key="GlyphBrush" Color="#333333"></SolidColorBrush>
|
||||
<SolidColorBrush x:Key="{x:Static DataGrid.FocusBorderBrushKey}" Color="#FF000000"/>
|
||||
|
||||
<!-- Styles -->
|
||||
<Style x:Key="ViewBorderStyle" TargetType="{x:Type Border}">
|
||||
<Setter Property="TextElement.Foreground" Value="{DynamicResource ViewTextBrush}" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ImageListBoxItemStyle" TargetType="{x:Type ListBoxItem}">
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Stretch"/>
|
||||
<Setter Property="Padding" Value="3"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ListBoxItem}">
|
||||
<Border x:Name="Bd" CornerRadius="3" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true" RenderTransformOrigin="0.5,0.5">
|
||||
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsSelected" Value="true">
|
||||
<Setter Property="Background" TargetName="Bd" Value="AliceBlue"/>
|
||||
</Trigger>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="IsSelected" Value="true"/>
|
||||
<Condition Property="Selector.IsSelectionActive" Value="false"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
|
||||
</MultiTrigger>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="TabItemStyle" TargetType="{x:Type TabItem}">
|
||||
<Setter Property="Foreground" Value="{DynamicResource ViewTextBrush}" />
|
||||
<Setter Property="Background" Value="{DynamicResource ViewBackgroundBrush}" />
|
||||
<Setter Property="Header" Value="{Binding DisplayName}" />
|
||||
<Setter Property="Template" Value="{DynamicResource TabItemControlTemplate}"/>
|
||||
</Style>
|
||||
|
||||
<ControlTemplate x:Key="TabItemControlTemplate" TargetType="{x:Type TabItem}">
|
||||
<Grid SnapsToDevicePixels="True">
|
||||
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1,1,1,0" Padding="{TemplateBinding Padding}" Background="#FF404040">
|
||||
<ContentPresenter x:Name="Content" ContentTemplate="{TemplateBinding HeaderTemplate}" Content="{TemplateBinding Header}" ContentStringFormat="{TemplateBinding HeaderStringFormat}" ContentSource="Header" HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type ItemsControl}}}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type ItemsControl}}}"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" TargetName="Bd" Value="{DynamicResource SelectedViewBackgroundBrush}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter Property="Panel.ZIndex" Value="1"/>
|
||||
<Setter Property="Background" TargetName="Bd" Value="{DynamicResource ViewBackgroundBrush}"/>
|
||||
</Trigger>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="IsSelected" Value="False"/>
|
||||
<Condition Property="IsMouseOver" Value="True"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="BorderBrush" TargetName="Bd" Value="#FF3C7FB1"/>
|
||||
</MultiTrigger>
|
||||
<Trigger Property="TabStripPlacement" Value="Bottom">
|
||||
<Setter Property="BorderThickness" TargetName="Bd" Value="1,0,1,1"/>
|
||||
</Trigger>
|
||||
<Trigger Property="TabStripPlacement" Value="Left">
|
||||
<Setter Property="BorderThickness" TargetName="Bd" Value="1,1,0,1"/>
|
||||
</Trigger>
|
||||
<Trigger Property="TabStripPlacement" Value="Right">
|
||||
<Setter Property="BorderThickness" TargetName="Bd" Value="0,1,1,1"/>
|
||||
</Trigger>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="IsSelected" Value="True"/>
|
||||
<Condition Property="TabStripPlacement" Value="Top"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Margin" Value="-2,-2,-2,-1"/>
|
||||
<Setter Property="Margin" TargetName="Content" Value="0,0,0,1"/>
|
||||
</MultiTrigger>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="IsSelected" Value="True"/>
|
||||
<Condition Property="TabStripPlacement" Value="Bottom"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Margin" Value="-2,-1,-2,-2"/>
|
||||
<Setter Property="Margin" TargetName="Content" Value="0,1,0,0"/>
|
||||
</MultiTrigger>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="IsSelected" Value="True"/>
|
||||
<Condition Property="TabStripPlacement" Value="Left"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Margin" Value="-2,-2,-1,-2"/>
|
||||
<Setter Property="Margin" TargetName="Content" Value="0,0,1,0"/>
|
||||
</MultiTrigger>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="IsSelected" Value="True"/>
|
||||
<Condition Property="TabStripPlacement" Value="Right"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Margin" Value="-1,-2,-2,-2"/>
|
||||
<Setter Property="Margin" TargetName="Content" Value="1,0,0,0"/>
|
||||
</MultiTrigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Background" TargetName="Bd" Value="#FFF4F4F4"/>
|
||||
<Setter Property="BorderBrush" TargetName="Bd" Value="#FFC9C7BA"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
|
||||
<DataTemplate x:Key="TabContentTemplate">
|
||||
<Border BorderThickness="0">
|
||||
<DockPanel LastChildFill="True">
|
||||
<Border DockPanel.Dock="Right" BorderBrush="Black" BorderThickness="1" Width="150" Padding="4" Margin="2,0,0,0" Background="{DynamicResource ViewBackgroundBrush}">
|
||||
<HeaderedContentControl Foreground="{DynamicResource ViewTextBrush}">
|
||||
<HeaderedContentControl.Header>
|
||||
<TextBlock Text="{Binding DisplayName}" FontWeight="Bold" />
|
||||
</HeaderedContentControl.Header>
|
||||
<TextBlock Text="{Binding Description}" TextWrapping="Wrap" FontSize="12" />
|
||||
</HeaderedContentControl>
|
||||
</Border>
|
||||
<Border BorderBrush="Black" BorderThickness="1" Margin="0,0,2,0" Padding="4" Background="{DynamicResource ViewBackgroundBrush}">
|
||||
<ContentControl Content="{Binding}" Foreground="{DynamicResource ViewTextBrush}" />
|
||||
</Border>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
<ControlTemplate x:Key="CloseButtonControlTemplate" TargetType="{x:Type Button}">
|
||||
<Grid x:Name="grid" Width="Auto" Height="Auto" Background="{x:Null}">
|
||||
<Path Data="M8.75,0 L11.25,0 11.25,8.75 20,8.75 20,11.25 11.25,11.25 11.25,20 8.75,20 8.75,11.25 0,11.25 0,8.75 8.75,8.75 z" Fill="#FFF4F4F5" Height="Auto" Stretch="Fill" HorizontalAlignment="Center" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5">
|
||||
<Path.RenderTransform>
|
||||
<TransformGroup>
|
||||
<ScaleTransform/>
|
||||
<SkewTransform/>
|
||||
<RotateTransform Angle="45"/>
|
||||
<TranslateTransform/>
|
||||
</TransformGroup>
|
||||
</Path.RenderTransform>
|
||||
</Path>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" TargetName="grid">
|
||||
<Setter.Value>
|
||||
<RadialGradientBrush>
|
||||
<GradientStop Color="#7CFFAF00" Offset="0"/>
|
||||
<GradientStop Color="#1CE9A000" Offset="1"/>
|
||||
</RadialGradientBrush>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Trigger>
|
||||
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter Property="Background" TargetName="grid">
|
||||
<Setter.Value>
|
||||
<RadialGradientBrush>
|
||||
<GradientStop Color="#BCFFB800" Offset="0.216"/>
|
||||
<GradientStop Color="#80795800" Offset="1"/>
|
||||
</RadialGradientBrush>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Trigger>
|
||||
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
|
||||
<Style x:Key="ColumnHeaderGripperStyle" TargetType="{x:Type Thumb}">
|
||||
<Setter Property="Width" Value="1"/>
|
||||
<Setter Property="Background" Value="DarkGray"/>
|
||||
<Setter Property="Cursor" Value="SizeWE"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="DataGridColumnHeaderStyle" TargetType="{x:Type DataGridColumnHeader}">
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="Padding" Value="4" />
|
||||
<Setter Property="MinWidth" Value="80" />
|
||||
<Setter Property="MinHeight" Value="30" />
|
||||
<Setter Property="Background" Value="{DynamicResource ViewBackgroundBrush}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource ViewTextBrush}"/>
|
||||
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type DataGridColumnHeader}">
|
||||
<Grid>
|
||||
<Microsoft_Windows_Themes:DataGridHeaderBorder BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" IsClickable="{TemplateBinding CanUserSort}" IsPressed="{TemplateBinding IsPressed}" IsHovered="{TemplateBinding IsMouseOver}" Padding="{TemplateBinding Padding}" SortDirection="{TemplateBinding SortDirection}" SeparatorBrush="{TemplateBinding SeparatorBrush}" SeparatorVisibility="{TemplateBinding SeparatorVisibility}">
|
||||
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||
</Microsoft_Windows_Themes:DataGridHeaderBorder>
|
||||
<Thumb x:Name="PART_LeftHeaderGripper" HorizontalAlignment="Left" Style="{StaticResource ColumnHeaderGripperStyle}"/>
|
||||
<Thumb x:Name="PART_RightHeaderGripper" HorizontalAlignment="Right" Style="{StaticResource ColumnHeaderGripperStyle}"/>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
|
||||
</Style>
|
||||
|
||||
<Style x:Key="DataGridCellStyle" TargetType="{x:Type DataGridCell}">
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type DataGridCell}">
|
||||
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
||||
<ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="VerticalScrollBarThumbStyle" TargetType="{x:Type Thumb}">
|
||||
<Setter Property="IsTabStop" Value="False"/>
|
||||
<Setter Property="Focusable" Value="False"/>
|
||||
<Setter Property="Margin" Value="1,0,1,0" />
|
||||
<Setter Property="BorderBrush" Value="{StaticResource StandardBorderBrush}" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Thumb}">
|
||||
<Rectangle Width="8" Name="ellipse" Stroke="{StaticResource StandardBorderBrush}"
|
||||
Fill="{StaticResource StandardBrush}"
|
||||
RadiusX="5" RadiusY="5"></Rectangle>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="true">
|
||||
<Setter TargetName="ellipse" Property="Fill" Value="{StaticResource HoverBrush}"></Setter>
|
||||
</Trigger>
|
||||
<Trigger Property="IsDragging" Value="True">
|
||||
<Setter TargetName="ellipse" Property="Fill" Value="{StaticResource PressedBrush}"></Setter>
|
||||
</Trigger>
|
||||
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="HorizontalScrollBarThumbStyle" TargetType="{x:Type Thumb}">
|
||||
<Setter Property="IsTabStop" Value="False"/>
|
||||
<Setter Property="Focusable" Value="False"/>
|
||||
<Setter Property="Margin" Value="0,1,0,1" />
|
||||
<Setter Property="BorderBrush" Value="{StaticResource StandardBorderBrush}" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Thumb}">
|
||||
<Rectangle Height="8" Name="ellipse" Stroke="{StaticResource StandardBorderBrush}"
|
||||
Fill="{StaticResource StandardBrush}"
|
||||
RadiusX="5" RadiusY="5"></Rectangle>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="true">
|
||||
<Setter TargetName="ellipse" Property="Fill" Value="{StaticResource HoverBrush}"></Setter>
|
||||
</Trigger>
|
||||
<Trigger Property="IsDragging" Value="True">
|
||||
<Setter TargetName="ellipse" Property="Fill" Value="{StaticResource PressedBrush}"></Setter>
|
||||
</Trigger>
|
||||
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="LineButtonUpStyle" TargetType="{x:Type RepeatButton}">
|
||||
<Setter Property="Focusable" Value="False"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type RepeatButton}">
|
||||
<Grid Margin="1" Height="18" >
|
||||
<Path Stretch="None" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" Name="Path" Fill="{StaticResource StandardBrush}"
|
||||
Data="M 0 8 L 8 8 L 4 0 Z"></Path>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="true">
|
||||
<Setter TargetName="Path" Property="Fill"
|
||||
Value="{StaticResource HoverBrush}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="true">
|
||||
<Setter TargetName="Path" Property="Fill"
|
||||
Value="{StaticResource PressedBrush}" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="LineButtonDownStyle" TargetType="{x:Type RepeatButton}">
|
||||
<Setter Property="Focusable" Value="False"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type RepeatButton}">
|
||||
<Grid Margin="1" Height="18" >
|
||||
<Path Stretch="None" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" Name="Path" Fill="{StaticResource StandardBrush}"
|
||||
Data="M 0 0 L 4 8 L 8 0 Z"></Path>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="true">
|
||||
<Setter TargetName="Path" Property="Fill"
|
||||
Value="{StaticResource HoverBrush}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="true">
|
||||
<Setter TargetName="Path" Property="Fill"
|
||||
Value="{StaticResource PressedBrush}" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="LineButtonLeftStyle" TargetType="{x:Type RepeatButton}">
|
||||
<Setter Property="Focusable" Value="False"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type RepeatButton}">
|
||||
<Grid Margin="1" Width="18" >
|
||||
<Path Stretch="None" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" Name="Path" Fill="{StaticResource StandardBrush}"
|
||||
Data="M 0 0 L -8 4 L 0 8 Z"></Path>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="true">
|
||||
<Setter TargetName="Path" Property="Fill"
|
||||
Value="{StaticResource HoverBrush}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="true">
|
||||
<Setter TargetName="Path" Property="Fill"
|
||||
Value="{StaticResource PressedBrush}" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="LineButtonRightStyle" TargetType="{x:Type RepeatButton}">
|
||||
<Setter Property="Focusable" Value="False"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type RepeatButton}">
|
||||
<Grid Margin="1" Width="18" >
|
||||
<Path Stretch="None" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" Name="Path" Fill="{StaticResource StandardBrush}"
|
||||
Data="M 0 0 L 8 4 L 0 8 Z"></Path>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="true">
|
||||
<Setter TargetName="Path" Property="Fill"
|
||||
Value="{StaticResource HoverBrush}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="true">
|
||||
<Setter TargetName="Path" Property="Fill"
|
||||
Value="{StaticResource PressedBrush}" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ScrollBarPageButtonStyle" TargetType="{x:Type RepeatButton}">
|
||||
<Setter Property="IsTabStop" Value="False"/>
|
||||
<Setter Property="Focusable" Value="False"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type RepeatButton}">
|
||||
<Border Background="Transparent" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<ControlTemplate x:Key="VerticalScrollBar" TargetType="{x:Type ScrollBar}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition MaxHeight="18"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition MaxHeight="18"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.Background>
|
||||
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
|
||||
<GradientStop Offset="0" Color="#4c4c4c"></GradientStop>
|
||||
<GradientStop Offset="1" Color="#434343"></GradientStop>
|
||||
</LinearGradientBrush>
|
||||
</Grid.Background>
|
||||
<RepeatButton Grid.Row="0" Height="18"
|
||||
Style="{StaticResource LineButtonUpStyle}"
|
||||
Command="ScrollBar.LineUpCommand" >
|
||||
|
||||
</RepeatButton>
|
||||
|
||||
<Track Name="PART_Track" Grid.Row="1" IsDirectionReversed="True" >
|
||||
<Track.DecreaseRepeatButton>
|
||||
<RepeatButton Command="ScrollBar.PageUpCommand"
|
||||
Style="{StaticResource ScrollBarPageButtonStyle}">
|
||||
</RepeatButton>
|
||||
</Track.DecreaseRepeatButton>
|
||||
<Track.Thumb>
|
||||
<Thumb Style="{StaticResource VerticalScrollBarThumbStyle}">
|
||||
</Thumb>
|
||||
</Track.Thumb>
|
||||
<Track.IncreaseRepeatButton>
|
||||
<RepeatButton Command="ScrollBar.PageDownCommand"
|
||||
Style="{StaticResource ScrollBarPageButtonStyle}">
|
||||
</RepeatButton>
|
||||
</Track.IncreaseRepeatButton>
|
||||
</Track>
|
||||
|
||||
<RepeatButton Grid.Row="2" Height="18"
|
||||
Style="{StaticResource LineButtonDownStyle}"
|
||||
Command="ScrollBar.LineDownCommand">
|
||||
</RepeatButton>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
|
||||
<ControlTemplate x:Key="HorizontalScrollBar" TargetType="{x:Type ScrollBar}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition MaxWidth="18"></ColumnDefinition>
|
||||
<ColumnDefinition Width="*"></ColumnDefinition>
|
||||
<ColumnDefinition MaxWidth="18"></ColumnDefinition>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.Background>
|
||||
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
|
||||
<GradientStop Offset="0" Color="#4c4c4c"></GradientStop>
|
||||
<GradientStop Offset="1" Color="#434343"></GradientStop>
|
||||
</LinearGradientBrush>
|
||||
</Grid.Background>
|
||||
<RepeatButton Grid.Column="0" Width="18"
|
||||
Style="{StaticResource LineButtonLeftStyle}"
|
||||
Command="ScrollBar.LineLeftCommand" >
|
||||
</RepeatButton>
|
||||
|
||||
<Track Name="PART_Track" Grid.Column="1" IsDirectionReversed="False" >
|
||||
<Track.DecreaseRepeatButton>
|
||||
<RepeatButton Command="ScrollBar.PageLeftCommand"
|
||||
Style="{StaticResource ScrollBarPageButtonStyle}">
|
||||
</RepeatButton>
|
||||
</Track.DecreaseRepeatButton>
|
||||
<Track.Thumb>
|
||||
<Thumb Style="{StaticResource HorizontalScrollBarThumbStyle}">
|
||||
</Thumb>
|
||||
</Track.Thumb>
|
||||
<Track.IncreaseRepeatButton>
|
||||
<RepeatButton Command="ScrollBar.PageRightCommand"
|
||||
Style="{StaticResource ScrollBarPageButtonStyle}">
|
||||
</RepeatButton>
|
||||
</Track.IncreaseRepeatButton>
|
||||
</Track>
|
||||
<RepeatButton Grid.Column="2" Width="18"
|
||||
Style="{StaticResource LineButtonRightStyle}"
|
||||
Command="ScrollBar.LineRightCommand">
|
||||
</RepeatButton>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
|
||||
<Style TargetType="{x:Type ScrollBar}">
|
||||
<Setter Property="SnapsToDevicePixels" Value="True"/>
|
||||
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="Orientation" Value="Vertical">
|
||||
<Setter Property="Width" Value="18"/>
|
||||
<Setter Property="Height" Value="Auto" />
|
||||
<Setter Property="Template" Value="{StaticResource VerticalScrollBar}" />
|
||||
</Trigger>
|
||||
<Trigger Property="Orientation" Value="Horizontal">
|
||||
<Setter Property="Width" Value="Auto"/>
|
||||
<Setter Property="Height" Value="18" />
|
||||
<Setter Property="Template" Value="{StaticResource HorizontalScrollBar}" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 3.6 KiB |