Skip to content

Instantly share code, notes, and snippets.

@danwalmsley
danwalmsley / Main.axaml
Last active October 26, 2022 19:08
Colours
<UserControl xmlns="https://github.com/avaloniaui">
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<Canvas Width="120" Height="120">
<Rectangle Name="One" Height="44" Width="44" />
<Rectangle Name="Two" Height="44" Width="44" Canvas.Left="20" Canvas.Top="20" />
<Rectangle Name="Three" Height="44" Width="44" Canvas.Left="40" Canvas.Top="40" />
<Rectangle Name="Four" Height="44" Width="44" Canvas.Left="60" Canvas.Top="60" />
</Canvas>
@danwalmsley
danwalmsley / index.html
Last active October 22, 2022 14:41
repro chrome requestAnimationFrame issue
<!DOCTYPE html>
<html>
<body>
<script>
var request = window.requestAnimationFrame(onRender);
var frame = 0;
function onRender (){
console.log("paint");
<Grid
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Button Content="Dont Click Me!" />
</Grid>
using System;
using Avalonia.Controls.Platform;
using Avalonia.Platform;
#nullable enable
namespace Avalonia.Controls
{
public class TrayIcon : AvaloniaObject, IDataContextProvider
{
<p style="display: inline-flex;
"><img src="https://raw.githubusercontent.com/microsoft/fluentui-system-icons/master/assets/Tab Desktop New Page/SVG/ic_fluent_tab_desktop_new_page_20_regular.svg"
width="24" height="24"> tab_desktop_new_page_regular
<div class="language-xml highlighter-rouge" style="max-width: 800px;">
<div class="highlight">
<pre class="highlight"><code><span class="nt">&lt;StreamGeometry</span> <span class="na">x:Key=</span><span class="s">"tab_desktop_new_page_regular"</span><span class="nt">&gt;</span>M7 12C7.55228 12 8 11.5523 8 11C8 10.4477 7.55228 10 7 10C6.44772 10 6 10.4477 6 11C6 11.5523 6.44772 12 7 12Z M11 11C11 11.5523 10.5523 12 10 12C9.44772 12 9 11.5523 9 11C9 10.4477 9.44772 10 10 10C10.5523 10 11 10.4477 11 11Z M13 12C13.5523 12 14 11.5523 14 11C14 10.4477 13.5523 10 13 10C12.4477 10 12 10.4477 12 11C12 11.5523 12.4477 12 13 12Z M3 5.5C3 4.11929 4.11929 3 5.5 3H14.5C15.8807 3 17 4.11929 17 5.5V14.5C17 15.8807 15.8807 17 14.5
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description"
content="A cross platform XAML-based UI framework for .NET Core, .NET Framework and Mono. Avalonia supports Windows, Linux and macOS with experimental mobile support.">
<meta property="og:url" content="https://avaloniaui.net/">
<meta property="og:type" content="article">
Process: dotnet [28358]
Path: /usr/local/share/dotnet/dotnet
Identifier: dotnet
Version: 0
Code Type: X86-64 (Native)
Parent Process: rider [28193]
Responsible: rider [28193]
User ID: 501
Date/Time: 2021-03-29 10:24:19.693 +0100
/*
NSAccessibilityProtocols.h
Application Kit
Copyright (c) 2013-2019, Apple Inc.
All rights reserved.
*/
#import <Foundation/Foundation.h>
#import <AppKit/NSAccessibilityConstants.h>
#import <AppKit/NSAccessibilityCustomAction.h>
/*
NSAccessibilityElement.h
Application Kit
Copyright (c) 2013-2019, Apple Inc.
All rights reserved.
*/
#import <Foundation/Foundation.h>
#import <AppKit/NSAccessibilityConstants.h>
#import <AppKit/NSAccessibilityProtocols.h>
Process: dotnet [10191]
Path: /usr/local/share/dotnet/dotnet
Identifier: dotnet
Version: 0
Code Type: X86-64 (Translated)
Parent Process: zsh [10139]
Responsible: Terminal [10130]
User ID: 501
Date/Time: 2020-12-17 20:49:45.457 +0000