223 changed files with 6151 additions and 1243 deletions
@ -1,6 +1,7 @@ |
|||||
<ProjectConfiguration> |
<ProjectConfiguration> |
||||
<Settings> |
<Settings> |
||||
<DefaultTestTimeout>1000</DefaultTestTimeout> |
<DefaultTestTimeout>1000</DefaultTestTimeout> |
||||
|
<IgnoreThisComponentCompletely>True</IgnoreThisComponentCompletely> |
||||
<PreviouslyBuiltSuccessfully>True</PreviouslyBuiltSuccessfully> |
<PreviouslyBuiltSuccessfully>True</PreviouslyBuiltSuccessfully> |
||||
</Settings> |
</Settings> |
||||
</ProjectConfiguration> |
</ProjectConfiguration> |
||||
@ -0,0 +1,9 @@ |
|||||
|
<ProjectConfiguration> |
||||
|
<Settings> |
||||
|
<IgnoredTests> |
||||
|
<NamedTestSelector> |
||||
|
<TestName>Avalonia.Markup.UnitTests.Data.Plugins.DataAnnotationsValidationPluginTests.Produces_Aggregate_BindingNotificationsx</TestName> |
||||
|
</NamedTestSelector> |
||||
|
</IgnoredTests> |
||||
|
</Settings> |
||||
|
</ProjectConfiguration> |
||||
@ -1,6 +1,7 @@ |
|||||
<ProjectConfiguration> |
<ProjectConfiguration> |
||||
<Settings> |
<Settings> |
||||
<DefaultTestTimeout>1000</DefaultTestTimeout> |
<DefaultTestTimeout>1000</DefaultTestTimeout> |
||||
|
<IgnoreThisComponentCompletely>True</IgnoreThisComponentCompletely> |
||||
<PreviouslyBuiltSuccessfully>True</PreviouslyBuiltSuccessfully> |
<PreviouslyBuiltSuccessfully>True</PreviouslyBuiltSuccessfully> |
||||
</Settings> |
</Settings> |
||||
</ProjectConfiguration> |
</ProjectConfiguration> |
||||
@ -0,0 +1,5 @@ |
|||||
|
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||
|
<ItemGroup> |
||||
|
<PackageReference Include="MonoMac.NetStandard" Version="0.0.3" /> |
||||
|
</ItemGroup> |
||||
|
</Project> |
||||
@ -1,5 +1,5 @@ |
|||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||
<ItemGroup> |
<ItemGroup> |
||||
<PackageReference Include="Moq" Version="4.7.25" /> |
<PackageReference Include="Moq" Version="4.7.99" /> |
||||
</ItemGroup> |
</ItemGroup> |
||||
</Project> |
</Project> |
||||
|
|||||
@ -0,0 +1,5 @@ |
|||||
|
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||
|
<ItemGroup> |
||||
|
<PackageReference Include="reactiveui" Version="8.0.0-alpha0073" /> |
||||
|
</ItemGroup> |
||||
|
</Project> |
||||
@ -1,11 +1,10 @@ |
|||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||
<ItemGroup> |
<ItemGroup> |
||||
<PackageReference Include="System.Reactive" Version="3.0.0" /> |
<PackageReference Include="System.Reactive" Version="3.1.1" /> |
||||
<PackageReference Include="System.Reactive.Core" Version="3.0.0" /> |
<PackageReference Include="System.Reactive.Core" Version="3.1.1" /> |
||||
<PackageReference Include="System.Reactive.Interfaces" Version="3.0.0" /> |
<PackageReference Include="System.Reactive.Interfaces" Version="3.1.1" /> |
||||
<PackageReference Include="System.Reactive.Linq" Version="3.0.0" /> |
<PackageReference Include="System.Reactive.Linq" Version="3.1.1" /> |
||||
<PackageReference Include="System.Reactive.PlatformServices" Version="3.0.0" /> |
<PackageReference Include="System.Reactive.PlatformServices" Version="3.1.1" /> |
||||
<PackageReference Condition="'$(TargetFramework)' == 'net45'" Include="System.Reactive.Windows.Threading" Version="3.0.0" /> |
<PackageReference Condition="$(TargetFramework.StartsWith('net4'))" Include="System.Reactive.Windows.Threading" Version="3.1.1" /> |
||||
<PackageReference Condition="'$(TargetFramework)' == 'net461'" Include="System.Reactive.Windows.Threading" Version="3.0.0" /> |
|
||||
</ItemGroup> |
</ItemGroup> |
||||
</Project> |
</Project> |
||||
|
|||||
@ -0,0 +1,33 @@ |
|||||
|
<Window xmlns="https://github.com/avaloniaui" MinWidth="500" MinHeight="300" |
||||
|
Title="Avalonia Control Gallery" |
||||
|
Icon="resm:ControlCatalog.Assets.test_icon.ico?assembly=ControlCatalog" |
||||
|
xmlns:local="clr-namespace:ControlCatalog;assembly=ControlCatalog" HasSystemDecorations="False"> |
||||
|
<Grid RowDefinitions="5,*,5" ColumnDefinitions="5,*,5"> |
||||
|
<DockPanel Grid.Column="1" Grid.Row="1" > |
||||
|
<Grid Name="TitleBar" Background="LightBlue" DockPanel.Dock="Top" ColumnDefinitions="Auto,*,Auto"> |
||||
|
<TextBlock VerticalAlignment="Center" Margin="5,0,0,0">Title</TextBlock> |
||||
|
<StackPanel Grid.Column="2" Orientation="Horizontal"> |
||||
|
<StackPanel.Styles> |
||||
|
<Style Selector="Button"> |
||||
|
<Setter Property="Margin" Value="2"/> |
||||
|
</Style> |
||||
|
</StackPanel.Styles> |
||||
|
<Button Name="MinimizeButton">_</Button> |
||||
|
<Button Name="MaximizeButton">[ ]</Button> |
||||
|
<Button Name="CloseButton">X</Button> |
||||
|
</StackPanel> |
||||
|
</Grid> |
||||
|
<Border Background="White" Margin="5"> |
||||
|
<TextBlock>Hello world!</TextBlock> |
||||
|
</Border> |
||||
|
</DockPanel> |
||||
|
<Border Name="TopLeft" Background="Red"/> |
||||
|
<Border Name="TopRight" Background="Red" Grid.Column="2" /> |
||||
|
<Border Name="BottomLeft" Background="Red" Grid.Row="2" /> |
||||
|
<Border Name="BottomRight" Background="Red" Grid.Row="2" Grid.Column="2"/> |
||||
|
<Border Name="Top" Background="Blue" Grid.Column="1" /> |
||||
|
<Border Name="Right" Background="Blue" Grid.Row="1" Grid.Column="2" /> |
||||
|
<Border Name="Bottom" Background="Blue" Grid.Row="2" Grid.Column="1" /> |
||||
|
<Border Name="Left" Background="Blue" Grid.Row="1" /> |
||||
|
</Grid> |
||||
|
</Window> |
||||
@ -0,0 +1,53 @@ |
|||||
|
using Avalonia; |
||||
|
using Avalonia.Controls; |
||||
|
using Avalonia.Markup.Xaml; |
||||
|
using System; |
||||
|
using Avalonia.Input; |
||||
|
|
||||
|
namespace ControlCatalog |
||||
|
{ |
||||
|
public class DecoratedWindow : Window |
||||
|
{ |
||||
|
public DecoratedWindow() |
||||
|
{ |
||||
|
this.InitializeComponent(); |
||||
|
this.AttachDevTools(); |
||||
|
} |
||||
|
|
||||
|
void SetupSide(string name, StandardCursorType cursor, WindowEdge edge) |
||||
|
{ |
||||
|
var ctl = this.FindControl<Control>(name); |
||||
|
ctl.Cursor = new Cursor(cursor); |
||||
|
ctl.PointerPressed += delegate |
||||
|
{ |
||||
|
PlatformImpl.BeginResizeDrag(edge); |
||||
|
}; |
||||
|
} |
||||
|
|
||||
|
private void InitializeComponent() |
||||
|
{ |
||||
|
AvaloniaXamlLoader.Load(this); |
||||
|
this.FindControl<Control>("TitleBar").PointerPressed += delegate |
||||
|
{ |
||||
|
PlatformImpl.BeginMoveDrag(); |
||||
|
}; |
||||
|
SetupSide("Left", StandardCursorType.LeftSide, WindowEdge.West); |
||||
|
SetupSide("Right", StandardCursorType.RightSide, WindowEdge.East); |
||||
|
SetupSide("Top", StandardCursorType.TopSide, WindowEdge.North); |
||||
|
SetupSide("Bottom", StandardCursorType.BottomSize, WindowEdge.South); |
||||
|
SetupSide("TopLeft", StandardCursorType.TopLeftCorner, WindowEdge.NorthWest); |
||||
|
SetupSide("TopRight", StandardCursorType.TopRightCorner, WindowEdge.NorthEast); |
||||
|
SetupSide("BottomLeft", StandardCursorType.BottomLeftCorner, WindowEdge.SouthWest); |
||||
|
SetupSide("BottomRight", StandardCursorType.BottomRightCorner, WindowEdge.SouthEast); |
||||
|
this.FindControl<Button>("MinimizeButton").Click += delegate { this.WindowState = WindowState.Minimized; }; |
||||
|
this.FindControl<Button>("MaximizeButton").Click += delegate |
||||
|
{ |
||||
|
WindowState = WindowState == WindowState.Maximized ? WindowState.Normal : WindowState.Maximized; |
||||
|
}; |
||||
|
this.FindControl<Button>("CloseButton").Click += delegate |
||||
|
{ |
||||
|
Close(); |
||||
|
}; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,12 @@ |
|||||
|
<UserControl xmlns="https://github.com/avaloniaui"> |
||||
|
<StackPanel Orientation="Vertical" Gap="4" Margin="4"> |
||||
|
<Button Name="OpenFile">Open File</Button> |
||||
|
<Button Name="SaveFile">Save File</Button> |
||||
|
<Button Name="SelectFolder">Select Folder</Button> |
||||
|
<StackPanel Orientation="Horizontal"> |
||||
|
<CheckBox Name="IsModal" IsChecked="True"/> |
||||
|
<TextBlock>Modal to window</TextBlock> |
||||
|
</StackPanel> |
||||
|
<Button Name="DecoratedWindow">Decorated window</Button> |
||||
|
</StackPanel> |
||||
|
</UserControl> |
||||
@ -0,0 +1,46 @@ |
|||||
|
using Avalonia.Controls; |
||||
|
using Avalonia.Markup.Xaml; |
||||
|
#pragma warning disable 4014
|
||||
|
|
||||
|
namespace ControlCatalog.Pages |
||||
|
{ |
||||
|
public class DialogsPage : UserControl |
||||
|
{ |
||||
|
public DialogsPage() |
||||
|
{ |
||||
|
this.InitializeComponent(); |
||||
|
this.FindControl<Button>("OpenFile").Click += delegate |
||||
|
{ |
||||
|
new OpenFileDialog() |
||||
|
{ |
||||
|
Title = "Open file" |
||||
|
}.ShowAsync(GetWindow()); |
||||
|
}; |
||||
|
this.FindControl<Button>("SaveFile").Click += delegate |
||||
|
{ |
||||
|
new SaveFileDialog() |
||||
|
{ |
||||
|
Title = "Save file" |
||||
|
}.ShowAsync(GetWindow()); |
||||
|
}; |
||||
|
this.FindControl<Button>("SelectFolder").Click += delegate |
||||
|
{ |
||||
|
new OpenFolderDialog() |
||||
|
{ |
||||
|
Title = "Select folder" |
||||
|
}.ShowAsync(GetWindow()); |
||||
|
}; |
||||
|
this.FindControl<Button>("DecoratedWindow").Click += delegate |
||||
|
{ |
||||
|
new DecoratedWindow().Show(); |
||||
|
}; |
||||
|
} |
||||
|
|
||||
|
Window GetWindow() => this.FindControl<CheckBox>("IsModal").IsChecked ? (Window)this.VisualRoot : null; |
||||
|
|
||||
|
private void InitializeComponent() |
||||
|
{ |
||||
|
AvaloniaXamlLoader.Load(this); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -1,22 +1,41 @@ |
|||||
<UserControl xmlns="https://github.com/avaloniaui"> |
<UserControl xmlns="https://github.com/avaloniaui"> |
||||
<StackPanel Orientation="Vertical" Gap="4"> |
<StackPanel Orientation="Vertical" |
||||
<TextBlock Classes="h1">ToolTip</TextBlock> |
Gap="4"> |
||||
<TextBlock Classes="h2">A control which pops up a hint when a control is hovered</TextBlock> |
<TextBlock Classes="h1">ToolTip</TextBlock> |
||||
|
<TextBlock Classes="h2">A control which pops up a hint when a control is hovered</TextBlock> |
||||
|
|
||||
<StackPanel Orientation="Horizontal" |
<Grid RowDefinitions="Auto,Auto" |
||||
|
ColumnDefinitions="Auto,Auto" |
||||
Margin="0,16,0,0" |
Margin="0,16,0,0" |
||||
HorizontalAlignment="Center" |
HorizontalAlignment="Center"> |
||||
Gap="16"> |
<Border Grid.Column="0" |
||||
<Border Background="{StyleResource ThemeAccentBrush}" |
Grid.Row="1" |
||||
Padding="48,48,48,48"> |
Background="{StyleResource ThemeAccentBrush}" |
||||
<ToolTip.Tip> |
Margin="5" |
||||
<StackPanel> |
Padding="50" |
||||
<TextBlock Classes="h1">ToolTip</TextBlock> |
ToolTip.Tip="This is a ToolTip"> |
||||
<TextBlock Classes="h2">A control which pops up a hint when a control is hovered</TextBlock> |
<TextBlock>Hover Here</TextBlock> |
||||
</StackPanel> |
</Border> |
||||
</ToolTip.Tip> |
<CheckBox Grid.Column="1" |
||||
<TextBlock>Hover Here</TextBlock> |
Margin="5" |
||||
</Border> |
Grid.Row="0" |
||||
|
IsChecked="{Binding ElementName=Border, Path=(ToolTip.IsOpen)}" |
||||
|
Content="ToolTip Open" /> |
||||
|
<Border Name="Border" |
||||
|
Grid.Column="1" |
||||
|
Grid.Row="1" |
||||
|
Background="{StyleResource ThemeAccentBrush}" |
||||
|
Margin="5" |
||||
|
Padding="50" |
||||
|
ToolTip.Placement="Bottom"> |
||||
|
<ToolTip.Tip> |
||||
|
<StackPanel> |
||||
|
<TextBlock Classes="h1">ToolTip</TextBlock> |
||||
|
<TextBlock Classes="h2">A control which pops up a hint when a control is hovered</TextBlock> |
||||
|
</StackPanel> |
||||
|
</ToolTip.Tip> |
||||
|
<TextBlock>ToolTip bottom placement</TextBlock> |
||||
|
</Border> |
||||
|
</Grid> |
||||
</StackPanel> |
</StackPanel> |
||||
</StackPanel> |
|
||||
</UserControl> |
</UserControl> |
||||
@ -0,0 +1,82 @@ |
|||||
|
using System; |
||||
|
using Avalonia.Input; |
||||
|
using Avalonia.Threading; |
||||
|
|
||||
|
namespace Avalonia.Controls |
||||
|
{ |
||||
|
public class RepeatButton : Button |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// Defines the <see cref="Delay"/> property.
|
||||
|
/// </summary>
|
||||
|
public static readonly StyledProperty<int> DelayProperty = |
||||
|
AvaloniaProperty.Register<Button, int>(nameof(Delay), 100); |
||||
|
|
||||
|
private DispatcherTimer _repeatTimer; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Gets or sets the amount of time, in milliseconds, of repeating clicks.
|
||||
|
/// </summary>
|
||||
|
public int Delay |
||||
|
{ |
||||
|
get { return GetValue(DelayProperty); } |
||||
|
set { SetValue(DelayProperty, value); } |
||||
|
} |
||||
|
|
||||
|
private void StartTimer() |
||||
|
{ |
||||
|
if (_repeatTimer == null) |
||||
|
{ |
||||
|
_repeatTimer = new DispatcherTimer(); |
||||
|
_repeatTimer.Tick += (o, e) => OnClick(); |
||||
|
} |
||||
|
|
||||
|
if (_repeatTimer.IsEnabled) return; |
||||
|
|
||||
|
_repeatTimer.Interval = TimeSpan.FromMilliseconds(Delay); |
||||
|
_repeatTimer.Start(); |
||||
|
} |
||||
|
|
||||
|
private void StopTimer() |
||||
|
{ |
||||
|
_repeatTimer?.Stop(); |
||||
|
} |
||||
|
|
||||
|
protected override void OnKeyDown(KeyEventArgs e) |
||||
|
{ |
||||
|
base.OnKeyDown(e); |
||||
|
|
||||
|
if (e.Key == Key.Space) |
||||
|
{ |
||||
|
StartTimer(); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
protected override void OnKeyUp(KeyEventArgs e) |
||||
|
{ |
||||
|
base.OnKeyUp(e); |
||||
|
|
||||
|
StopTimer(); |
||||
|
} |
||||
|
|
||||
|
protected override void OnPointerPressed(PointerPressedEventArgs e) |
||||
|
{ |
||||
|
base.OnPointerPressed(e); |
||||
|
|
||||
|
if (e.MouseButton == MouseButton.Left) |
||||
|
{ |
||||
|
StartTimer(); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
protected override void OnPointerReleased(PointerReleasedEventArgs e) |
||||
|
{ |
||||
|
base.OnPointerReleased(e); |
||||
|
|
||||
|
if (e.MouseButton == MouseButton.Left) |
||||
|
{ |
||||
|
StopTimer(); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,27 @@ |
|||||
|
// Copyright (c) The Avalonia Project. All rights reserved.
|
||||
|
// Licensed under the MIT license. See licence.md file in the project root for full license information.
|
||||
|
|
||||
|
using System; |
||||
|
|
||||
|
namespace Avalonia.Controls.Templates |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// Defines an element that has a <see cref="DataTemplates"/> collection.
|
||||
|
/// </summary>
|
||||
|
public interface IDataTemplateHost |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// Gets the data templates for the element.
|
||||
|
/// </summary>
|
||||
|
DataTemplates DataTemplates { get; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Gets a value indicating whether <see cref="DataTemplates"/> is initialized.
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// The <see cref="DataTemplates"/> property may be lazily initialized, if so this property
|
||||
|
/// indicates whether it has been initialized.
|
||||
|
/// </remarks>
|
||||
|
bool IsDataTemplatesInitialized { get; } |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,98 @@ |
|||||
|
using System; |
||||
|
using Avalonia.Input; |
||||
|
using Avalonia.Threading; |
||||
|
|
||||
|
namespace Avalonia.Controls |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// Handeles <see cref="ToolTip"/> interaction with controls.
|
||||
|
/// </summary>
|
||||
|
internal sealed class ToolTipService |
||||
|
{ |
||||
|
public static ToolTipService Instance { get; } = new ToolTipService(); |
||||
|
|
||||
|
private DispatcherTimer _timer; |
||||
|
|
||||
|
private ToolTipService() { } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// called when the <see cref="ToolTip.TipProperty"/> property changes on a control.
|
||||
|
/// </summary>
|
||||
|
/// <param name="e">The event args.</param>
|
||||
|
internal void TipChanged(AvaloniaPropertyChangedEventArgs e) |
||||
|
{ |
||||
|
var control = (Control)e.Sender; |
||||
|
|
||||
|
if (e.OldValue != null) |
||||
|
{ |
||||
|
control.PointerEnter -= ControlPointerEnter; |
||||
|
control.PointerLeave -= ControlPointerLeave; |
||||
|
} |
||||
|
|
||||
|
if (e.NewValue != null) |
||||
|
{ |
||||
|
control.PointerEnter += ControlPointerEnter; |
||||
|
control.PointerLeave += ControlPointerLeave; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Called when the pointer enters a control with an attached tooltip.
|
||||
|
/// </summary>
|
||||
|
/// <param name="sender">The event sender.</param>
|
||||
|
/// <param name="e">The event args.</param>
|
||||
|
private void ControlPointerEnter(object sender, PointerEventArgs e) |
||||
|
{ |
||||
|
StopTimer(); |
||||
|
|
||||
|
var control = (Control)sender; |
||||
|
var showDelay = ToolTip.GetShowDelay(control); |
||||
|
if (showDelay == 0) |
||||
|
{ |
||||
|
Open(control); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
StartShowTimer(showDelay, control); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Called when the pointer leaves a control with an attached tooltip.
|
||||
|
/// </summary>
|
||||
|
/// <param name="sender">The event sender.</param>
|
||||
|
/// <param name="e">The event args.</param>
|
||||
|
private void ControlPointerLeave(object sender, PointerEventArgs e) |
||||
|
{ |
||||
|
var control = (Control)sender; |
||||
|
Close(control); |
||||
|
} |
||||
|
|
||||
|
private void StartShowTimer(int showDelay, Control control) |
||||
|
{ |
||||
|
_timer = new DispatcherTimer { Interval = TimeSpan.FromMilliseconds(showDelay) }; |
||||
|
_timer.Tick += (o, e) => Open(control); |
||||
|
_timer.Start(); |
||||
|
} |
||||
|
|
||||
|
private void Open(Control control) |
||||
|
{ |
||||
|
StopTimer(); |
||||
|
|
||||
|
ToolTip.SetIsOpen(control, true); |
||||
|
} |
||||
|
|
||||
|
private void Close(Control control) |
||||
|
{ |
||||
|
StopTimer(); |
||||
|
|
||||
|
ToolTip.SetIsOpen(control, false); |
||||
|
} |
||||
|
|
||||
|
private void StopTimer() |
||||
|
{ |
||||
|
_timer?.Stop(); |
||||
|
_timer = null; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -1,75 +1,21 @@ |
|||||
<?xml version="1.0" encoding="utf-8"?> |
<Project Sdk="Microsoft.NET.Sdk"> |
||||
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
<PropertyGroup> |
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> |
<TargetFramework>net461</TargetFramework> |
||||
<PropertyGroup> |
<GenerateAssemblyInfo>false</GenerateAssemblyInfo> |
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
<DocumentationFile>bin\$(Configuration)\Avalonia.DotNetFrameworkRuntime.xml</DocumentationFile> |
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
<DefineConstants>$(DefineConstants);FULLDOTNET</DefineConstants> |
||||
<ProjectGuid>{4A1ABB09-9047-4BD5-A4AD-A055E52C5EE0}</ProjectGuid> |
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> |
||||
<OutputType>Library</OutputType> |
</PropertyGroup> |
||||
<AppDesignerFolder>Properties</AppDesignerFolder> |
<ItemGroup> |
||||
<RootNamespace>Avalonia.DotNetFrameworkRuntime</RootNamespace> |
<Compile Include="..\Shared\SharedAssemblyInfo.cs"> |
||||
<AssemblyName>Avalonia.DotNetFrameworkRuntime</AssemblyName> |
<Link>Properties\SharedAssemblyInfo.cs</Link> |
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> |
</Compile> |
||||
<FileAlignment>512</FileAlignment> |
|
||||
<TargetFrameworkProfile /> |
<ProjectReference Include="..\Avalonia.Base\Avalonia.Base.csproj" /> |
||||
</PropertyGroup> |
<ProjectReference Include="..\Avalonia.Controls\Avalonia.Controls.csproj" /> |
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> |
<ProjectReference Include="..\Avalonia.Visuals\Avalonia.Visuals.csproj" /> |
||||
<DebugSymbols>true</DebugSymbols> |
<ProjectReference Include="..\Avalonia.Styling\Avalonia.Styling.csproj" /> |
||||
<DebugType>full</DebugType> |
</ItemGroup> |
||||
<Optimize>false</Optimize> |
<Import Project="..\Shared\PlatformSupport\PlatformSupport.projitems" Label="Shared" /> |
||||
<OutputPath>bin\Debug\</OutputPath> |
<Import Project="..\..\build\Rx.props" /> |
||||
<DefineConstants>TRACE;DEBUG;FULLDOTNET</DefineConstants> |
|
||||
<ErrorReport>prompt</ErrorReport> |
|
||||
<WarningLevel>4</WarningLevel> |
|
||||
<DocumentationFile>bin\Debug\Avalonia.DotNetFrameworkRuntime.xml</DocumentationFile> |
|
||||
</PropertyGroup> |
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' "> |
|
||||
<DebugType>pdbonly</DebugType> |
|
||||
<Optimize>true</Optimize> |
|
||||
<OutputPath>bin\Release\</OutputPath> |
|
||||
<DefineConstants>TRACE;FULLDOTNET</DefineConstants> |
|
||||
<ErrorReport>prompt</ErrorReport> |
|
||||
<WarningLevel>4</WarningLevel> |
|
||||
<DocumentationFile>bin\Release\Avalonia.DotNetFrameworkRuntime.xml</DocumentationFile> |
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> |
|
||||
</PropertyGroup> |
|
||||
<ItemGroup> |
|
||||
<Reference Include="System" /> |
|
||||
<Reference Include="System.Core" /> |
|
||||
<Reference Include="System.Xml.Linq" /> |
|
||||
<Reference Include="System.Data.DataSetExtensions" /> |
|
||||
<Reference Include="Microsoft.CSharp" /> |
|
||||
<Reference Include="System.Data" /> |
|
||||
<Reference Include="System.Net.Http" /> |
|
||||
<Reference Include="System.Xml" /> |
|
||||
</ItemGroup> |
|
||||
<ItemGroup> |
|
||||
<Compile Include="..\Shared\SharedAssemblyInfo.cs"> |
|
||||
<Link>Properties\SharedAssemblyInfo.cs</Link> |
|
||||
</Compile> |
|
||||
<Compile Include="AppBuilder.cs" /> |
|
||||
<Compile Include="Properties\AssemblyInfo.cs" /> |
|
||||
<Compile Include="RuntimeInfo.cs" /> |
|
||||
</ItemGroup> |
|
||||
<ItemGroup> |
|
||||
<ProjectReference Include="..\Avalonia.Base\Avalonia.Base.csproj"> |
|
||||
<Project>{B09B78D8-9B26-48B0-9149-D64A2F120F3F}</Project> |
|
||||
<Name>Avalonia.Base</Name> |
|
||||
</ProjectReference> |
|
||||
<ProjectReference Include="..\Avalonia.Controls\Avalonia.Controls.csproj"> |
|
||||
<Project>{D2221C82-4A25-4583-9B43-D791E3F6820C}</Project> |
|
||||
<Name>Avalonia.Controls</Name> |
|
||||
</ProjectReference> |
|
||||
<ProjectReference Include="..\Avalonia.Visuals\Avalonia.Visuals.csproj"> |
|
||||
<Project>{eb582467-6abb-43a1-b052-e981ba910e3a}</Project> |
|
||||
<Name>Avalonia.Visuals</Name> |
|
||||
</ProjectReference> |
|
||||
<ProjectReference Include="..\Avalonia.Styling\Avalonia.Styling.csproj"> |
|
||||
<Project>{f1baa01a-f176-4c6a-b39d-5b40bb1b148f}</Project> |
|
||||
<Name>Avalonia.Styling</Name> |
|
||||
</ProjectReference> |
|
||||
</ItemGroup> |
|
||||
<Import Project="..\Shared\PlatformSupport\PlatformSupport.projitems" Label="Shared" /> |
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
|
||||
<Import Project="..\..\build\Rx.props" /> |
|
||||
</Project> |
</Project> |
||||
@ -1,15 +0,0 @@ |
|||||
using System.Reflection; |
|
||||
using System.Runtime.InteropServices; |
|
||||
|
|
||||
// General Information about an assembly is controlled through the following
|
|
||||
// set of attributes. Change these attribute values to modify the information
|
|
||||
// associated with an assembly.
|
|
||||
[assembly: AssemblyTitle("Avalonia.DotNetFrameworkRuntime")] |
|
||||
|
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
|
||||
// to COM components. If you need to access a type in this assembly from
|
|
||||
// COM, set the ComVisible attribute to true on that type.
|
|
||||
[assembly: ComVisible(false)] |
|
||||
|
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
|
||||
[assembly: Guid("4a1abb09-9047-4bd5-a4ad-a055e52c5ee0")] |
|
||||
@ -0,0 +1,24 @@ |
|||||
|
// Copyright (c) The Avalonia Project. All rights reserved.
|
||||
|
// Licensed under the MIT license. See licence.md file in the project root for full license information.
|
||||
|
|
||||
|
using Avalonia.Controls; |
||||
|
using Avalonia.Threading; |
||||
|
using ReactiveUI; |
||||
|
using System; |
||||
|
using System.Reactive.Concurrency; |
||||
|
using System.Threading; |
||||
|
|
||||
|
namespace Avalonia |
||||
|
{ |
||||
|
public static class AppBuilderExtensions |
||||
|
{ |
||||
|
public static TAppBuilder UseReactiveUI<TAppBuilder>(this TAppBuilder builder) |
||||
|
where TAppBuilder : AppBuilderBase<TAppBuilder>, new() |
||||
|
{ |
||||
|
return builder.AfterSetup(_ => |
||||
|
{ |
||||
|
RxApp.MainThreadScheduler = AvaloniaScheduler.Instance; |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -1,23 +0,0 @@ |
|||||
// Copyright (c) The Avalonia Project. All rights reserved.
|
|
||||
// Licensed under the MIT license. See licence.md file in the project root for full license information.
|
|
||||
|
|
||||
using System; |
|
||||
using System.Reactive.Concurrency; |
|
||||
using System.Threading; |
|
||||
|
|
||||
|
|
||||
namespace ReactiveUI |
|
||||
{ |
|
||||
/// <summary>
|
|
||||
/// Ignore me. This class is a secret handshake between RxUI and RxUI.Xaml
|
|
||||
/// in order to register certain classes on startup that would be difficult
|
|
||||
/// to register otherwise.
|
|
||||
/// </summary>
|
|
||||
public class PlatformRegistrations : IWantsToRegisterStuff |
|
||||
{ |
|
||||
public void Register(Action<Func<object>, Type> registerFunction) |
|
||||
{ |
|
||||
RxApp.MainThreadScheduler = new SynchronizationContextScheduler(SynchronizationContext.Current); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,34 +0,0 @@ |
|||||
using System; |
|
||||
using System.Collections.Generic; |
|
||||
using System.Text; |
|
||||
|
|
||||
namespace System.Runtime.Serialization |
|
||||
{ |
|
||||
class IgnoreDataMemberAttribute : Attribute |
|
||||
{ |
|
||||
} |
|
||||
|
|
||||
class DataMemberAttribute : Attribute |
|
||||
{ |
|
||||
} |
|
||||
class OnDeserializedAttribute : Attribute |
|
||||
{ |
|
||||
} |
|
||||
|
|
||||
class DataContractAttribute : Attribute |
|
||||
{ |
|
||||
} |
|
||||
|
|
||||
class StreamingContext { } |
|
||||
} |
|
||||
|
|
||||
namespace System.Diagnostics.Contracts |
|
||||
{ |
|
||||
static class Contract |
|
||||
{ |
|
||||
public static void Requires(bool condition) |
|
||||
{ |
|
||||
|
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1 +0,0 @@ |
|||||
Subproject commit 3f725c808b1d4c8457f0d3204e0a071aa462cd75 |
|
||||
@ -0,0 +1,19 @@ |
|||||
|
// Copyright (c) The Avalonia Project. All rights reserved.
|
||||
|
// Licensed under the MIT license. See licence.md file in the project root for full license information.
|
||||
|
|
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
|
||||
|
namespace Avalonia.Controls |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// An indexed dictionary of resources.
|
||||
|
/// </summary>
|
||||
|
public interface IResourceDictionary : IResourceProvider, IDictionary<object, object> |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// Gets a collection of child resource dictionaries.
|
||||
|
/// </summary>
|
||||
|
IList<IResourceProvider> MergedDictionaries { get; } |
||||
|
} |
||||
|
} |
||||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue