The following are examples of various features.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<UserControl x:Class="SampleView" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
xmlns:i="http://schemas.microsoft.com/xaml/behaviors" | |
xmlns:utilities="clr-namespace:Utilities" | |
xmlns:commands="clr-namespace:Commands" | |
mc:Ignorable="d"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/////////////////////////////////////////////////////////////////////////////// | |
// TOOLS / ADDINS | |
/////////////////////////////////////////////////////////////////////////////// | |
#tool "nuget:?package=GitVersion.CommandLine&version=5.6.3" | |
#addin "nuget:?package=Cake.Figlet&version=1.3.1" | |
#addin "nuget:?package=Cake.Incubator&version=5.1.0" | |
#addin "nuget:?package=Cake.FileHelpers&version=3.3.0" | |
/////////////////////////////////////////////////////////////////////////////// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Windows; | |
using System.Windows.Media; | |
using ControlzEx.Theming; | |
namespace WpfApp3 | |
{ | |
/// <summary> | |
/// Interaction logic for App.xaml | |
/// </summary> | |
public partial class App : Application |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
var settings = new MetroDialogSettings { OwnerCanCloseWithDialog = true }; | |
var dataContext = new AdvancedInstallViewModel(_chocolateyService.GetAvailableVersionsForPackageIdAsync(Id), Version); | |
customDialog.Content = new AdvancedChocolateyDialog { DataContext = dataContext }; | |
await _dialogCoordinator.ShowMetroDialogAsync(this, customDialog, settings); | |
var result = await dataContext.WaitForClosingAsync(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public bool IncludeRelease | |
{ | |
get { return _includeRelease; } | |
set | |
{ | |
if (SetPropertyValue(ref _includeRelease, value)) | |
{ | |
_cts.Cancel(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Interaction logic for MyCustomDialog.xaml | |
/// </summary> | |
public partial class MyCustomDialog : CustomDialog | |
{ | |
private TaskCompletionSource<bool> tcs; | |
public MyCustomDialog() | |
: this(null, null) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// memoryStream is the stream of the svg url | |
// imageStream is the converted png which will be converted with Splat.BitmapLoader to an IBitmap | |
var svg = new SkiaSharp.Extended.Svg.SKSvg(); | |
svg.Load(memoryStream); | |
var imageInfo = new SKImageInfo((int)desiredSize.Width, (int)desiredSize.Height); | |
using (var surface = SKSurface.Create(imageInfo)) | |
using (var canvas = surface.Canvas) | |
{ |
NewerOlder