Skip to content

Instantly share code, notes, and snippets.

@gritsenko
gritsenko / MainPage.xaml
Created June 22, 2018 18:50
No refresh on text changed on uno platform
<Page
x:Class="UnoTest1.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:UnoTest1"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
x:Name="Page">
@gritsenko
gritsenko / AvaloniaContolExtensions.cs
Created November 19, 2021 22:54
Extension helpers to make avalonia markup from code
using Avalonia;
using Avalonia.Animation;
using Avalonia.Collections;
using Avalonia.Controls;
using Avalonia.Controls.Notifications;
using Avalonia.Controls.Presenters;
using Avalonia.Controls.Primitives;
using Avalonia.Controls.Primitives.PopupPositioning;
using Avalonia.Controls.Selection;
using Avalonia.Controls.Shapes;
@gritsenko
gritsenko / BarPlotter.cs
Created December 3, 2021 11:39
Plot gistagram with avalonia and Skia
using System;
using System.Collections.Generic;
using System.Threading;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Media;
using Avalonia.Media.Imaging;
using Avalonia.Skia;
using Avalonia.Threading;
using SkiaSharp;
@gritsenko
gritsenko / SimpleComponent.cs
Created March 18, 2024 19:19
Example how to use Avalonia.Markup.Declarative MVU pattern
using System.Diagnostics.CodeAnalysis;
using Avalonia.Styling;
namespace MvuTemplate;
//prevent from trimming [injected] services by native aot compilation
[method: DynamicDependency(DynamicallyAccessedMemberTypes.PublicProperties, typeof(SimpleComponent))]
public class SimpleComponent() : ComponentBase
{