diff --git a/.gitmodules b/.gitmodules index 22c56307b0..22a241f120 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "nukebuild/Numerge"] path = nukebuild/Numerge url = https://github.com/kekekeks/Numerge.git +[submodule "src/Markup/Avalonia.Markup.Xaml/XamlIl/xamlil.github"] + path = src/Markup/Avalonia.Markup.Xaml/XamlIl/xamlil.github + url = https://github.com/kekekeks/XamlIl.git diff --git a/build/EmbedXaml.props b/build/EmbedXaml.props index 219ffb2e42..dba14521ab 100644 --- a/build/EmbedXaml.props +++ b/build/EmbedXaml.props @@ -4,8 +4,8 @@ %(Filename) - + Designer - + - \ No newline at end of file + diff --git a/build/SampleApp.props b/build/SampleApp.props index 5580a4c2c9..285f880129 100644 --- a/build/SampleApp.props +++ b/build/SampleApp.props @@ -5,4 +5,9 @@ + + + diff --git a/dirs.proj b/dirs.proj index 0f24632b72..4939a158bb 100644 --- a/dirs.proj +++ b/dirs.proj @@ -6,12 +6,12 @@ + - + + - - diff --git a/nukebuild/Numerge b/nukebuild/Numerge index aef10ae67d..4464343aef 160000 --- a/nukebuild/Numerge +++ b/nukebuild/Numerge @@ -1 +1 @@ -Subproject commit aef10ae67dc55c95f49b52a505a0be33bfa297a5 +Subproject commit 4464343aef5c8ab7a42fcb20a483a6058199f8b8 diff --git a/packages/Avalonia/AvaloniaBuildTasks.targets b/packages/Avalonia/AvaloniaBuildTasks.targets index 10f971cc4c..a455e2b3fc 100644 --- a/packages/Avalonia/AvaloniaBuildTasks.targets +++ b/packages/Avalonia/AvaloniaBuildTasks.targets @@ -8,6 +8,10 @@ AssemblyFile="$(AvaloniaBuildTasksLocation)" /> + + @@ -20,11 +24,15 @@ + + $(BuildAvaloniaResourcesDependsOn);AddAvaloniaResources;ResolveReferences + + + DependsOnTargets="$(BuildAvaloniaResourcesDependsOn)"> + Command="dotnet msbuild /nodereuse:false $(MSBuildProjectFile) /t:GenerateAvaloniaResources /p:_AvaloniaForceInternalMSBuild=true /p:Configuration=$(Configuration) /p:TargetFramework=$(TargetFramework) /p:BuildProjectReferences=false"/> + + + + $(IntermediateOutputPath)/Avalonia/references + $(IntermediateOutputPath)/Avalonia/original.dll + + + + + + diff --git a/samples/ControlCatalog.NetCore/ControlCatalog.NetCore.csproj b/samples/ControlCatalog.NetCore/ControlCatalog.NetCore.csproj index 589f41c06b..804ca1f9b8 100644 --- a/samples/ControlCatalog.NetCore/ControlCatalog.NetCore.csproj +++ b/samples/ControlCatalog.NetCore/ControlCatalog.NetCore.csproj @@ -3,6 +3,7 @@ Exe netcoreapp2.0 + true diff --git a/samples/ControlCatalog/App.xaml b/samples/ControlCatalog/App.xaml index d20e0100a0..2f6d25c089 100644 --- a/samples/ControlCatalog/App.xaml +++ b/samples/ControlCatalog/App.xaml @@ -4,7 +4,7 @@ - + - - diff --git a/samples/ControlCatalog/ViewModels/MainWindowViewModel.cs b/samples/ControlCatalog/ViewModels/MainWindowViewModel.cs new file mode 100644 index 0000000000..28cb84dad0 --- /dev/null +++ b/samples/ControlCatalog/ViewModels/MainWindowViewModel.cs @@ -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 ShowCustomManagedNotificationCommand { get; } + + public ReactiveCommand ShowManagedNotificationCommand { get; } + + public ReactiveCommand ShowNativeNotificationCommand { get; } + } +} diff --git a/samples/ControlCatalog/ViewModels/NotificationViewModel.cs b/samples/ControlCatalog/ViewModels/NotificationViewModel.cs new file mode 100644 index 0000000000..8724ba344b --- /dev/null +++ b/samples/ControlCatalog/ViewModels/NotificationViewModel.cs @@ -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 YesCommand { get; } + + public ReactiveCommand NoCommand { get; } + + } +} diff --git a/samples/ControlCatalog/Views/CustomNotificationView.xaml b/samples/ControlCatalog/Views/CustomNotificationView.xaml new file mode 100644 index 0000000000..5b99ed8e4d --- /dev/null +++ b/samples/ControlCatalog/Views/CustomNotificationView.xaml @@ -0,0 +1,19 @@ + + + + + + + + + +