Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Exmaple2.0/Exmaple2.0.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Avalonia" Version="11.1.5" />
<PackageReference Include="Avalonia.Diagnostics" Version="11.1.5" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.1.5" />
<PackageReference Include="Avalonia.Desktop" Version="11.1.5" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.3.0" />
<PackageReference Include="Avalonia" Version="12.0.0-rc1" />
<PackageReference Include="Avalonia.Diagnostics" Version="11.3.13" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="12.0.0-rc1" />
<PackageReference Include="Avalonia.Desktop" Version="12.0.0-rc1" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.2" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions MsBox.Avalonia.Markdown/MsBox.Avalonia.Markdown.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<PackageVersion>3.2.0.0</PackageVersion>
<PackageVersion>4.0.0.0</PackageVersion>
<Title>MessageBox.Avalonia.Markdown</Title>
<Authors>Lary</Authors>
<Description>Mardkown support for Messagebox AvaloniaUI</Description>
Expand All @@ -10,7 +10,7 @@
<RepositoryUrl>messagebox.avalonia</RepositoryUrl>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageTags>Avalonia MessageBox Markdown</PackageTags>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFrameworks>net10.0;net8.0</TargetFrameworks>
<LangVersion>latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
Expand Down
9 changes: 5 additions & 4 deletions MsBox.Avalonia/Controls/MsBoxCustomView.axaml.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Avalonia.Controls;
using Avalonia.Input;
using Avalonia.LogicalTree;
using Avalonia.Threading;

Expand Down Expand Up @@ -45,12 +46,12 @@ public string GetButtonResult()
public Task Copy()
{
var clipboard = TopLevel.GetTopLevel(this).Clipboard;
var text = ContentTextBox.SelectedText;
if (string.IsNullOrEmpty(text))
DataTransfer copier = new();
if (string.IsNullOrEmpty(ContentTextBox.SelectedText))
{
text = (DataContext as AbstractMsBoxViewModel)?.ContentMessage;
copier.Add(DataTransferItem.CreateText(ContentTextBox.SelectedText));
}
return clipboard?.SetTextAsync(text);
return clipboard?.SetDataAsync(copier);
}

public void Close()
Expand Down
9 changes: 5 additions & 4 deletions MsBox.Avalonia/Controls/MsBoxStandardView.axaml.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.Templates;
using Avalonia.Input;
using Avalonia.LogicalTree;
using Avalonia.Threading;

Expand Down Expand Up @@ -57,12 +58,12 @@ public ButtonResult GetButtonResult()
public Task Copy()
{
var clipboard = TopLevel.GetTopLevel(this).Clipboard;
var text = ContentTextBox.SelectedText;
if (string.IsNullOrEmpty(text))
DataTransfer copier = new();
if (string.IsNullOrEmpty(ContentTextBox.SelectedText))
{
text = (DataContext as AbstractMsBoxViewModel)?.ContentMessage;
copier.Add(DataTransferItem.CreateText(ContentTextBox.SelectedText));
}
return clipboard?.SetTextAsync(text);
return clipboard?.SetDataAsync(copier);
}

public void Close()
Expand Down
2 changes: 1 addition & 1 deletion MsBox.Avalonia/Dto/AbstractMessageBoxParams.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public abstract class AbstractMessageBoxParams
/// <summary>
/// Determines system decorations (title bar, border, etc)
/// </summary>
public SystemDecorations SystemDecorations { get; set; } = SystemDecorations.Full;
public WindowDecorations SystemDecorations { get; set; } = WindowDecorations.Full;
Comment thread
FirehawkV21 marked this conversation as resolved.
Outdated

/// <summary>
/// Window under all windows
Expand Down
10 changes: 5 additions & 5 deletions MsBox.Avalonia/MsBox.Avalonia.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<PackageVersion>3.3.1.1</PackageVersion>
<PackageVersion>4.0.0.0</PackageVersion>
<Title>MessageBox.Avalonia</Title>
<Authors>Lary</Authors>
<Description>Messagebox for AvaloniaUI</Description>
Expand All @@ -10,7 +10,7 @@
<RepositoryUrl>messagebox.avalonia</RepositoryUrl>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageTags>Avalonia MessageBox</PackageTags>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFrameworks>net10.0;net8.0</TargetFrameworks>
<LangVersion>latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
Expand All @@ -28,8 +28,8 @@
<AvaloniaResource Include="Assets\*" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia" Version="11.1.5" />
<PackageReference Include="DialogHost.Avalonia" Version="0.8.1" />
<PackageReference Include="Avalonia" Version="12.0.0-rc1" />
<PackageReference Include="DialogHost.Avalonia" Version="0.11.0" />
</ItemGroup>
<ItemGroup>
<None Update="icon.jpg">
Expand Down
2 changes: 1 addition & 1 deletion MsBox.Avalonia/ViewModels/AbstractMsBoxViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ protected AbstractMsBoxViewModel(AbstractMessageBoxParams @params, Icon icon = I
public double MaxHeight { get; set; }
public double Height { get; set; }

public SystemDecorations SystemDecorations { get; set; }
public WindowDecorations SystemDecorations { get; set; }
public bool Topmost { get; set; }

public SizeToContent SizeToContent { get; set; } = SizeToContent.Height;
Expand Down
2 changes: 1 addition & 1 deletion MsBox.Avalonia/Windows/MsBoxWindow.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
x:Class="MsBox.Avalonia.Windows.MsBoxWindow"
SizeToContent="WidthAndHeight"
x:DataType="viewModels:AbstractMsBoxViewModel"
SystemDecorations="{Binding SystemDecorations}"
WindowDecorations="{Binding SystemDecorations}"
Topmost="{Binding Topmost}"
Icon="{Binding WindowIconPath}"
WindowStartupLocation="{Binding LocationOfMyWindow}"
Expand Down