Skip to content

Instantly share code, notes, and snippets.

View maxkatz6's full-sized avatar

Max Katz maxkatz6

View GitHub Profile
@maxkatz6
maxkatz6 / Avalonia.Android.dll.api.diff
Last active April 25, 2024 04:05
Avalonia 11.1.0-beta2 API Diff
diff --git a/baseline/net8.0-android34.0/Avalonia.Android.dll872095394.api.cs b/target/net8.0-android34.0/Avalonia.Android.dll659161654.api.cs
index 9b17c5b..057b66f 100644
--- a/baseline/net8.0-android34.0/Avalonia.Android.dll872095394.api.cs
+++ b/target/net8.0-android34.0/Avalonia.Android.dll659161654.api.cs
@@ -53,57 +53,62 @@ namespace Avalonia.Android
public void Destroy() { }
}
- public partial class AvaloniaMainActivity : IAvaloniaActivity, IActivityResultHandler, IActivityNavigationService
+ public partial class AvaloniaActivity : IAvaloniaActivity, IActivityResultHandler, IActivityNavigationService
@maxkatz6
maxkatz6 / Avalonia.Base.dll.api.diff
Last active April 25, 2024 04:05
Avalonia 11.1.0-beta1 API Diff
diff --git a/baseline/net6.0/Avalonia.Base.dll1708614068.api.cs b/target/net6.0/Avalonia.Base.dll294867528.api.cs
index 61aff96..78f5426 100644
--- a/baseline/net6.0/Avalonia.Base.dll1708614068.api.cs
+++ b/target/net6.0/Avalonia.Base.dll294867528.api.cs
@@ -26,7 +26,7 @@
[assembly: System.Reflection.AssemblyFlagsAttribute((System.Reflection.AssemblyNameFlags)0x70)]
namespace Avalonia
{
- public partial class AttachedProperty<TValue> : StyledProperty<TValue>
+ public sealed partial class AttachedProperty<TValue> : StyledProperty<TValue>
using System;
using System.Threading.Tasks;
using System.Windows.Input;
namespace MyAssembly.ViewModels;
/// <summary>
/// Simple implementation of Interaction pattern from ReactiveUI framework.
/// https://www.reactiveui.net/docs/handbook/interactions/
/// </summary>
<?xml version='1.0'?>
<Obfuscator>
<Var name="InPath" value="." />
<Var name="OutPath" value="./Obfuscated" />
<Var name="KeepPublicApi" value="true" />
<Var name="HidePrivateApi" value="true" />
<Module file="$(InPath)/Views.dll">
<SkipType name="!AvaloniaResources" />
<SkipType name="CompiledAvaloniaXaml*" />
public class AsyncImage : Image
{
private static readonly HttpClient httpClient = new HttpClient();
public static readonly StyledProperty<string?> AsyncSourceProperty =
AvaloniaProperty.Register<AsyncImage, string?>(nameof(AsyncSource));
public static readonly StyledProperty<string?> FallbackSourceProperty =
AvaloniaProperty.Register<AsyncImage, string?>(nameof(FallbackSource));
<UserControl
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:i="clr-namespace:Avalonia.Xaml.Interactivity;assembly=Avalonia.Xaml.Interactivity"
xmlns:ia="clr-namespace:Avalonia.Xaml.Interactions.Core;assembly=Avalonia.Xaml.Interactions"
MaxWidth="600">
<UserControl.Styles>
<Styles>
<Style Selector="Border.animated">
<Style.Animations>
@maxkatz6
maxkatz6 / HorizontalScroller.xaml
Created April 17, 2022 03:00
horizontalScroller
<Style Selector="ScrollViewer.horizontalScroller">
<Setter Property="Template">
<ControlTemplate>
<DockPanel>
<RepeatButton x:Name="ScrollLeftButton"
DockPanel.Dock="Left"
Foreground="{DynamicResource SystemControlForegroundBaseHighBrush}"
Command="{Binding PageLeft, RelativeSource={RelativeSource TemplatedParent}}">
<RepeatButton.IsVisible>
<MultiBinding Converter="{x:Static avaConv:MenuScrollingVisibilityConverter.Instance}"
@maxkatz6
maxkatz6 / SelectionItemsRepeater.cs
Last active November 15, 2024 15:16
SelectionItemsRepeater.cs
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;
@maxkatz6
maxkatz6 / MyProject.csproj
Last active January 3, 2022 06:09
obfuscar.xml
<Project Sdk="Microsoft.NET.Sdk">
<!-- ... -->
<Import Project="../Obfuscar.targets" />
<!-- ... -->
</Project>
@maxkatz6
maxkatz6 / TextBlockWithShadow.cs
Created November 10, 2021 03:57
TextBlockWithShadow
using Avalonia;
using Avalonia.Controls;
using Avalonia.Layout;
using Avalonia.Media;
using Avalonia.Media.Immutable;
using Avalonia.Media.TextFormatting;
namespace MyApp
{
public class TextBlockWithShadow : TextBlock