Skip to content

Instantly share code, notes, and snippets.

@pierre3
pierre3 / App.xaml.cs
Created November 22, 2015 03:18
[UWP][Prism] NavigationServiceの対象FrameをMainPageのSpritViewに設定するやつ
using Prism.Unity.Windows;
using RssReaderApp.Views;
using System.Threading.Tasks;
using Windows.ApplicationModel.Activation;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
namespace RssReaderApp
{
/// <summary>
@pierre3
pierre3 / AddFeedDialog.xaml
Created November 28, 2015 03:11
ContentDialog のイベントをx:Bindすると Xaml内部エラーになる
<ContentDialog
x:Class="RssReaderApp.Views.AddFeedDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:RssReaderApp.Views"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Title="Feedの追加"
PrimaryButtonText="追加"
<#
.Synopsis
短い説明
.DESCRIPTION
詳しい説明
.EXAMPLE
このコマンドレットの使用方法の例
.EXAMPLE
このコマンドレットの使用方法の別の例
#>
@pierre3
pierre3 / recentItemsCompletion.ps1
Last active August 20, 2016 08:11
「最近使った項目」一覧を入力候補とする ArgumentCompleter
$recentItemsCompletion = {
param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)
# "\" が含まれる場合は、通常のPath入力とみなし、独自の入力補完は行わない
# 例えば"C:\" と入力した場合など
if(([string]$wordToComplete).Contains("\") )
{
return;
}
@pierre3
pierre3 / ObservableExt.cs
Last active May 29, 2016 01:35
ThrowIfFalse 条件式がFalseを返したら例外を発行するIObservable<T> 拡張メソッド
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reactive.Linq;
namespace ConsoleApplication5
{
static class ObservalbeExt
{
/// <summary>