The following are examples of various features.
This file contains hidden or 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.Collections; | |
using System.Collections.Generic; | |
using System.Collections.ObjectModel; | |
using System.Collections.Specialized; | |
using System.Linq; | |
using Avalonia; | |
using Avalonia.Controls; | |
using Avalonia.Controls.Selection; |
This file contains hidden or 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.Collections.Generic; | |
using System.Text.RegularExpressions; | |
namespace Ghostly.Utilities | |
{ | |
// Emoji list borrowed from https://github.com/lunet-io/markdig/blob/25959174d521c7f4458fa7b340d58a4ac136fa30/src/Markdig/Extensions/Emoji/EmojiParser.cs | |
public static class EmojiReplacer | |
{ | |
private static Regex _regex; | |
private static Dictionary<string, string> _lookup; |
This file contains hidden or 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 PackIconControl : ContentControl | |
{ | |
public PackIconControl() | |
{ | |
SizeChanged += OnSizeChanged; | |
} | |
public static readonly DependencyProperty PackIconKindProperty = | |
DependencyProperty.Register(nameof(PackIconKind), typeof(object), typeof(PackIconControl), | |
new PropertyMetadata(default(object), PackIconKindPropertyChangedCallback)); |
This file contains hidden or 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.Diagnostics; | |
using System.Runtime.InteropServices; | |
using System.Windows; | |
using System.Windows.Interop; | |
namespace KinectRun.Host.Controls | |
{ | |
// GameHost is a FrameworkElement and can be added to controls like so: | |
// var gameHost = new GameHost(container.ActualWidth, container.ActualHeight); |
This file contains hidden or 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:Controls="clr-namespace:MahApps.Metro.Controls" | |
xmlns:Behaviours="clr-namespace:MahApps.Metro.Behaviours" | |
xmlns:Converters="clr-namespace:MahApps.Metro.Converters"> | |
<Converters:ThicknessBindingConverter x:Key="ThicknessBindingConverter" /> | |
<Style x:Key="ExpanderBaseHeaderStyle" TargetType="{x:Type ToggleButton}"> | |
<Setter Property="Background" Value="Transparent" /> |
This file contains hidden or 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
/* | |
* Provides DWM Color as a Bindable Property | |
* Add the Namespace | |
* xmlns:dwmAero="clr-namespace:MahApps.Metro.DWMAero" | |
* And a Resource | |
* <dwmAero:AeroColorProvider x:Key="AeroColorProvider" /> | |
* Then Bind on the Properties (110%,95%,80%,65%,50% Respectively) | |
* Color="{Binding Source={StaticResource AeroColorProvider}, Path=Highlight}" | |
* Color="{Binding Source={StaticResource AeroColorProvider}, Path=Accent}" | |
* Color="{Binding Source={StaticResource AeroColorProvider}, Path=Accent2}" |
This file contains hidden or 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or 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.Diagnostics; | |
using System.Runtime.InteropServices; | |
using System.Windows; | |
using System.Windows.Controls.Primitives; | |
using System.Windows.Input; | |
using System.Windows.Interop; | |
/// <summary> | |
/// Popup with code to not be the topmost control |
NewerOlder