This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<#@ template debug="false" hostspecific="true" language="C#" #> | |
<#@ assembly name="System.Core" #> | |
<#@ assembly name="System.Xml" #> | |
<#@ assembly name="System.Xml.Linq" #> | |
<#@ import namespace="System.IO" #> | |
<#@ import namespace="System.Linq" #> | |
<#@ import namespace="System.Text.RegularExpressions" #> | |
<#@ import namespace="System.Xml.Linq" #> | |
<#@ import namespace="System.Collections.Generic" #> | |
<#@ import namespace="Microsoft.CSharp" #> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<#@ template debug="false" hostspecific="true" language="C#" #> | |
<#@ assembly name="System.Core" #> | |
<#@ assembly name="System.Xml" #> | |
<#@ assembly name="System.Xml.Linq" #> | |
<#@ import namespace="System.IO" #> | |
<#@ import namespace="System.Linq" #> | |
<#@ import namespace="System.Text.RegularExpressions" #> | |
<#@ import namespace="System.Xml.Linq" #> | |
<#@ import namespace="System.Collections.Generic" #> | |
<#@ import namespace="Microsoft.CSharp" #> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// <Interactivity:Interaction.Behaviors> | |
/// <MoreBehaviors:CommandOnEnterPressFocus Target="{Binding ElementName=yourothercontrol}" /> | |
/// </Interactivity:Interaction.Behaviors> | |
/// </summary> | |
[Microsoft.Xaml.Interactivity.TypeConstraint(typeof(TextBox))] | |
class CommandOnEnterPressFocus : DependencyObject, IBehavior | |
{ | |
public Windows.UI.Xaml.DependencyObject AssociatedObject { get; set; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// <Interactivity:Interaction.Behaviors> | |
/// <MoreBehaviors:CommandOnEnterPress Command="{Binding DoYourCommand}" /> | |
/// </Interactivity:Interaction.Behaviors> | |
/// </summary> | |
[Microsoft.Xaml.Interactivity.TypeConstraint(typeof(TextBox))] | |
class CommandOnEnterPress : DependencyObject, IBehavior | |
{ | |
[Microsoft.Xaml.Interactivity.CustomPropertyValueEditor(Microsoft.Xaml.Interactivity.CustomPropertyValueEditor.PropertyBinding)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<SnippetTypes> | |
<SnippetType>Expansion</SnippetType> | |
</SnippetTypes> | |
<Title>relrt</Title> | |
<Author>Cristovao Morgado</Author> | |
<Description>Code snippet for an automatically implemented Relaycommands |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Threading.Tasks; | |
using Windows.Security.Cryptography; | |
using Windows.Security.Cryptography.DataProtection; | |
namespace CMM.Extensions | |
{ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:CimbalinoConverters="using:Cimbalino.Toolkit.Converters" | |
> | |
<CimbalinoConverters:BooleanToBrushConverter x:Key="BooleanToBrushConverter" /> | |
<CimbalinoConverters:BooleanToIntConverter x:Key="BooleanToIntConverter" /> | |
<CimbalinoConverters:BooleanToStringConverter x:Key="BooleanToStringConverter" /> | |
<CimbalinoConverters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ScrollToLeftGridViewBehavior : DependencyObject, IBehavior | |
{ | |
public DependencyObject AssociatedObject { get; private set; } | |
public object ItemsSource | |
{ | |
get { return (object)GetValue(ItemsSourceProperty); } | |
set { SetValue(ItemsSourceProperty, value); } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// transform any sync code to async | |
/// Nice when your implementing an Interface that is "async" but your implementation is no so async | |
public class AsyncUtils | |
{ | |
public static Task<T> FromResultAsync<T>(T result) | |
{ | |
var tcs = new TaskCompletionSource<T>(); | |
tcs.SetResult(result); | |
return tcs.Task; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- This gist is a collection of commonly needed cardano plutus functions for validation scripts | |
-- |