├── .gitignore ├── ControlCatalogStandalone.Android ├── ControlCatalogStandalone.Android.csproj ├── Icon.png ├── MainActivity.cs ├── Properties │ └── AndroidManifest.xml ├── Resources │ ├── drawable │ │ └── splash_screen.xml │ ├── values-night │ │ └── colors.xml │ └── values │ │ ├── colors.xml │ │ └── styles.xml └── SplashActivity.cs ├── ControlCatalogStandalone.Browser ├── AppBundle │ ├── Logo.svg │ ├── app.css │ ├── favicon.ico │ ├── index.html │ └── main.js ├── ControlCatalogStandalone.Browser.csproj ├── Program.cs ├── Properties │ └── launchSettings.json └── runtimeconfig.template.json ├── ControlCatalogStandalone.Desktop ├── ControlCatalogStandalone.Desktop.csproj ├── Program.cs └── app.manifest ├── ControlCatalogStandalone.iOS ├── AppDelegate.cs ├── ControlCatalogStandalone.iOS.csproj ├── Entitlements.plist ├── Info.plist ├── Main.cs └── Resources │ └── LaunchScreen.xib ├── ControlCatalogStandalone.sln ├── ControlCatalogStandalone ├── App.axaml ├── App.axaml.cs ├── Assets │ ├── Fonts │ │ ├── SourceSansPro-Bold.ttf │ │ ├── SourceSansPro-BoldItalic.ttf │ │ ├── SourceSansPro-Italic.ttf │ │ ├── SourceSansPro-Regular.ttf │ │ └── WenQuanYiMicroHei-01.ttf │ ├── avalonia-32.png │ ├── avalonia-logo.ico │ ├── delicate-arch-896885_640.jpg │ ├── github_icon.png │ ├── hirsch-899118_640.jpg │ ├── maple-leaf-888807_640.jpg │ └── test_icon.ico ├── ControlCatalogStandalone.csproj ├── Converter │ ├── DegToRadConverter.cs │ ├── HexConverter.cs │ └── MathSubtractConverter.cs ├── DecoratedWindow.axaml ├── DecoratedWindow.axaml.cs ├── HamburgerMenu │ ├── HamburgerMenu.axaml │ └── HamburgerMenu.axaml.cs ├── MainView.axaml ├── MainView.axaml.cs ├── MainWindow.axaml ├── MainWindow.axaml.cs ├── MiniCommand.cs ├── Models │ ├── CatalogTheme.cs │ ├── Countries.cs │ ├── Country.cs │ ├── GDPValueConverter.cs │ ├── Person.cs │ └── StateData.cs ├── Pages │ ├── AcrylicPage.axaml │ ├── AcrylicPage.axaml.cs │ ├── AdornerLayerPage.axaml │ ├── AdornerLayerPage.axaml.cs │ ├── AutoCompleteBoxPage.axaml │ ├── AutoCompleteBoxPage.axaml.cs │ ├── BorderPage.axaml │ ├── BorderPage.axaml.cs │ ├── ButtonSpinnerPage.axaml │ ├── ButtonSpinnerPage.axaml.cs │ ├── ButtonsPage.axaml │ ├── ButtonsPage.axaml.cs │ ├── CalendarDatePickerPage.axaml │ ├── CalendarDatePickerPage.axaml.cs │ ├── CalendarPage.axaml │ ├── CalendarPage.axaml.cs │ ├── CanvasPage.axaml │ ├── CanvasPage.axaml.cs │ ├── CarouselPage.axaml │ ├── CarouselPage.axaml.cs │ ├── CheckBoxPage.axaml │ ├── CheckBoxPage.axaml.cs │ ├── ClipboardPage.axaml │ ├── ClipboardPage.axaml.cs │ ├── ColorPickerPage.axaml │ ├── ColorPickerPage.axaml.cs │ ├── ComboBoxPage.axaml │ ├── ComboBoxPage.axaml.cs │ ├── CompositionPage.axaml │ ├── CompositionPage.axaml.cs │ ├── ContextFlyoutPage.axaml │ ├── ContextFlyoutPage.axaml.cs │ ├── ContextMenuPage.axaml │ ├── ContextMenuPage.axaml.cs │ ├── CursorPage.axaml │ ├── CursorPage.axaml.cs │ ├── CustomDrawing.axaml │ ├── CustomDrawing.axaml.cs │ ├── CustomDrawingExampleControl.cs │ ├── DataGridPage.axaml │ ├── DataGridPage.axaml.cs │ ├── DateTimePickerPage.axaml │ ├── DateTimePickerPage.axaml.cs │ ├── DialogsPage.axaml │ ├── DialogsPage.axaml.cs │ ├── DragAndDropPage.axaml │ ├── DragAndDropPage.axaml.cs │ ├── ExpanderPage.axaml │ ├── ExpanderPage.axaml.cs │ ├── FlyoutsPage.axaml │ ├── FlyoutsPage.axaml.cs │ ├── GesturePage.axaml │ ├── GesturePage.axaml.cs │ ├── ImagePage.axaml │ ├── ImagePage.axaml.cs │ ├── LabelsPage.axaml │ ├── LabelsPage.axaml.cs │ ├── LayoutTransformControlPage.axaml │ ├── LayoutTransformControlPage.axaml.cs │ ├── ListBoxPage.axaml │ ├── ListBoxPage.axaml.cs │ ├── MenuPage.axaml │ ├── MenuPage.axaml.cs │ ├── NativeEmbedPage.axaml │ ├── NativeEmbedPage.axaml.cs │ ├── NotificationsPage.axaml │ ├── NotificationsPage.axaml.cs │ ├── NumericUpDownPage.axaml │ ├── NumericUpDownPage.axaml.cs │ ├── OpenGlPage.axaml │ ├── OpenGlPage.axaml.cs │ ├── PlatformInfoPage.axaml │ ├── PlatformInfoPage.axaml.cs │ ├── PointerCanvas.cs │ ├── PointerContactsTab.cs │ ├── PointersPage.axaml │ ├── PointersPage.axaml.cs │ ├── ProgressBarPage.axaml │ ├── ProgressBarPage.axaml.cs │ ├── RadioButtonPage.axaml │ ├── RadioButtonPage.axaml.cs │ ├── RefreshContainerPage.axaml │ ├── RefreshContainerPage.axaml.cs │ ├── RelativePanelPage.axaml │ ├── RelativePanelPage.axaml.cs │ ├── ScreenPage.cs │ ├── ScrollViewerPage.axaml │ ├── ScrollViewerPage.axaml.cs │ ├── SliderPage.axaml │ ├── SliderPage.axaml.cs │ ├── SplitViewPage.axaml │ ├── SplitViewPage.axaml.cs │ ├── TabControlPage.axaml │ ├── TabControlPage.axaml.cs │ ├── TabStripPage.axaml │ ├── TabStripPage.axaml.cs │ ├── TextBlockPage.axaml │ ├── TextBlockPage.axaml.cs │ ├── TextBoxPage.axaml │ ├── TextBoxPage.axaml.cs │ ├── ThemePage.axaml │ ├── ThemePage.axaml.cs │ ├── ToggleSwitchPage.axaml │ ├── ToggleSwitchPage.axaml.cs │ ├── ToolTipPage.axaml │ ├── ToolTipPage.axaml.cs │ ├── TransitioningContentControlPage.axaml │ ├── TransitioningContentControlPage.axaml.cs │ ├── TreeViewPage.axaml │ ├── TreeViewPage.axaml.cs │ ├── ViewboxPage.axaml │ ├── ViewboxPage.axaml.cs │ ├── WindowCustomizationsPage.axaml │ ├── WindowCustomizationsPage.axaml.cs │ └── teapot.bin ├── PropertyChangedExtensions.cs ├── ViewModelBase.cs ├── ViewModels │ ├── ApplicationViewModel.cs │ ├── ComboBoxPageViewModel.cs │ ├── ContextPageViewModel.cs │ ├── CursorPageViewModel.cs │ ├── ExpanderPageViewModel.cs │ ├── ListBoxPageViewModel.cs │ ├── MainViewModel.cs │ ├── MainWindowViewModel.cs │ ├── MenuItemViewModel.cs │ ├── MenuPageViewModel.cs │ ├── NotificationViewModel.cs │ ├── PlatformInformationViewModel.cs │ ├── RefreshContainerViewModel.cs │ ├── SplitViewPageViewModel.cs │ ├── TabControlPageViewModel.cs │ ├── TransitioningContentControlPageViewModel.cs │ ├── TreeViewPageViewModel.cs │ └── ViewModelBase.cs └── Views │ ├── CustomNotificationView.axaml │ └── CustomNotificationView.axaml.cs ├── Directory.Build.props └── README.md /ControlCatalogStandalone.Android/ControlCatalogStandalone.Android.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | Exe 4 | net7.0-android 5 | 21 6 | enable 7 | com.CompanyName.ControlCatalogStandalone 8 | 1 9 | 1.0 10 | apk 11 | False 12 | 13 | 14 | 15 | 16 | Resources\drawable\Icon.png 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /ControlCatalogStandalone.Android/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvaloniaUI/ControlCatalogStandalone/e471b695be33b6b1a2656e950a2e89d9c3a4e273/ControlCatalogStandalone.Android/Icon.png -------------------------------------------------------------------------------- /ControlCatalogStandalone.Android/MainActivity.cs: -------------------------------------------------------------------------------- 1 | using Android.App; 2 | using Android.Content.PM; 3 | using Avalonia.Android; 4 | 5 | namespace ControlCatalogStandalone.Android; 6 | 7 | [Activity(Label = "ControlCatalogStandalone.Android", Theme = "@style/MyTheme.NoActionBar", Icon = "@drawable/icon", LaunchMode = LaunchMode.SingleTop, ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.ScreenSize | ConfigChanges.UiMode)] 8 | public class MainActivity : AvaloniaMainActivity 9 | { 10 | } 11 | -------------------------------------------------------------------------------- /ControlCatalogStandalone.Android/Properties/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /ControlCatalogStandalone.Android/Resources/drawable/splash_screen.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /ControlCatalogStandalone.Android/Resources/values-night/colors.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | #212121 4 | 5 | -------------------------------------------------------------------------------- /ControlCatalogStandalone.Android/Resources/values/colors.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | #FFFFFF 4 | 5 | -------------------------------------------------------------------------------- /ControlCatalogStandalone.Android/Resources/values/styles.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 6 | 7 | 11 | 12 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /ControlCatalogStandalone.Android/SplashActivity.cs: -------------------------------------------------------------------------------- 1 | using Android.App; 2 | using Android.Content; 3 | using Android.OS; 4 | using Application = Android.App.Application; 5 | using Avalonia; 6 | using Avalonia.Android; 7 | 8 | namespace ControlCatalogStandalone.Android; 9 | 10 | [Activity(Theme = "@style/MyTheme.Splash", MainLauncher = true, NoHistory = true)] 11 | public class SplashActivity : AvaloniaSplashActivity 12 | { 13 | protected override AppBuilder CustomizeAppBuilder(AppBuilder builder) 14 | { 15 | return base.CustomizeAppBuilder(builder) 16 | .WithInterFont(); 17 | } 18 | 19 | protected override void OnCreate(Bundle? savedInstanceState) 20 | { 21 | base.OnCreate(savedInstanceState); 22 | } 23 | 24 | protected override void OnResume() 25 | { 26 | base.OnResume(); 27 | 28 | StartActivity(new Intent(Application.Context, typeof(MainActivity))); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /ControlCatalogStandalone.Browser/AppBundle/Logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /ControlCatalogStandalone.Browser/AppBundle/app.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --sat: env(safe-area-inset-top); 3 | --sar: env(safe-area-inset-right); 4 | --sab: env(safe-area-inset-bottom); 5 | --sal: env(safe-area-inset-left); 6 | } 7 | 8 | /* HTML styles for the splash screen */ 9 | 10 | .highlight { 11 | color: white; 12 | font-size: 2.5rem; 13 | display: block; 14 | } 15 | 16 | .purple { 17 | color: #8b44ac; 18 | } 19 | 20 | .icon { 21 | opacity: 0.05; 22 | height: 35%; 23 | width: 35%; 24 | position: absolute; 25 | background-repeat: no-repeat; 26 | right: 0px; 27 | bottom: 0px; 28 | margin-right: 3%; 29 | margin-bottom: 5%; 30 | z-index: 5000; 31 | background-position: right bottom; 32 | pointer-events: none; 33 | } 34 | 35 | #avalonia-splash a { 36 | color: whitesmoke; 37 | text-decoration: none; 38 | } 39 | 40 | .center { 41 | display: flex; 42 | justify-content: center; 43 | align-items: center; 44 | height: 100vh; 45 | } 46 | 47 | #avalonia-splash { 48 | position: relative; 49 | height: 100%; 50 | width: 100%; 51 | color: whitesmoke; 52 | background: #1b2a4e; 53 | font-family: 'Nunito', sans-serif; 54 | background-position: center; 55 | background-size: cover; 56 | background-repeat: no-repeat; 57 | justify-content: center; 58 | align-items: center; 59 | } 60 | 61 | .splash-close { 62 | animation: fadeout 0.25s linear forwards; 63 | } 64 | 65 | @keyframes fadeout { 66 | 0% { 67 | opacity: 100%; 68 | } 69 | 70 | 100% { 71 | opacity: 0; 72 | visibility: collapse; 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /ControlCatalogStandalone.Browser/AppBundle/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvaloniaUI/ControlCatalogStandalone/e471b695be33b6b1a2656e950a2e89d9c3a4e273/ControlCatalogStandalone.Browser/AppBundle/favicon.ico -------------------------------------------------------------------------------- /ControlCatalogStandalone.Browser/AppBundle/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ControlCatalogStandalone.Browser 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 |
18 |
19 |

20 | Powered by 21 | Avalonia UI 22 |

23 |
24 | Avalonia Logo 25 |
26 |
27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /ControlCatalogStandalone.Browser/AppBundle/main.js: -------------------------------------------------------------------------------- 1 | import { dotnet } from './dotnet.js' 2 | 3 | const is_browser = typeof window != "undefined"; 4 | if (!is_browser) throw new Error(`Expected to be running in a browser`); 5 | 6 | const dotnetRuntime = await dotnet 7 | .withDiagnosticTracing(false) 8 | .withApplicationArgumentsFromQuery() 9 | .create(); 10 | 11 | const config = dotnetRuntime.getConfig(); 12 | 13 | await dotnetRuntime.runMainAndExit(config.mainAssemblyName, [window.location.search]); -------------------------------------------------------------------------------- /ControlCatalogStandalone.Browser/ControlCatalogStandalone.Browser.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net7.0 4 | browser-wasm 5 | AppBundle\main.js 6 | Exe 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /ControlCatalogStandalone.Browser/Program.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Versioning; 2 | using System.Threading.Tasks; 3 | using Avalonia; 4 | using Avalonia.Browser; 5 | using ControlCatalogStandalone; 6 | 7 | [assembly: SupportedOSPlatform("browser")] 8 | 9 | internal partial class Program 10 | { 11 | private static async Task Main(string[] args) => await BuildAvaloniaApp() 12 | .WithInterFont() 13 | .StartBrowserAppAsync("out"); 14 | 15 | public static AppBuilder BuildAvaloniaApp() 16 | => AppBuilder.Configure(); 17 | } -------------------------------------------------------------------------------- /ControlCatalogStandalone.Browser/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "ControlCatalogStandalone.Browser": { 4 | "commandName": "Project", 5 | "launchBrowser": true, 6 | "environmentVariables": { 7 | "ASPNETCORE_ENVIRONMENT": "Development" 8 | }, 9 | "applicationUrl": "https://localhost:5001;http://localhost:5000", 10 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/debug?browser={browserInspectUri}" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /ControlCatalogStandalone.Browser/runtimeconfig.template.json: -------------------------------------------------------------------------------- 1 | { 2 | "wasmHostProperties": { 3 | "perHostConfig": [ 4 | { 5 | "name": "browser", 6 | "html-path": "index.html", 7 | "Host": "browser" 8 | } 9 | ] 10 | } 11 | } -------------------------------------------------------------------------------- /ControlCatalogStandalone.Desktop/ControlCatalogStandalone.Desktop.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | WinExe 4 | 6 | net7.0 7 | enable 8 | true 9 | 10 | 11 | 12 | app.manifest 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /ControlCatalogStandalone.Desktop/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Avalonia; 3 | 4 | namespace ControlCatalogStandalone.Desktop; 5 | 6 | class Program 7 | { 8 | // Initialization code. Don't use any Avalonia, third-party APIs or any 9 | // SynchronizationContext-reliant code before AppMain is called: things aren't initialized 10 | // yet and stuff might break. 11 | [STAThread] 12 | public static void Main(string[] args) => BuildAvaloniaApp() 13 | .StartWithClassicDesktopLifetime(args); 14 | 15 | // Avalonia configuration, don't remove; also used by visual designer. 16 | public static AppBuilder BuildAvaloniaApp() 17 | => AppBuilder.Configure() 18 | .UsePlatformDetect() 19 | .WithInterFont() 20 | .LogToTrace(); 21 | } 22 | -------------------------------------------------------------------------------- /ControlCatalogStandalone.Desktop/app.manifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 6 | 7 | 8 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /ControlCatalogStandalone.iOS/AppDelegate.cs: -------------------------------------------------------------------------------- 1 | using Foundation; 2 | using UIKit; 3 | using Avalonia; 4 | using Avalonia.Controls; 5 | using Avalonia.iOS; 6 | using Avalonia.Media; 7 | using Avalonia.ReactiveUI; 8 | 9 | namespace ControlCatalogStandalone.iOS; 10 | 11 | // The UIApplicationDelegate for the application. This class is responsible for launching the 12 | // User Interface of the application, as well as listening (and optionally responding) to 13 | // application events from iOS. 14 | [Register("AppDelegate")] 15 | public partial class AppDelegate : AvaloniaAppDelegate 16 | { 17 | protected override AppBuilder CustomizeAppBuilder(AppBuilder builder) 18 | { 19 | return base.CustomizeAppBuilder(builder) 20 | .WithInterFont() 21 | .UseReactiveUI(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ControlCatalogStandalone.iOS/ControlCatalogStandalone.iOS.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | Exe 4 | net7.0-ios 5 | 10.0 6 | manual 7 | enable 8 | iossimulator-x64 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /ControlCatalogStandalone.iOS/Entitlements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /ControlCatalogStandalone.iOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDisplayName 6 | ControlCatalogStandalone 7 | CFBundleIdentifier 8 | companyName.ControlCatalogStandalone 9 | CFBundleShortVersionString 10 | 1.0 11 | CFBundleVersion 12 | 1.0 13 | LSRequiresIPhoneOS 14 | 15 | MinimumOSVersion 16 | 10.0 17 | UIDeviceFamily 18 | 19 | 1 20 | 2 21 | 22 | UILaunchStoryboardName 23 | LaunchScreen 24 | UIRequiredDeviceCapabilities 25 | 26 | armv7 27 | 28 | UISupportedInterfaceOrientations 29 | 30 | UIInterfaceOrientationPortrait 31 | UIInterfaceOrientationPortraitUpsideDown 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIStatusBarHidden 43 | 44 | UIViewControllerBasedStatusBarAppearance 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /ControlCatalogStandalone.iOS/Main.cs: -------------------------------------------------------------------------------- 1 | using UIKit; 2 | 3 | namespace ControlCatalogStandalone.iOS; 4 | 5 | public class Application 6 | { 7 | // This is the main entry point of the application. 8 | static void Main(string[] args) 9 | { 10 | // if you want to use a different Application Delegate class from "AppDelegate" 11 | // you can specify it here. 12 | UIApplication.Main(args, null, typeof(AppDelegate)); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /ControlCatalogStandalone.iOS/Resources/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 21 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /ControlCatalogStandalone/Assets/Fonts/SourceSansPro-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvaloniaUI/ControlCatalogStandalone/e471b695be33b6b1a2656e950a2e89d9c3a4e273/ControlCatalogStandalone/Assets/Fonts/SourceSansPro-Bold.ttf -------------------------------------------------------------------------------- /ControlCatalogStandalone/Assets/Fonts/SourceSansPro-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvaloniaUI/ControlCatalogStandalone/e471b695be33b6b1a2656e950a2e89d9c3a4e273/ControlCatalogStandalone/Assets/Fonts/SourceSansPro-BoldItalic.ttf -------------------------------------------------------------------------------- /ControlCatalogStandalone/Assets/Fonts/SourceSansPro-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvaloniaUI/ControlCatalogStandalone/e471b695be33b6b1a2656e950a2e89d9c3a4e273/ControlCatalogStandalone/Assets/Fonts/SourceSansPro-Italic.ttf -------------------------------------------------------------------------------- /ControlCatalogStandalone/Assets/Fonts/SourceSansPro-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvaloniaUI/ControlCatalogStandalone/e471b695be33b6b1a2656e950a2e89d9c3a4e273/ControlCatalogStandalone/Assets/Fonts/SourceSansPro-Regular.ttf -------------------------------------------------------------------------------- /ControlCatalogStandalone/Assets/Fonts/WenQuanYiMicroHei-01.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvaloniaUI/ControlCatalogStandalone/e471b695be33b6b1a2656e950a2e89d9c3a4e273/ControlCatalogStandalone/Assets/Fonts/WenQuanYiMicroHei-01.ttf -------------------------------------------------------------------------------- /ControlCatalogStandalone/Assets/avalonia-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvaloniaUI/ControlCatalogStandalone/e471b695be33b6b1a2656e950a2e89d9c3a4e273/ControlCatalogStandalone/Assets/avalonia-32.png -------------------------------------------------------------------------------- /ControlCatalogStandalone/Assets/avalonia-logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvaloniaUI/ControlCatalogStandalone/e471b695be33b6b1a2656e950a2e89d9c3a4e273/ControlCatalogStandalone/Assets/avalonia-logo.ico -------------------------------------------------------------------------------- /ControlCatalogStandalone/Assets/delicate-arch-896885_640.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvaloniaUI/ControlCatalogStandalone/e471b695be33b6b1a2656e950a2e89d9c3a4e273/ControlCatalogStandalone/Assets/delicate-arch-896885_640.jpg -------------------------------------------------------------------------------- /ControlCatalogStandalone/Assets/github_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvaloniaUI/ControlCatalogStandalone/e471b695be33b6b1a2656e950a2e89d9c3a4e273/ControlCatalogStandalone/Assets/github_icon.png -------------------------------------------------------------------------------- /ControlCatalogStandalone/Assets/hirsch-899118_640.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvaloniaUI/ControlCatalogStandalone/e471b695be33b6b1a2656e950a2e89d9c3a4e273/ControlCatalogStandalone/Assets/hirsch-899118_640.jpg -------------------------------------------------------------------------------- /ControlCatalogStandalone/Assets/maple-leaf-888807_640.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvaloniaUI/ControlCatalogStandalone/e471b695be33b6b1a2656e950a2e89d9c3a4e273/ControlCatalogStandalone/Assets/maple-leaf-888807_640.jpg -------------------------------------------------------------------------------- /ControlCatalogStandalone/Assets/test_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvaloniaUI/ControlCatalogStandalone/e471b695be33b6b1a2656e950a2e89d9c3a4e273/ControlCatalogStandalone/Assets/test_icon.ico -------------------------------------------------------------------------------- /ControlCatalogStandalone/ControlCatalogStandalone.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net7.0 4 | enable 5 | latest 6 | true 7 | true 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /ControlCatalogStandalone/Converter/DegToRadConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Text; 5 | using Avalonia.Data.Converters; 6 | 7 | namespace ControlCatalogStandalone.Converter 8 | { 9 | public class DegToRadConverter : IValueConverter 10 | { 11 | public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture) 12 | { 13 | if (value is double rad) 14 | { 15 | return rad * 180.0d / Math.PI; 16 | } 17 | return 0.0d; 18 | } 19 | 20 | public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture) 21 | { 22 | if (value is double deg) 23 | { 24 | return deg / 180.0d * Math.PI; 25 | } 26 | return 0.0d; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /ControlCatalogStandalone/Converter/HexConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using Avalonia; 4 | using Avalonia.Data.Converters; 5 | 6 | namespace ControlCatalogStandalone.Converter; 7 | 8 | public class HexConverter : IValueConverter 9 | { 10 | public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture) 11 | { 12 | var str = value?.ToString(); 13 | if (str == null) 14 | return AvaloniaProperty.UnsetValue; 15 | if (int.TryParse(str, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out int x)) 16 | return (decimal)x; 17 | return AvaloniaProperty.UnsetValue; 18 | 19 | } 20 | 21 | public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture) 22 | { 23 | try 24 | { 25 | if (value is decimal d) 26 | return ((int)d).ToString("X8"); 27 | return AvaloniaProperty.UnsetValue; 28 | } 29 | catch 30 | { 31 | return AvaloniaProperty.UnsetValue; 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /ControlCatalogStandalone/Converter/MathSubtractConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using Avalonia.Data.Converters; 4 | 5 | namespace ControlCatalogStandalone.Converter; 6 | 7 | public class MathSubtractConverter : IValueConverter 8 | { 9 | public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture) 10 | { 11 | if (value is double dv && parameter is double dp) 12 | { 13 | return dv - dp; 14 | } 15 | return double.NaN; 16 | } 17 | 18 | public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture) 19 | { 20 | throw new NotSupportedException(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /ControlCatalogStandalone/DecoratedWindow.axaml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | Title 31 | 32 | 33 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | Hello world! 45 | 46 | 47 | 48 | None 49 | BorderOnly 50 | Full 51 | 52 | 53 | CanResize 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /ControlCatalogStandalone/DecoratedWindow.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | using System; 5 | using Avalonia.Input; 6 | 7 | namespace ControlCatalogStandalone 8 | { 9 | public partial class DecoratedWindow : Window 10 | { 11 | public DecoratedWindow() 12 | { 13 | InitializeComponent(); 14 | } 15 | 16 | void SetupSide(string name, StandardCursorType cursor, WindowEdge edge) 17 | { 18 | var ctl = this.Get(name); 19 | ctl.Cursor = new Cursor(cursor); 20 | ctl.PointerPressed += (i, e) => 21 | { 22 | BeginResizeDrag(edge, e); 23 | }; 24 | } 25 | 26 | private void InitializeComponent() 27 | { 28 | AvaloniaXamlLoader.Load(this); 29 | this.Get("TitleBar").PointerPressed += (i, e) => 30 | { 31 | BeginMoveDrag(e); 32 | }; 33 | SetupSide("Left", StandardCursorType.LeftSide, WindowEdge.West); 34 | SetupSide("Right", StandardCursorType.RightSide, WindowEdge.East); 35 | SetupSide("Top", StandardCursorType.TopSide, WindowEdge.North); 36 | SetupSide("Bottom", StandardCursorType.BottomSide, WindowEdge.South); 37 | SetupSide("TopLeft", StandardCursorType.TopLeftCorner, WindowEdge.NorthWest); 38 | SetupSide("TopRight", StandardCursorType.TopRightCorner, WindowEdge.NorthEast); 39 | SetupSide("BottomLeft", StandardCursorType.BottomLeftCorner, WindowEdge.SouthWest); 40 | SetupSide("BottomRight", StandardCursorType.BottomRightCorner, WindowEdge.SouthEast); 41 | this.Get