Skip to content

Instantly share code, notes, and snippets.

View tmyt's full-sized avatar
🏠
Working from home

Yutaka TSUMORI tmyt

🏠
Working from home
View GitHub Profile
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Microsoft.Xaml.Interactivity;
namespace Tetraptera.Views.Behaviors
{
public class SelectTemplateBehavior : DependencyObject, IBehavior
{
public void Attach(DependencyObject associatedObject)
{
@tmyt
tmyt / generic.xaml
Last active May 21, 2018 16:28
windows 8.1 - system theme
<!--
//
// Copyright (c) Microsoft Corporation. All Rights Reserved.
//
-->
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary.ThemeDictionaries>
using System;
namespace Common
{
public static class Try
{
public static TResult Catch<TException, TResult>(Func<TResult> func, TResult fallback = default(TResult))
where TException : Exception
{
try
% ../split_bootimg.pl boot.img 2016/05/31 18:04:19
Page size: 4096 (0x00001000)
Kernel size: 10391926 (0x009e9176)
Ramdisk size: 1626781 (0x0018d29d)
Second size: 0 (0x00000000)
Board name:
Command line: console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x37 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 boot_cpus=0-3
Base address: (0x00000000)
Writing boot.img-kernel ... complete.
Writing boot.img-ramdisk.gz ... complete.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Threading;
using Windows.UI.Xaml.Automation.Peers;
using Windows.UI.Xaml.Automation.Provider;
using Windows.UI.Xaml.Controls;
namespace Tetraptera.Common.Extensions
{
public static class ButtonExtension
{
public static void RaiseClick(this Button button)
{
public static class PlatformDetector
{
public static bool IsWindows10_10240()
{
return typeof(Windows.UI.ViewManagement.ApplicationView)?.GetRuntimeProperty("PreferredLaunchViewSize") != null;
}
public static bool IsWindows10_10586()
{
return typeof(Windows.UI.Core.CoreWindow)?.GetRuntimeEvent("PointerRoutedAway") != null;
var builder = new BackgroundTaskBuilder { Name = "toasttest handler", TaskEntryPoint = "toasthandler_w81.ToastHandler" };
var name = typeof (SystemTrigger).AssemblyQualifiedName.Replace("SystemTrigger", "ToastNotificationActionTrigger");
var trigger = Activator.CreateInstance(Type.GetType(name)) as IBackgroundTrigger;
builder.SetTrigger(trigger);
builder.Register();
using System.Collections;
using System.Linq;
using System.Reflection;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
namespace Common.Extensions
{
/// <summary>
/// This is Darkness. It's workarounds for Runtime Bugs on TH2(10586).
<!--
TextBoxにフォーカスを合わせてもSIPが出なくなる現象の再現プログラム
==================================================================
## 再現手順
1. Windows Phone 8.1 ターゲットでビルド
2. Windows 10 Mobile (10586) へインストール
3. アプリケーションを起動
4. Windowsキーを押してスタートスクリーンへ戻る
5. Backキーを長押ししタスク一覧を表示