committed by
GitHub
330 changed files with 7561 additions and 1050 deletions
@ -0,0 +1,7 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -0,0 +1,7 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -1,5 +1,8 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
<PreviouslyBuiltSuccessfully>True</PreviouslyBuiltSuccessfully> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -0,0 +1,7 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -0,0 +1,7 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -1,5 +1,8 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
<PreviouslyBuiltSuccessfully>True</PreviouslyBuiltSuccessfully> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -1,5 +1,8 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
<PreviouslyBuiltSuccessfully>True</PreviouslyBuiltSuccessfully> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -0,0 +1,5 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<IgnoreThisComponentCompletely>True</IgnoreThisComponentCompletely> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -0,0 +1,7 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -0,0 +1,7 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -0,0 +1,7 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -1,5 +1,8 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
<PreviouslyBuiltSuccessfully>True</PreviouslyBuiltSuccessfully> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -0,0 +1,7 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -0,0 +1,7 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -1,5 +1,8 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
<PreviouslyBuiltSuccessfully>True</PreviouslyBuiltSuccessfully> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -0,0 +1,7 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -0,0 +1,7 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -1,5 +1,8 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
<PreviouslyBuiltSuccessfully>True</PreviouslyBuiltSuccessfully> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -1,5 +1,8 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
<PreviouslyBuiltSuccessfully>True</PreviouslyBuiltSuccessfully> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -1,5 +1,8 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
<PreviouslyBuiltSuccessfully>True</PreviouslyBuiltSuccessfully> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -1,3 +1,7 @@ |
|||
<ProjectConfiguration> |
|||
<Settings /> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -0,0 +1,7 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -0,0 +1,7 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -1,5 +1,8 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
<PreviouslyBuiltSuccessfully>True</PreviouslyBuiltSuccessfully> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -1,5 +1,8 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
<PreviouslyBuiltSuccessfully>True</PreviouslyBuiltSuccessfully> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -1,5 +1,8 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
<PreviouslyBuiltSuccessfully>True</PreviouslyBuiltSuccessfully> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -1,5 +1,8 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
<PreviouslyBuiltSuccessfully>True</PreviouslyBuiltSuccessfully> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -1,5 +1,8 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
<PreviouslyBuiltSuccessfully>True</PreviouslyBuiltSuccessfully> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -1,5 +1,8 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
<PreviouslyBuiltSuccessfully>True</PreviouslyBuiltSuccessfully> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -1,5 +1,8 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
<PreviouslyBuiltSuccessfully>True</PreviouslyBuiltSuccessfully> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -1,5 +1,8 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
<PreviouslyBuiltSuccessfully>True</PreviouslyBuiltSuccessfully> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -0,0 +1,7 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -0,0 +1,7 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -0,0 +1,7 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -0,0 +1,7 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -1,5 +1,8 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
<PreviouslyBuiltSuccessfully>True</PreviouslyBuiltSuccessfully> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -1,5 +1,8 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
<PreviouslyBuiltSuccessfully>True</PreviouslyBuiltSuccessfully> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -0,0 +1,7 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -0,0 +1,7 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -1,5 +1,8 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
<PreviouslyBuiltSuccessfully>True</PreviouslyBuiltSuccessfully> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -0,0 +1,7 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -1,3 +1,7 @@ |
|||
<ProjectConfiguration> |
|||
<Settings /> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -0,0 +1,7 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -0,0 +1,7 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -1,5 +1,8 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
<PreviouslyBuiltSuccessfully>True</PreviouslyBuiltSuccessfully> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -1,5 +1,8 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
<PreviouslyBuiltSuccessfully>True</PreviouslyBuiltSuccessfully> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -1,5 +1,8 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
<PreviouslyBuiltSuccessfully>True</PreviouslyBuiltSuccessfully> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -0,0 +1,7 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -0,0 +1,7 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -1,5 +1,8 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
<PreviouslyBuiltSuccessfully>True</PreviouslyBuiltSuccessfully> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -1,5 +1,8 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
<PreviouslyBuiltSuccessfully>True</PreviouslyBuiltSuccessfully> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -1,5 +1,8 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
<PreviouslyBuiltSuccessfully>True</PreviouslyBuiltSuccessfully> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -0,0 +1,7 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -0,0 +1,8 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>DerivedFilesIncludedInWorkspace</Value> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -0,0 +1,8 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>DerivedFilesIncludedInWorkspace</Value> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -1,5 +1,8 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
<PreviouslyBuiltSuccessfully>True</PreviouslyBuiltSuccessfully> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -0,0 +1,7 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<HiddenComponentWarnings> |
|||
<Value>MissingOrIgnoredProjectReference</Value> |
|||
</HiddenComponentWarnings> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -1,6 +1,9 @@ |
|||
<Application xmlns="https://github.com/avaloniaui"> |
|||
<Application.Styles> |
|||
<StyleInclude Source="resm:Avalonia.Themes.Default.DefaultTheme.xaml?assembly=Avalonia.Themes.Default"/> |
|||
<StyleInclude Source="resm:Avalonia.Themes.Default.Accents.BaseLight.xaml?assembly=Avalonia.Themes.Default"/> |
|||
</Application.Styles> |
|||
<Application |
|||
xmlns="https://github.com/avaloniaui" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
x:Class="BindingDemo.App"> |
|||
<Application.Styles> |
|||
<StyleInclude Source="avares://Avalonia.Themes.Default/DefaultTheme.xaml"/> |
|||
<StyleInclude Source="avares://Avalonia.Themes.Default/Accents/BaseLight.xaml"/> |
|||
</Application.Styles> |
|||
</Application> |
|||
@ -1,8 +1,18 @@ |
|||
<Window xmlns="https://github.com/avaloniaui" MinWidth="500" MinHeight="300" |
|||
xmlns:pages="clr-namespace:ControlCatalog.Pages" |
|||
Title="Avalonia Control Gallery" |
|||
Icon="/Assets/test_icon.ico" |
|||
xmlns:local="clr-namespace:ControlCatalog" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:vm="clr-namespace:ControlCatalog.ViewModels" |
|||
xmlns:v="clr-namespace:ControlCatalog.Views" |
|||
x:Class="ControlCatalog.MainWindow"> |
|||
<local:MainView/> |
|||
<Window.DataTemplates> |
|||
<DataTemplate DataType="vm:NotificationViewModel"> |
|||
<v:CustomNotificationView /> |
|||
</DataTemplate> |
|||
</Window.DataTemplates> |
|||
<Panel> |
|||
<local:MainView/> |
|||
</Panel> |
|||
</Window> |
|||
|
|||
@ -0,0 +1,10 @@ |
|||
<UserControl xmlns="https://github.com/avaloniaui" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
x:Class="ControlCatalog.Pages.NotificationsPage"> |
|||
<StackPanel Orientation="Vertical" Spacing="4" HorizontalAlignment="Left"> |
|||
<TextBlock Classes="h1">Notifications</TextBlock> |
|||
<Button Content="Show Standard Managed Notification" Command="{Binding ShowManagedNotificationCommand}" /> |
|||
<Button Content="Show Custom Managed Notification" Command="{Binding ShowCustomManagedNotificationCommand}" /> |
|||
<Button Content="Show Native Notification" Command="{Binding ShowNativeNotificationCommand}" /> |
|||
</StackPanel> |
|||
</UserControl> |
|||
@ -0,0 +1,18 @@ |
|||
using Avalonia.Controls; |
|||
using Avalonia.Markup.Xaml; |
|||
|
|||
namespace ControlCatalog.Pages |
|||
{ |
|||
public class NotificationsPage : UserControl |
|||
{ |
|||
public NotificationsPage() |
|||
{ |
|||
this.InitializeComponent(); |
|||
} |
|||
|
|||
private void InitializeComponent() |
|||
{ |
|||
AvaloniaXamlLoader.Load(this); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,44 @@ |
|||
using System.Reactive; |
|||
using Avalonia.Controls.Notifications; |
|||
using Avalonia.Diagnostics.ViewModels; |
|||
using ReactiveUI; |
|||
|
|||
namespace ControlCatalog.ViewModels |
|||
{ |
|||
class MainWindowViewModel : ViewModelBase |
|||
{ |
|||
private IManagedNotificationManager _notificationManager; |
|||
|
|||
public MainWindowViewModel(IManagedNotificationManager notificationManager) |
|||
{ |
|||
_notificationManager = notificationManager; |
|||
|
|||
ShowCustomManagedNotificationCommand = ReactiveCommand.Create(() => |
|||
{ |
|||
NotificationManager.Show(new NotificationViewModel(NotificationManager) { Title = "Hey There!", Message = "Did you know that Avalonia now supports Custom In-Window Notifications?" }); |
|||
}); |
|||
|
|||
ShowManagedNotificationCommand = ReactiveCommand.Create(() => |
|||
{ |
|||
NotificationManager.Show(new Avalonia.Controls.Notifications.Notification("Welcome", "Avalonia now supports Notifications.", NotificationType.Information)); |
|||
}); |
|||
|
|||
ShowNativeNotificationCommand = ReactiveCommand.Create(() => |
|||
{ |
|||
NotificationManager.Show(new Avalonia.Controls.Notifications.Notification("Error", "Native Notifications are not quite ready. Coming soon.", NotificationType.Error)); |
|||
}); |
|||
} |
|||
|
|||
public IManagedNotificationManager NotificationManager |
|||
{ |
|||
get { return _notificationManager; } |
|||
set { this.RaiseAndSetIfChanged(ref _notificationManager, value); } |
|||
} |
|||
|
|||
public ReactiveCommand<Unit, Unit> ShowCustomManagedNotificationCommand { get; } |
|||
|
|||
public ReactiveCommand<Unit, Unit> ShowManagedNotificationCommand { get; } |
|||
|
|||
public ReactiveCommand<Unit, Unit> ShowNativeNotificationCommand { get; } |
|||
} |
|||
} |
|||
@ -0,0 +1,30 @@ |
|||
using System.Reactive; |
|||
using Avalonia.Controls.Notifications; |
|||
using ReactiveUI; |
|||
|
|||
namespace ControlCatalog.ViewModels |
|||
{ |
|||
public class NotificationViewModel |
|||
{ |
|||
public NotificationViewModel(INotificationManager manager) |
|||
{ |
|||
YesCommand = ReactiveCommand.Create(() => |
|||
{ |
|||
manager.Show(new Avalonia.Controls.Notifications.Notification("Avalonia Notifications", "Start adding notifications to your app today.")); |
|||
}); |
|||
|
|||
NoCommand = ReactiveCommand.Create(() => |
|||
{ |
|||
manager.Show(new Avalonia.Controls.Notifications.Notification("Avalonia Notifications", "Start adding notifications to your app today. To find out more visit...")); |
|||
}); |
|||
} |
|||
|
|||
public string Title { get; set; } |
|||
public string Message { get; set; } |
|||
|
|||
public ReactiveCommand<Unit, Unit> YesCommand { get; } |
|||
|
|||
public ReactiveCommand<Unit, Unit> NoCommand { get; } |
|||
|
|||
} |
|||
} |
|||
@ -0,0 +1,19 @@ |
|||
<UserControl xmlns="https://github.com/avaloniaui" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
x:Class="ControlCatalog.Views.CustomNotificationView"> |
|||
<Border Padding="12" MinHeight="20" Background="DodgerBlue"> |
|||
<Grid ColumnDefinitions="Auto,*"> |
|||
<Panel Margin="0,0,12,0" Width="25" Height="25" VerticalAlignment="Top"> |
|||
<TextBlock Text="" FontFamily="Segoe UI Symbol" FontSize="20" TextAlignment="Center" VerticalAlignment="Center"/> |
|||
</Panel> |
|||
<DockPanel Grid.Column="1"> |
|||
<TextBlock DockPanel.Dock="Top" Text="{Binding Title}" FontWeight="Medium" /> |
|||
<StackPanel Spacing="20" DockPanel.Dock="Bottom" Margin="0,8,0,0" Orientation="Horizontal"> |
|||
<Button Content="No" DockPanel.Dock="Right" NotificationCard.CloseOnClick="True" Command="{Binding NoCommand}" Margin="0,0,8,0" /> |
|||
<Button Content="Yes" DockPanel.Dock="Right" NotificationCard.CloseOnClick="True" Command="{Binding YesCommand}" /> |
|||
</StackPanel> |
|||
<TextBlock Text="{Binding Message}" TextWrapping="Wrap" Opacity=".8" Margin="0,8,0,0"/> |
|||
</DockPanel> |
|||
</Grid> |
|||
</Border> |
|||
</UserControl> |
|||
@ -0,0 +1,18 @@ |
|||
using Avalonia.Controls; |
|||
using Avalonia.Markup.Xaml; |
|||
|
|||
namespace ControlCatalog.Views |
|||
{ |
|||
public class CustomNotificationView : UserControl |
|||
{ |
|||
public CustomNotificationView() |
|||
{ |
|||
this.InitializeComponent(); |
|||
} |
|||
|
|||
private void InitializeComponent() |
|||
{ |
|||
AvaloniaXamlLoader.Load(this); |
|||
} |
|||
} |
|||
} |
|||
@ -1,14 +1,12 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
|
|||
<PropertyGroup> |
|||
<OutputType>Exe</OutputType> |
|||
<TargetFramework>netcoreapp2.0</TargetFramework> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\ControlCatalog\ControlCatalog.csproj" /> |
|||
</ItemGroup> |
|||
<Import Project="..\..\build\SampleApp.props" /> |
|||
<Import Project="..\..\build\ReferenceCoreLibraries.props" /> |
|||
|
|||
<Import Project="..\..\build\BuildTargets.targets" /> |
|||
</Project> |
|||
|
|||
@ -1,7 +1,10 @@ |
|||
<Application xmlns="https://github.com/avaloniaui"> |
|||
<Application.Styles> |
|||
<StyleInclude Source="resm:Avalonia.Themes.Default.DefaultTheme.xaml?assembly=Avalonia.Themes.Default"/> |
|||
<StyleInclude Source="resm:Avalonia.Themes.Default.Accents.BaseLight.xaml?assembly=Avalonia.Themes.Default"/> |
|||
<StyleInclude Source="resm:RenderDemo.SideBar.xaml"/> |
|||
</Application.Styles> |
|||
<Application |
|||
xmlns="https://github.com/avaloniaui" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
x:Class="RenderDemo.App"> |
|||
<Application.Styles> |
|||
<StyleInclude Source="avares://Avalonia.Themes.Default/DefaultTheme.xaml"/> |
|||
<StyleInclude Source="avares://Avalonia.Themes.Default/Accents/BaseLight.xaml"/> |
|||
<StyleInclude Source="avares://RenderDemo/SideBar.xaml"/> |
|||
</Application.Styles> |
|||
</Application> |
|||
@ -0,0 +1,119 @@ |
|||
using System; |
|||
using System.Diagnostics; |
|||
using Avalonia; |
|||
using Avalonia.Controls; |
|||
using Avalonia.Media; |
|||
using Avalonia.Platform; |
|||
using Avalonia.Rendering.SceneGraph; |
|||
using Avalonia.Skia; |
|||
using Avalonia.Threading; |
|||
using SkiaSharp; |
|||
|
|||
namespace RenderDemo.Pages |
|||
{ |
|||
public class CustomSkiaPage : Control |
|||
{ |
|||
public CustomSkiaPage() |
|||
{ |
|||
ClipToBounds = true; |
|||
} |
|||
|
|||
class CustomDrawOp : ICustomDrawOperation |
|||
{ |
|||
private readonly FormattedText _noSkia; |
|||
|
|||
public CustomDrawOp(Rect bounds, FormattedText noSkia) |
|||
{ |
|||
_noSkia = noSkia; |
|||
Bounds = bounds; |
|||
} |
|||
|
|||
public void Dispose() |
|||
{ |
|||
// No-op
|
|||
} |
|||
|
|||
public Rect Bounds { get; } |
|||
public bool HitTest(Point p) => false; |
|||
public bool Equals(ICustomDrawOperation other) => false; |
|||
static Stopwatch St = Stopwatch.StartNew(); |
|||
public void Render(IDrawingContextImpl context) |
|||
{ |
|||
var canvas = (context as ISkiaDrawingContextImpl)?.SkCanvas; |
|||
if (canvas == null) |
|||
context.DrawText(Brushes.Black, new Point(), _noSkia.PlatformImpl); |
|||
else |
|||
{ |
|||
canvas.Save(); |
|||
// create the first shader
|
|||
var colors = new SKColor[] { |
|||
new SKColor(0, 255, 255), |
|||
new SKColor(255, 0, 255), |
|||
new SKColor(255, 255, 0), |
|||
new SKColor(0, 255, 255) |
|||
}; |
|||
|
|||
var sx = Animate(100, 2, 10); |
|||
var sy = Animate(1000, 5, 15); |
|||
var lightPosition = new SKPoint( |
|||
(float)(Bounds.Width / 2 + Math.Cos(St.Elapsed.TotalSeconds) * Bounds.Width / 4), |
|||
(float)(Bounds.Height / 2 + Math.Sin(St.Elapsed.TotalSeconds) * Bounds.Height / 4)); |
|||
using (var sweep = |
|||
SKShader.CreateSweepGradient(new SKPoint((int)Bounds.Width / 2, (int)Bounds.Height / 2), colors, |
|||
null)) |
|||
using(var turbulence = SKShader.CreatePerlinNoiseFractalNoise(0.05f, 0.05f, 4, 0)) |
|||
using(var shader = SKShader.CreateCompose(sweep, turbulence, SKBlendMode.SrcATop)) |
|||
using(var blur = SKImageFilter.CreateBlur(Animate(100, 2, 10), Animate(100, 5, 15))) |
|||
using (var paint = new SKPaint |
|||
{ |
|||
Shader = shader, |
|||
ImageFilter = blur |
|||
}) |
|||
canvas.DrawPaint(paint); |
|||
|
|||
using (var pseudoLight = SKShader.CreateRadialGradient( |
|||
lightPosition, |
|||
(float) (Bounds.Width/3), |
|||
new [] { |
|||
new SKColor(255, 200, 200, 100), |
|||
SKColors.Transparent, |
|||
new SKColor(40,40,40, 220), |
|||
new SKColor(20,20,20, (byte)Animate(100, 200,220)) }, |
|||
new float[] { 0.3f, 0.3f, 0.8f, 1 }, |
|||
SKShaderTileMode.Clamp)) |
|||
using (var paint = new SKPaint |
|||
{ |
|||
Shader = pseudoLight |
|||
}) |
|||
canvas.DrawPaint(paint); |
|||
canvas.Restore(); |
|||
} |
|||
} |
|||
static int Animate(int d, int from, int to) |
|||
{ |
|||
var ms = (int)(St.ElapsedMilliseconds / d); |
|||
var diff = to - from; |
|||
var range = diff * 2; |
|||
var v = ms % range; |
|||
if (v > diff) |
|||
v = range - v; |
|||
var rv = v + from; |
|||
if (rv < from || rv > to) |
|||
throw new Exception("WTF"); |
|||
return rv; |
|||
} |
|||
} |
|||
|
|||
|
|||
|
|||
public override void Render(DrawingContext context) |
|||
{ |
|||
var noSkia = new FormattedText() |
|||
{ |
|||
Text = "Current rendering API is not Skia" |
|||
}; |
|||
context.Custom(new CustomDrawOp(new Rect(0, 0, Bounds.Width, Bounds.Height), noSkia)); |
|||
Dispatcher.UIThread.InvokeAsync(InvalidateVisual, DispatcherPriority.Background); |
|||
} |
|||
} |
|||
} |
|||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue