Skip to content

Instantly share code, notes, and snippets.

<Grid x:Name="LayoutRoot" Background="White">
<i:Interaction.Triggers>
<ei:KeyTrigger Key="A" Modifiers="Control,Alt" >
<ei:ChangePropertyAction PropertyName="Background" TargetName="LayoutRoot">
<ei:ChangePropertyAction.Value>
<SolidColorBrush Color="Red"/>
</ei:ChangePropertyAction.Value>
</ei:ChangePropertyAction>
</ei:KeyTrigger>
</i:Interaction.Triggers>
<Grid x:Name="LayoutRoot" Background="White">
<i:Interaction.Triggers>
<ei:KeyTrigger Key="A" Modifiers="Control+Alt" >
<ei:ChangePropertyAction PropertyName="Background" TargetName="LayoutRoot">
<ei:ChangePropertyAction.Value>
<SolidColorBrush Color="Red"/>
</ei:ChangePropertyAction.Value>
</ei:ChangePropertyAction>
</ei:KeyTrigger>
</i:Interaction.Triggers>
protected override void OnNavigatedTo(NavigationEventArgs e)
{
if (NavigationContext.QueryString.ContainsKey("id"))
{
testText.Text = NavigationContext.QueryString["id"];
}
}
public partial class Page1 : Page
{
public Page1(string param)
{
InitializeComponent();
testText.Text = param;
}
}
using System;
using System.Windows;
using System.Windows.Threading;
namespace WpfApplication1
{
public partial class MainWindow : Window
{
DispatcherTimer timer = new DispatcherTimer() { Interval = TimeSpan.FromSeconds(1) };
int sec = 5;
using System;
using System.Windows;
using System.Windows.Media.Animation;
namespace WpfApplication1
{
public partial class MainWindow : Window
{
Storyboard sb_timer = new Storyboard() { Duration = TimeSpan.FromSeconds(1) };
int sec = 5;
<phone:PhoneApplicationPage
x:Class="AppBar.PivotPage1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" >
using System.Windows.Controls;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
namespace AppBar
{
public partial class PivotPage1 : PhoneApplicationPage
{
public PivotPage1()
{
<phone:PhoneApplicationPage
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
x:Class="HubtileStates.MainPage"
mc:Ignorable="d">
using System.Windows;
using Microsoft.Phone.Controls;
namespace HubtileStates
{
public partial class MainPage : PhoneApplicationPage
{
public MainPage()
{
InitializeComponent();