Skip to content

Instantly share code, notes, and snippets.

View wieslawsoltes's full-sized avatar

Wiesław Šoltés wieslawsoltes

View GitHub Profile
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.Input;
using System.Windows.Media;
@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>
@wieslawsoltes
wieslawsoltes / AvaloniaNuGetPackages.md
Last active August 13, 2016 18:51
Propsal for Avalonia NuGet packages

Avalonia NuGet Packages

Avalonia is divided into several NuGet packages.

  • The Avalonia package contains core portable class libraries.
  • The Dekstop and Mobile packages contain platform specific windowing and rendering back-ends.
  • The Avalonia.Desktop package is intended to be used by the end users targeting multiple desktop platforms (Windows, Linux and OSX).
  • The Avalonia.iOS and Avalonia.Android packages are intended to be used by the end users targeting specific mobile platforms.
  • The Avalonia.Mobile package is intended to be used by the end users targeting multiple mobile platforms (Android and iOS).
@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" },
///////////////////////////////////////////////////////////////////////////////
// ADDINS
///////////////////////////////////////////////////////////////////////////////
#addin "nuget:?package=Polly&version=4.2.0"
///////////////////////////////////////////////////////////////////////////////
// TOOLS
///////////////////////////////////////////////////////////////////////////////
#addin "nuget:?package=NuGet.Core&version=2.12.0"
Information("Getting git modules:");
var ignoredSubModulesPaths = System.IO.File.ReadAllLines(".git/config").Where(m => m.StartsWith("[submodule ")).Select(m =>
{
var path = m.Split(' ')[1].Trim("\"[] \t".ToArray());
@wieslawsoltes
wieslawsoltes / reclaimWindows10.ps1
Created January 8, 2017 07:00 — forked from alirobe/reclaimWindows10.ps1
"Reclaim Windows 10" turns off a bunch of unnecessary Windows 10 telemetery, removes bloatware, and privacy invasions. Review and tweak before running. Scripts for reversing are included and commented. Fork via https://github.com/Disassembler0 (different defaults)
##########
# Win10 Initial Setup Script
# Author: Disassembler <[email protected]>
# Version: 1.7, 2016-08-15
# dasm's script: https://github.com/Disassembler0/Win10-Initial-Setup-Script/
# THIS IS A PERSONALIZED VERSION
# This script leaves more MS defaults on, including MS security features.
# Tweaked based on personal preferences for @alirobe 2016-11-16 - v1.7.1
Unhandled Exception: System.TypeLoadException: Could not load type 'System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken' from assembly 'System.Runtime.InteropServices.WindowsRuntime, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
at System.Reactive.ReflectionUtils.GetEventMethods[TSender,TEventArgs](Type targetType, Object target, String eventName, MethodInfo& addMethod, MethodInfo& removeMethod, Type& delegateType, Boolean& isWinRT)
at System.Reactive.Linq.QueryLanguage.FromEventPattern_[TSender,TEventArgs,TResult](Type targetType, Object target, String eventName, Func`3 getResult, IScheduler scheduler)
at Utilities.Avalonia.AvaloniaInputSource.GetPressedObservable(Control target, String eventName, Control relative, Func`2 translate, MouseButton button) in /home/wiso/Projects/Core2D/src/Utilities.Avalonia/AvaloniaInputSource.cs:line 59
at Utilities.Avalonia.AvaloniaInputSource..ctor(Control source, Control relative, Func`2 translate) in /home/wiso/Projects/Co
Unhandled Exception: System.TypeLoadException: Could not load type 'System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken' from assembly 'System.Runtime.InteropServices.WindowsRuntime, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
at Avalonia.Xaml.Interactions.Core.EventTriggerBehavior.RegisterEvent(String eventName)
at Avalonia.AvaloniaObject.RaisePropertyChanged(AvaloniaProperty property, Object oldValue, Object newValue, BindingPriority priority)
at Avalonia.AvaloniaObject.Avalonia.IPriorityValueOwner.Changed(PriorityValue sender, Object oldValue, Object newValue)
at Avalonia.PriorityValue.UpdateValue(Object value, Int32 priority)
at System.Reactive.AnonymousSafeObserver`1.OnNext(T value)
at System.Reactive.ScheduledObserver`1.Run(Object state, Action`1 recurse)
at System.Reactive.Concurrency.Scheduler.InvokeRec1[TState](IScheduler scheduler, Pair`2 pair)
at Avalonia.Threading.AvaloniaScheduler.Schedule[TState](TState state, TimeSpan dueTime, Fun
Directory: C:\Users\Wiesław\Documents\visual studio 2017\Projects\ConsoleApp2\ConsoleApp2\win7-x64
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 13.06.2016 21:46 18672 API-MS-Win-Base-Util-L1-1-0.dll
-a---- 13.06.2016 21:46 23272 api-ms-win-core-com-l1-1-0.dll
-a---- 13.0