Skip to content

Instantly share code, notes, and snippets.

View wieslawsoltes's full-sized avatar

Wiesław Šoltés wieslawsoltes

View GitHub Profile
@wieslawsoltes
wieslawsoltes / s1.svg
Last active November 12, 2022 15:52
Figma
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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;
@wieslawsoltes
wieslawsoltes / Morph.cs
Created June 10, 2021 05:59 — forked from badamczewski/Morph.cs
Text Morphing in WPF
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Animation;
namespace WPFAnimations
@wieslawsoltes
wieslawsoltes / ParallelSort.cs
Created September 17, 2013 10:21
C# Parallel Sort
#region References
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
#endregion
@wieslawsoltes
wieslawsoltes / ILRepack.cake
Created August 12, 2016 17:48
ILRepack.cake
Task("ILRepack")
.IsDependentOn("Build")
.Does(() =>
{
var libToILRepack = new string[][]
{
new [] { "./src/", "Avalonia.Base" },
new [] { "./src/", "Avalonia.Animation" },
new [] { "./src/", "Avalonia.Controls" },
new [] { "./src/", "Avalonia.Input" },
@wieslawsoltes
wieslawsoltes / Window1.xaml
Created January 20, 2016 14:16
WPF Path Stroke Animation
<Window x:Class="PathDemo.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="PathDemo" Height="400" Width="800" Name="UI">
<Grid DataContext="{Binding ElementName=UI}">
<Path x:Name="lo" Data="M 50,100 S 100,132 150,86 200,173 250,76 300,81 350,136 400,87 450,166 500,87 550,96"
Stroke="White" StrokeThickness="13" StrokeDashArray="{Binding StrokeArray}" />
<Path Name="core" Data="M 50,100 S 100,132 150,86 200,173 250,76 300,81 350,136 400,87 450,166 500,87 550,96"
Stroke="Blue" StrokeThickness="2">
<Path.OpacityMask>
<VisualBrush Visual="{Binding ElementName=lo}" />
</Path.OpacityMask>
</Path>
void draw(SkCanvas* canvas) {
SkPaint paint1;
SkPaint paint2;
float width = 120.0f;
float height = 90.0f;
float cw = 15.0f;
float ch = 15.0f;
@wieslawsoltes
wieslawsoltes / Core2D.cs
Created April 23, 2019 11:53
Decompiled xaml from my Avalonia app
This file has been truncated, but you can view the full file.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Globalization;
using Avalonia;
using Avalonia.Collections;
using Avalonia.Controls;
using Avalonia.Controls.PanAndZoom;
Download files:
mkdir build/build
wget https://raw.githubusercontent.com/wieslawsoltes/ThemeEditor/master/build/build/Build.cs -O ./build/build/Build.cs
wget https://raw.githubusercontent.com/wieslawsoltes/ThemeEditor/master/build/build/_build.csproj -O ./build/build/_build.csproj
wget https://raw.githubusercontent.com/wieslawsoltes/ThemeEditor/master/.nuke
wget https://raw.githubusercontent.com/wieslawsoltes/ThemeEditor/master/build.ps1
wget https://raw.githubusercontent.com/wieslawsoltes/ThemeEditor/master/build.sh
wget https://raw.githubusercontent.com/wieslawsoltes/ThemeEditor/master/global.json
<Styles xmlns="https://github.com/avaloniaui">
<Style Selector="ScrollBar">
<Setter Property="Template">
<ControlTemplate>
<Border Background="{DynamicResource ThemeControlMidBrush}">
<Grid RowDefinitions="20,*,20">
<RepeatButton Name="PART_LineUpButton"
Classes="repeat"
Grid.Row="0"
Grid.Column="0"