committed by
GitHub
413 changed files with 6870 additions and 2418 deletions
@ -0,0 +1,5 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<IgnoreThisComponentCompletely>True</IgnoreThisComponentCompletely> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -0,0 +1,5 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<IgnoreThisComponentCompletely>True</IgnoreThisComponentCompletely> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -1,7 +1,3 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<AdditionalFilesToIncludeForProject> |
|||
<Value>..\..\tools\MicroComGenerator\bin\Debug\net6.0\**.*</Value> |
|||
</AdditionalFilesToIncludeForProject> |
|||
</Settings> |
|||
<Settings /> |
|||
</ProjectConfiguration> |
|||
@ -1,7 +1,3 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<AdditionalFilesToIncludeForProject> |
|||
<Value>..\..\tools\MicroComGenerator\bin\Debug\net6.0\**.*</Value> |
|||
</AdditionalFilesToIncludeForProject> |
|||
</Settings> |
|||
<Settings /> |
|||
</ProjectConfiguration> |
|||
@ -0,0 +1,5 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<IgnoreThisComponentCompletely>True</IgnoreThisComponentCompletely> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -0,0 +1,5 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<IgnoreThisComponentCompletely>True</IgnoreThisComponentCompletely> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -0,0 +1,5 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<IgnoreThisComponentCompletely>True</IgnoreThisComponentCompletely> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -0,0 +1,5 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<IgnoreThisComponentCompletely>True</IgnoreThisComponentCompletely> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -0,0 +1,5 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<IgnoreThisComponentCompletely>True</IgnoreThisComponentCompletely> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -0,0 +1,5 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<IgnoreThisComponentCompletely>True</IgnoreThisComponentCompletely> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -0,0 +1,5 @@ |
|||
<ProjectConfiguration> |
|||
<Settings> |
|||
<IgnoreThisComponentCompletely>True</IgnoreThisComponentCompletely> |
|||
</Settings> |
|||
</ProjectConfiguration> |
|||
@ -0,0 +1,60 @@ |
|||
{ |
|||
"solution": { |
|||
"path": "Avalonia.sln", |
|||
"projects": [ |
|||
"packages\\Avalonia\\Avalonia.csproj", |
|||
"samples\\ControlCatalog.NetCore\\ControlCatalog.NetCore.csproj", |
|||
"samples\\ControlCatalog\\ControlCatalog.csproj", |
|||
"samples\\IntegrationTestApp\\IntegrationTestApp.csproj", |
|||
"samples\\MiniMvvm\\MiniMvvm.csproj", |
|||
"samples\\SampleControls\\ControlSamples.csproj", |
|||
"samples\\Sandbox\\Sandbox.csproj", |
|||
"src\\Avalonia.Base\\Avalonia.Base.csproj", |
|||
"src\\Avalonia.Build.Tasks\\Avalonia.Build.Tasks.csproj", |
|||
"src\\Avalonia.Controls.ColorPicker\\Avalonia.Controls.ColorPicker.csproj", |
|||
"src\\Avalonia.Controls.DataGrid\\Avalonia.Controls.DataGrid.csproj", |
|||
"src\\Avalonia.Controls\\Avalonia.Controls.csproj", |
|||
"src\\Avalonia.DesignerSupport\\Avalonia.DesignerSupport.csproj", |
|||
"src\\Avalonia.Desktop\\Avalonia.Desktop.csproj", |
|||
"src\\Avalonia.Diagnostics\\Avalonia.Diagnostics.csproj", |
|||
"src\\Avalonia.Dialogs\\Avalonia.Dialogs.csproj", |
|||
"src\\Avalonia.FreeDesktop\\Avalonia.FreeDesktop.csproj", |
|||
"src\\Avalonia.Headless.Vnc\\Avalonia.Headless.Vnc.csproj", |
|||
"src\\Avalonia.Headless\\Avalonia.Headless.csproj", |
|||
"src\\Avalonia.MicroCom\\Avalonia.MicroCom.csproj", |
|||
"src\\Avalonia.Native\\Avalonia.Native.csproj", |
|||
"src\\Avalonia.OpenGL\\Avalonia.OpenGL.csproj", |
|||
"src\\Avalonia.ReactiveUI\\Avalonia.ReactiveUI.csproj", |
|||
"src\\Avalonia.Remote.Protocol\\Avalonia.Remote.Protocol.csproj", |
|||
"src\\Avalonia.Themes.Fluent\\Avalonia.Themes.Fluent.csproj", |
|||
"src\\Avalonia.Themes.Simple\\Avalonia.Themes.Simple.csproj", |
|||
"src\\Avalonia.X11\\Avalonia.X11.csproj", |
|||
"src\\Linux\\Avalonia.LinuxFramebuffer\\Avalonia.LinuxFramebuffer.csproj", |
|||
"src\\Markup\\Avalonia.Markup.Xaml.Loader\\Avalonia.Markup.Xaml.Loader.csproj", |
|||
"src\\Markup\\Avalonia.Markup.Xaml\\Avalonia.Markup.Xaml.csproj", |
|||
"src\\Markup\\Avalonia.Markup\\Avalonia.Markup.csproj", |
|||
"src\\Skia\\Avalonia.Skia\\Avalonia.Skia.csproj", |
|||
"src\\Windows\\Avalonia.Direct2D1\\Avalonia.Direct2D1.csproj", |
|||
"src\\Windows\\Avalonia.Win32.Interop\\Avalonia.Win32.Interop.csproj", |
|||
"src\\Windows\\Avalonia.Win32\\Avalonia.Win32.csproj", |
|||
"src\\tools\\DevAnalyzers\\DevAnalyzers.csproj", |
|||
"src\\tools\\DevGenerators\\DevGenerators.csproj", |
|||
"tests\\Avalonia.Base.UnitTests\\Avalonia.Base.UnitTests.csproj", |
|||
"tests\\Avalonia.Benchmarks\\Avalonia.Benchmarks.csproj", |
|||
"tests\\Avalonia.Controls.DataGrid.UnitTests\\Avalonia.Controls.DataGrid.UnitTests.csproj", |
|||
"tests\\Avalonia.Controls.UnitTests\\Avalonia.Controls.UnitTests.csproj", |
|||
"tests\\Avalonia.DesignerSupport.TestApp\\Avalonia.DesignerSupport.TestApp.csproj", |
|||
"tests\\Avalonia.DesignerSupport.Tests\\Avalonia.DesignerSupport.Tests.csproj", |
|||
"tests\\Avalonia.Direct2D1.RenderTests\\Avalonia.Direct2D1.RenderTests.csproj", |
|||
"tests\\Avalonia.Direct2D1.UnitTests\\Avalonia.Direct2D1.UnitTests.csproj", |
|||
"tests\\Avalonia.IntegrationTests.Appium\\Avalonia.IntegrationTests.Appium.csproj", |
|||
"tests\\Avalonia.LeakTests\\Avalonia.LeakTests.csproj", |
|||
"tests\\Avalonia.Markup.UnitTests\\Avalonia.Markup.UnitTests.csproj", |
|||
"tests\\Avalonia.Markup.Xaml.UnitTests\\Avalonia.Markup.Xaml.UnitTests.csproj", |
|||
"tests\\Avalonia.ReactiveUI.UnitTests\\Avalonia.ReactiveUI.UnitTests.csproj", |
|||
"tests\\Avalonia.Skia.RenderTests\\Avalonia.Skia.RenderTests.csproj", |
|||
"tests\\Avalonia.Skia.UnitTests\\Avalonia.Skia.UnitTests.csproj", |
|||
"tests\\Avalonia.UnitTests\\Avalonia.UnitTests.csproj" |
|||
] |
|||
} |
|||
} |
|||
@ -0,0 +1,5 @@ |
|||
<Project> |
|||
<PropertyGroup Condition="$(NETCoreSdkVersion.StartsWith('7.0'))"> |
|||
<DefineConstants>$(DefineConstants);NET7SDK</DefineConstants> |
|||
</PropertyGroup> |
|||
</Project> |
|||
@ -1,8 +1,10 @@ |
|||
<UserControl xmlns="https://github.com/avaloniaui" |
|||
xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml' |
|||
x:Class="BindingDemo.TestItemView"> |
|||
xmlns:viewModels="using:BindingDemo.ViewModels" |
|||
x:Class="BindingDemo.TestItemView" |
|||
x:DataType="viewModels:TestItem"> |
|||
<StackPanel> |
|||
<TextBlock Classes="h1" Text="{Binding StringValue}"/> |
|||
<TextBox Text="{Binding Detail}" AcceptsReturn="True"/> |
|||
</StackPanel> |
|||
</UserControl> |
|||
</UserControl> |
|||
|
|||
@ -0,0 +1,20 @@ |
|||
namespace ControlCatalog.Models; |
|||
|
|||
public class StateData |
|||
{ |
|||
public string Name { get; private set; } |
|||
public string Abbreviation { get; private set; } |
|||
public string Capital { get; private set; } |
|||
|
|||
public StateData(string name, string abbreviatoin, string capital) |
|||
{ |
|||
Name = name; |
|||
Abbreviation = abbreviatoin; |
|||
Capital = capital; |
|||
} |
|||
|
|||
public override string ToString() |
|||
{ |
|||
return Name; |
|||
} |
|||
} |
|||
@ -1,18 +1,33 @@ |
|||
using Avalonia; |
|||
using Avalonia.Controls; |
|||
using Avalonia.Markup.Xaml; |
|||
using ControlCatalog.ViewModels; |
|||
|
|||
namespace ControlCatalog.Pages |
|||
{ |
|||
public class NotificationsPage : UserControl |
|||
{ |
|||
private NotificationViewModel _viewModel; |
|||
|
|||
public NotificationsPage() |
|||
{ |
|||
this.InitializeComponent(); |
|||
|
|||
_viewModel = new NotificationViewModel(); |
|||
|
|||
DataContext = _viewModel; |
|||
} |
|||
|
|||
private void InitializeComponent() |
|||
{ |
|||
AvaloniaXamlLoader.Load(this); |
|||
} |
|||
|
|||
protected override void OnAttachedToVisualTree(VisualTreeAttachmentEventArgs e) |
|||
{ |
|||
base.OnAttachedToVisualTree(e); |
|||
|
|||
_viewModel.NotificationManager = new Avalonia.Controls.Notifications.WindowNotificationManager(VisualRoot as TopLevel); |
|||
} |
|||
} |
|||
} |
|||
|
|||
@ -0,0 +1,53 @@ |
|||
<UserControl x:Class="ControlCatalog.Pages.PlatformInfoPage" |
|||
xmlns="https://github.com/avaloniaui" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
|||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
|||
xmlns:viewModels="using:ControlCatalog.ViewModels" |
|||
d:DesignHeight="800" |
|||
d:DesignWidth="400" |
|||
mc:Ignorable="d" |
|||
x:DataType="viewModels:PlatformInformationViewModel"> |
|||
<StackPanel Spacing="20"> |
|||
<TextBlock Text="{Binding PlatformInfo}" /> |
|||
|
|||
<StackPanel TextElement.Foreground="White"> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<Border Height="100" Width="100" Background="{OnFormFactor Gray, Desktop=Green}"> |
|||
<TextBlock Text="Desktop" /> |
|||
</Border> |
|||
<Border Height="100" Width="100" Background="{OnFormFactor Gray, Mobile=Green}"> |
|||
<TextBlock Text="Mobile" /> |
|||
</Border> |
|||
</StackPanel> |
|||
<WrapPanel> |
|||
<Border Height="100" Width="100" Background="{OnPlatform Gray, Windows=Green}"> |
|||
<TextBlock Text="Windows" /> |
|||
</Border> |
|||
<Border Height="100" Width="100" Background="{OnPlatform Gray, macOS=Green}"> |
|||
<TextBlock Text="macOS" /> |
|||
</Border> |
|||
<Border Height="100" Width="100" Background="{OnPlatform Gray, Linux=Green}"> |
|||
<TextBlock Text="Linux" /> |
|||
</Border> |
|||
<Border Height="100" Width="100" Background="{OnPlatform Gray, Browser=Green}"> |
|||
<TextBlock Text="Browser" /> |
|||
</Border> |
|||
<Border Height="100" Width="100" Background="{OnPlatform Gray, iOS=Green}"> |
|||
<TextBlock Text="iOS" /> |
|||
</Border> |
|||
<Border Height="100" Width="100" Background="{OnPlatform Gray, Android=Green}"> |
|||
<TextBlock Text="Android" /> |
|||
</Border> |
|||
<Border Height="100" Width="100"> |
|||
<Border.Background> |
|||
<OnPlatform Default="Gray" > |
|||
<On Options="macOS, Linux, Windows" Content="Green" /> |
|||
</OnPlatform> |
|||
</Border.Background> |
|||
<TextBlock Text="Win, Lin or Mac" /> |
|||
</Border> |
|||
</WrapPanel> |
|||
</StackPanel> |
|||
</StackPanel> |
|||
</UserControl> |
|||
@ -0,0 +1,20 @@ |
|||
using Avalonia.Controls; |
|||
using Avalonia.Markup.Xaml; |
|||
using ControlCatalog.ViewModels; |
|||
|
|||
namespace ControlCatalog.Pages |
|||
{ |
|||
public class PlatformInfoPage : UserControl |
|||
{ |
|||
public PlatformInfoPage() |
|||
{ |
|||
this.InitializeComponent(); |
|||
DataContext = new PlatformInformationViewModel(); |
|||
} |
|||
|
|||
private void InitializeComponent() |
|||
{ |
|||
AvaloniaXamlLoader.Load(this); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,54 @@ |
|||
using Avalonia; |
|||
using Avalonia.Platform; |
|||
using MiniMvvm; |
|||
|
|||
namespace ControlCatalog.ViewModels; |
|||
#nullable enable |
|||
|
|||
public class PlatformInformationViewModel : ViewModelBase |
|||
{ |
|||
public PlatformInformationViewModel() |
|||
{ |
|||
var runtimeInfo = AvaloniaLocator.Current.GetService<IRuntimePlatform>()?.GetRuntimeInfo(); |
|||
|
|||
if (runtimeInfo is { } info) |
|||
{ |
|||
if (info.IsBrowser) |
|||
{ |
|||
if (info.IsDesktop) |
|||
{ |
|||
PlatformInfo = "Platform: Desktop (browser)"; |
|||
} |
|||
else if (info.IsMobile) |
|||
{ |
|||
PlatformInfo = "Platform: Mobile (browser)"; |
|||
} |
|||
else |
|||
{ |
|||
PlatformInfo = "Platform: Unknown (browser) - please report"; |
|||
} |
|||
} |
|||
else |
|||
{ |
|||
if (info.IsDesktop) |
|||
{ |
|||
PlatformInfo = "Platform: Desktop (native)"; |
|||
} |
|||
else if (info.IsMobile) |
|||
{ |
|||
PlatformInfo = "Platform: Mobile (native)"; |
|||
} |
|||
else |
|||
{ |
|||
PlatformInfo = "Platform: Unknown (native) - please report"; |
|||
} |
|||
} |
|||
} |
|||
else |
|||
{ |
|||
|
|||
} |
|||
} |
|||
|
|||
public string PlatformInfo { get; } |
|||
} |
|||
@ -0,0 +1,26 @@ |
|||
using Avalonia.Controls; |
|||
using Avalonia.Media.Imaging; |
|||
using MiniMvvm; |
|||
|
|||
namespace ControlCatalog.ViewModels; |
|||
|
|||
public class TabControlPageViewModel : ViewModelBase |
|||
{ |
|||
private Dock _tabPlacement; |
|||
|
|||
public TabControlPageViewModelItem[]? Tabs { get; set; } |
|||
|
|||
public Dock TabPlacement |
|||
{ |
|||
get { return _tabPlacement; } |
|||
set { this.RaiseAndSetIfChanged(ref _tabPlacement, value); } |
|||
} |
|||
} |
|||
|
|||
public class TabControlPageViewModelItem |
|||
{ |
|||
public string? Header { get; set; } |
|||
public string? Text { get; set; } |
|||
public IBitmap? Image { get; set; } |
|||
public bool IsEnabled { get; set; } = true; |
|||
} |
|||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue