Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

Adjust/avoid AOT compatibility warnings/errors #181

Open
wants to merge 72 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
8f2ec6c
Update Directory.Build.props
wieslawsoltes Apr 25, 2024
9d6a8f1
Update azure-pipelines.yml
wieslawsoltes Jul 6, 2024
6f8ed30
Update to 11.1.0
wieslawsoltes Jul 22, 2024
ee440e0
Update Directory.Build.props
wieslawsoltes Sep 1, 2024
25281c9
Add new event callbacks
wieslawsoltes Sep 1, 2024
673ffb2
Update xml docs
wieslawsoltes Sep 1, 2024
e4f7cab
Create LoadedBehavior.cs
wieslawsoltes Sep 1, 2024
23ae860
Create AttachedToLogicalTreeBehavior.cs
wieslawsoltes Sep 1, 2024
52c2a83
Add IsEnabled property
wieslawsoltes Sep 1, 2024
ca91842
Add action base class
wieslawsoltes Sep 1, 2024
b69aa86
Rename to Action
wieslawsoltes Sep 1, 2024
c6b5813
Remove usage of the xmlns
wieslawsoltes Sep 3, 2024
90a30f4
Add IEditableItem
wieslawsoltes Sep 3, 2024
6eb0c6e
Refactor EditableItem
wieslawsoltes Sep 3, 2024
133538b
Fix namespace
wieslawsoltes Sep 3, 2024
5498d20
Update ActionCollection.cs
wieslawsoltes Sep 3, 2024
eefaca8
Use collection expression
wieslawsoltes Sep 3, 2024
83fba93
Remove unused usings
wieslawsoltes Sep 3, 2024
196fe53
Update Directory.Build.props
wieslawsoltes Sep 3, 2024
e4ed081
Remove redundant property
wieslawsoltes Sep 3, 2024
c03aec4
Update nullable annotations
wieslawsoltes Sep 3, 2024
5e57326
Move
wieslawsoltes Sep 9, 2024
8be26d3
Add InteractiveBehaviorBase
wieslawsoltes Sep 9, 2024
272c95f
Update Directory.Build.props
wieslawsoltes Sep 9, 2024
dcc577b
Move
wieslawsoltes Sep 9, 2024
5cce68e
Create CloseNotificationAction.cs
wieslawsoltes Sep 9, 2024
4a65402
Create FocusControlBehavior.cs
wieslawsoltes Sep 9, 2024
065302e
Create HideAttachedFlyoutBehavior.cs
wieslawsoltes Sep 9, 2024
775e8e8
Create HideButtonFlyoutBehavior.cs
wieslawsoltes Sep 9, 2024
2ec876a
Create ScrollToItemBehavior.cs
wieslawsoltes Sep 9, 2024
923b7b9
Create ScrollToItemIndexBehavior.cs
wieslawsoltes Sep 9, 2024
697cbe0
Fix
wieslawsoltes Sep 9, 2024
4b6976d
Add SourceControl property
wieslawsoltes Sep 9, 2024
fa18a6a
Update SelectingItemsControlBehavior.cs
wieslawsoltes Sep 10, 2024
846e2cb
Create SlidingAnimation.cs
wieslawsoltes Sep 10, 2024
d0fec68
Add SlidingAnimationView
wieslawsoltes Sep 10, 2024
7431099
Update Directory.Build.props
wieslawsoltes Sep 10, 2024
e5c95f2
Update BindTagToVisualRootDataContextBehavior.cs
wieslawsoltes Sep 10, 2024
a6b3650
Rename and refactoir
wieslawsoltes Sep 10, 2024
d1f62a9
Update BindTagToVisualRootDataContextBehavior.cs
wieslawsoltes Sep 10, 2024
dbc6516
Remove unused usings
wieslawsoltes Sep 10, 2024
0e32976
Move and rename
wieslawsoltes Sep 10, 2024
be450d2
Add IInternalBehavior interface
wieslawsoltes Oct 24, 2024
8aad463
Create StyledElementBehavior.cs
wieslawsoltes Oct 24, 2024
8604ae6
Create StyledElementBehaviorOfT.cs
wieslawsoltes Oct 24, 2024
91a0835
Inherit from IInternalBehavior
wieslawsoltes Oct 24, 2024
7d0c910
Create StyledElementTrigger.cs
wieslawsoltes Oct 24, 2024
e2c49d8
Create StyledElementTriggerOfT.cs
wieslawsoltes Oct 24, 2024
72e7b3b
Synchronize DataContext
wieslawsoltes Oct 24, 2024
ad8748b
Use StyledElementBehavior / StyledElementTrigger
wieslawsoltes Oct 24, 2024
df1786e
Merge pull request #5 from wieslawsoltes/StyledBehavior
wieslawsoltes Oct 24, 2024
275fca6
Update Directory.Packages.props
wieslawsoltes Oct 24, 2024
bd779a2
Update Directory.Packages.props
wieslawsoltes Oct 24, 2024
4595ed2
Update Directory.Build.props
wieslawsoltes Oct 24, 2024
46b4ced
Set logical parent
wieslawsoltes Oct 24, 2024
f61a847
Update Directory.Build.props
wieslawsoltes Oct 24, 2024
6baf9d0
Use statement body
wieslawsoltes Oct 24, 2024
fe9a33b
Fix logical tree attachment
wieslawsoltes Oct 24, 2024
501da78
Update Directory.Build.props
wieslawsoltes Oct 24, 2024
5bf8b2d
Add reused TrimmingEnable targets file, it contains a bunch of helper…
maxkatz6 Oct 25, 2024
368662b
Bump System.Reactive, as 6.0.1 version had AOT compatibility issue
maxkatz6 Oct 25, 2024
bb26b82
Bump Avalonia version used in samples, enable compiled bindings
maxkatz6 Oct 25, 2024
1fdd0c1
Avoid Avalonia.Diagnostics in Release
maxkatz6 Oct 25, 2024
db2d6c0
Prepare Interactivity package for AOT compatibility, all behaviors an…
maxkatz6 Oct 25, 2024
2a398ec
Enable TrimmingEnable for Responsive, Events, Draggable and DragAndDr…
maxkatz6 Oct 25, 2024
f67219b
Avoid reflection based FromEventPattern from System.Reactive
maxkatz6 Oct 25, 2024
e922f8e
Mark ChangeAvaloniaPropertyAction as RequiresUnreferencedCode
maxkatz6 Oct 25, 2024
294d709
Use TrimmingEnable on Interactions package, mark CallMethodAction, Ch…
maxkatz6 Oct 25, 2024
66ff98a
Enable TrimmingEnable on main-package
maxkatz6 Oct 25, 2024
861d3b5
Adjust samples to publish with AOT enabled
maxkatz6 Oct 25, 2024
c314bec
Make sure tests work well with compiled bindings (as it's enabled glo…
maxkatz6 Oct 25, 2024
16c2d41
Adjustments after repo migration
maxkatz6 Oct 25, 2024
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
1 change: 1 addition & 0 deletions AvaloniaBehaviors.sln
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "props", "props", "{40A43022
build\SignAssembly.props = build\SignAssembly.props
build\SourceLink.props = build\SourceLink.props
build\XUnit.props = build\XUnit.props
build\TrimmingEnable.targets = build\TrimmingEnable.targets
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "nuget", "nuget", "{721A55B7-C5B0-44E2-803A-56E291C672FE}"
Expand Down
5 changes: 3 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<Project>
<PropertyGroup>
<VersionPrefix>11.0.10.8</VersionPrefix>
<VersionSuffix></VersionSuffix>
<VersionPrefix>11.1.0.5</VersionPrefix>
<VersionSuffix>beta.2</VersionSuffix>
<Authors>Wiesław Šoltés</Authors>
<Company>Wiesław Šoltés</Company>
<Copyright>Copyright © Wiesław Šoltés 2024</Copyright>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/wieslawsoltes/AvaloniaBehaviors</PackageProjectUrl>
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
</PropertyGroup>
<PropertyGroup>
<AnalysisLevel>latest</AnalysisLevel>
Expand Down
4 changes: 2 additions & 2 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<AvaloniaVersion>11.0.0</AvaloniaVersion>
<AvaloniaVersion>11.1.0</AvaloniaVersion>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Avalonia" Version="$(AvaloniaVersion)" />
Expand All @@ -14,7 +14,7 @@
<PackageVersion Include="Avalonia.Headless.XUnit" Version="$(AvaloniaVersion)" />
</ItemGroup>
<ItemGroup>
<PackageVersion Include="System.Reactive" Version="6.0.0" />
<PackageVersion Include="System.Reactive" Version="6.0.1" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.0.0" />
<PackageVersion Include="Nuke.Common" Version="5.3.0" />
</ItemGroup>
Expand Down
10 changes: 5 additions & 5 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ jobs:
- template: Test-Bash.yml@templates
parameters:
name: 'Test_Linux'
vmImage: 'ubuntu-20.04'
vmImage: 'ubuntu-22.04'
BuildConfiguration: ${{ variables.BuildConfiguration }}

- template: Test-Bash.yml@templates
parameters:
name: 'Test_macOS'
vmImage: 'macOS-11'
vmImage: 'macOS-14'
BuildConfiguration: ${{ variables.BuildConfiguration }}

- template: Pack-MyGet.yml@templates
Expand All @@ -58,7 +58,7 @@ jobs:
- template: Publish-Bash.yml@templates
parameters:
name: 'Publish_Linux'
vmImage: 'ubuntu-20.04'
vmImage: 'ubuntu-22.04'
BuildConfiguration: ${{ variables.BuildConfiguration }}
PublishFramework: ${{ variables.PublishFramework }}
PublishProject: ${{ variables.PublishProject }}
Expand All @@ -67,7 +67,7 @@ jobs:
- template: Publish-Bash.yml@templates
parameters:
name: 'Publish_macOS_x64'
vmImage: 'macOS-11'
vmImage: 'macOS-14'
BuildConfiguration: ${{ variables.BuildConfiguration }}
PublishFramework: ${{ variables.PublishFramework }}
PublishProject: ${{ variables.PublishProject }}
Expand All @@ -76,7 +76,7 @@ jobs:
- template: Publish-Bash.yml@templates
parameters:
name: 'Publish_macOS_arm64'
vmImage: 'macOS-11'
vmImage: 'macOS-14'
BuildConfiguration: ${{ variables.BuildConfiguration }}
PublishFramework: ${{ variables.PublishFramework }}
PublishProject: ${{ variables.PublishProject }}
Expand Down
29 changes: 29 additions & 0 deletions build/TrimmingEnable.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<Project>

<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0')) AND '$(IsTrimmable)' != 'false'">
<SuppressTrimAnalysisWarnings>false</SuppressTrimAnalysisWarnings>
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
<TrimmerSingleWarn>false</TrimmerSingleWarn>
<IsTrimmable>true</IsTrimmable>
</PropertyGroup>

<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
<IsAotCompatible Condition="'$(IsAotCompatible)' == ''">true</IsAotCompatible>
</PropertyGroup>

<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0')) AND '$(ILLinkTreatWarningsAsErrors)' != 'false'">
<ILLinkTreatWarningsAsErrors Condition="'$(ILLinkTreatWarningsAsErrors)' == ''">true</ILLinkTreatWarningsAsErrors>
<!-- Trim warnings -->
<WarningsAsErrors>$(WarningsAsErrors);IL2000;IL2001;IL2002;IL2003;IL2004;IL2005;IL2006;IL2007;IL2008;IL2009;IL2010;IL2011;IL2012;IL2013;IL2014;IL2015;IL2016;IL2017;IL2018;IL2019;IL2020;IL2021;IL2022;IL2023;IL2024;IL2025;IL2026;IL2027;IL2028;IL2029;IL2030;IL2031;IL2032;IL2033;IL2034;IL2035;IL2036;IL2037;IL2038;IL2039;IL2040;IL2041;IL2042;IL2043;IL2044;IL2045;IL2046;IL2047;IL2048;IL2049;IL2050;IL2051;IL2052;IL2053;IL2054;IL2055;IL2056;IL2057;IL2058;IL2059;IL2060;IL2061;IL2062;IL2063;IL2064;IL2065;IL2066;IL2067;IL2068;IL2069;IL2070;IL2071;IL2072;IL2073;IL2074;IL2075;IL2076;IL2077;IL2078;IL2079;IL2080;IL2081;IL2082;IL2083;IL2084;IL2085;IL2086;IL2087;IL2088;IL2089;IL2090;IL2091;IL2092;IL2093;IL2094;IL2095;IL2096;IL2097;IL2098;IL2099;IL2100;IL2101;IL2102;IL2103;IL2104;IL2105;IL2106;IL2107;IL2108;IL2109;IL2110;IL2111;IL2112;IL2113;IL2114;IL2115;IL2116;IL2117;IL2118;IL2119;IL2120;IL2121;IL2122;IL2123;IL2124;IL2125;IL2126;IL2127;IL2128;IL2129;IL2130;IL2131;IL2132;IL2133;IL2134;IL2135;IL2136;IL2137;IL2138;IL2139;IL2140;IL2141;IL2142;IL2143;IL2144;IL2145;IL2146;IL2147;IL2148;IL2149;IL2150;IL2151;IL2152;IL2153;IL2154;IL2155;IL2156;IL2157</WarningsAsErrors>
<!-- NativeAOT warnings -->
<WarningsAsErrors Condition="'$(IsAotCompatible)' == 'true'">$(WarningsAsErrors);IL3050;IL3051;IL3052;IL3053;IL3054;IL3055;IL3056</WarningsAsErrors>
</PropertyGroup>

<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0')) AND '$(EnableRuntimeMarshalling)' != 'true'">
<WarningsAsErrors>$(WarningsAsErrors);CA1420;CA1421</WarningsAsErrors>
</PropertyGroup>
<ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0')) AND '$(EnableRuntimeMarshalling)' != 'true'">
<AssemblyAttribute Include="System.Runtime.CompilerServices.DisableRuntimeMarshallingAttribute" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,25 @@
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
<IsPackable>False</IsPackable>
<Nullable>enable</Nullable>
<PublishAot>true</PublishAot>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Avalonia" />
<PackageReference Include="Avalonia.Desktop" />
<PackageReference Include="Avalonia.Diagnostics" />
<PackageReference Include="Avalonia.Diagnostics" Condition="'$(Configuration)' == 'Debug'" />
<PackageReference Include="Avalonia.Themes.Fluent" />
<PackageReference Include="Avalonia.Fonts.Inter" />
<PackageReference Include="Avalonia.ReactiveUI" />
</ItemGroup>

<ItemGroup>
<!-- This project contains several pages using reflection based behaviors/actions. Make sure all sample types are preserved. -->
<TrimmerRootAssembly Include="BehaviorsTestApplication" />
<!-- It's necessary, so reflection based behaviors/actions can access Avalonia members. Such as Button.Click. -->
<TrimmerRootAssembly Include="Avalonia.Base" />
<TrimmerRootAssembly Include="Avalonia.Controls" />
</ItemGroup>
<!--<Import Project="..\..\build\SignAssembly.props" />-->

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:i="clr-namespace:Avalonia.Xaml.Interactivity;assembly=Avalonia.Xaml.Interactivity"
xmlns:iac="clr-namespace:Avalonia.Xaml.Interactions.Custom;assembly=Avalonia.Xaml.Interactions.Custom"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="using:BehaviorsTestApplication.ViewModels"
x:CompileBindings="True" x:DataType="vm:ItemViewModel"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="BehaviorsTestApplication.Views.ItemView">
x:Class="BehaviorsTestApplication.Controls.EditableItem"
Name="EditableItemUserControl">
<Panel Background="Transparent">
<i:Interaction.Behaviors>
<iac:ShowOnDoubleTappedBehavior TargetControl="TextBoxEdit" />
<iac:ShowOnKeyDownBehavior TargetControl="TextBoxEdit" Key="F2" />
</i:Interaction.Behaviors>
<Interaction.Behaviors>
<ShowOnDoubleTappedBehavior TargetControl="TextBoxEdit" />
<ShowOnKeyDownBehavior TargetControl="TextBoxEdit" Key="F2" />
</Interaction.Behaviors>
<TextBox x:Name="TextBoxEdit"
IsVisible="False"
Height="{Binding #TextStackPanel.Bounds.Height}"
Expand All @@ -21,21 +18,21 @@
Margin="0"
Padding="6,0,6,0"
BorderThickness="0"
Text="{Binding Name, Mode=TwoWay}">
<i:Interaction.Behaviors>
<iac:HideOnKeyPressedBehavior TargetControl="TextBoxEdit" Key="Escape" />
<iac:HideOnKeyPressedBehavior TargetControl="TextBoxEdit" Key="Enter" />
<iac:HideOnLostFocusBehavior TargetControl="TextBoxEdit" />
<iac:SelectAllOnGotFocusBehavior />
</i:Interaction.Behaviors>
Text="{Binding #EditableItemUserControl.Text, Mode=TwoWay}">
<Interaction.Behaviors>
<HideOnKeyPressedBehavior TargetControl="TextBoxEdit" Key="Escape" />
<HideOnKeyPressedBehavior TargetControl="TextBoxEdit" Key="Enter" />
<HideOnLostFocusBehavior TargetControl="TextBoxEdit" />
<TextBoxSelectAllOnGotFocusBehavior />
</Interaction.Behaviors>
</TextBox>
<StackPanel x:Name="TextStackPanel"
Orientation="Horizontal"
Background="Transparent"
Focusable="True"
IsVisible="{Binding !#TextBoxEdit.IsVisible}">
<TextBlock x:Name="StyleTextBlock"
Text="{Binding Name}"
Text="{Binding #EditableItemUserControl.Text}"
Margin="6,8,6,8" />
</StackPanel>
</Panel>
Expand Down
29 changes: 29 additions & 0 deletions samples/BehaviorsTestApplication/Controls/EditableItem.axaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Data;
using Avalonia.Markup.Xaml;

namespace BehaviorsTestApplication.Controls;

public partial class EditableItem : UserControl
{
public static readonly StyledProperty<string?> TextProperty =
TextBlock.TextProperty.AddOwner<EditableItem>(new(
defaultBindingMode: BindingMode.TwoWay));

public string? Text
{
get => GetValue(TextProperty);
set => SetValue(TextProperty, value);
}

public EditableItem()
{
InitializeComponent();
}

private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}
}
2 changes: 1 addition & 1 deletion samples/BehaviorsTestApplication/Program.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using Avalonia;
using Avalonia.ReactiveUI;
using Avalonia.Xaml.Interactions.Core;
using Avalonia.Xaml.Interactivity;

namespace BehaviorsTestApplication;
Expand All @@ -19,6 +18,7 @@ public static AppBuilder BuildAvaloniaApp()
GC.KeepAlive(typeof(Interaction).Assembly);
GC.KeepAlive(typeof(ComparisonConditionType).Assembly);
return AppBuilder.Configure<App>()
.WithInterFont()
.UsePlatformDetect()
.UseReactiveUI()
.LogToTrace();
Expand Down
14 changes: 7 additions & 7 deletions samples/BehaviorsTestApplication/ViewModels/ItemViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
using System.Collections.ObjectModel;
using BehaviorsTestApplication.ViewModels.Core;
using ReactiveUI;

namespace BehaviorsTestApplication.ViewModels;

public class ItemViewModel(string name) : ViewModelBase
public class ItemViewModel(string value) : ViewModelBase
{
private ObservableCollection<ItemViewModel>? _items;
private string? _value = value;

public string Name
public string? Value
{
get => name;
set => this.RaiseAndSetIfChanged(ref name, value);
get => _value;
set => this.RaiseAndSetIfChanged(ref _value, value);
}

public ObservableCollection<ItemViewModel>? Items
Expand All @@ -20,5 +20,5 @@ public ObservableCollection<ItemViewModel>? Items
set => this.RaiseAndSetIfChanged(ref _items, value);
}

public override string ToString() => name;
}
public override string ToString() => _value ?? string.Empty;
}
76 changes: 34 additions & 42 deletions samples/BehaviorsTestApplication/ViewModels/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Reactive.Linq;
using System.Windows.Input;
using BehaviorsTestApplication.ViewModels.Core;
using ReactiveUI;

namespace BehaviorsTestApplication.ViewModels;
Expand Down Expand Up @@ -48,63 +46,57 @@ public MainWindowViewModel()
MoveLeftCommand = ReactiveCommand.Create(() => Position -= 5.0);
MoveRightCommand = ReactiveCommand.Create(() => Position += 5.0);
ResetMoveCommand = ReactiveCommand.Create(() => Position = 100.0);
Items = new ObservableCollection<ItemViewModel>()
{
Items =
[
new("First Item")
{
Items = new ObservableCollection<ItemViewModel>()
{
new("First Item Sub Item 1"),
new("First Item Sub Item 2"),
new("First Item Sub Item 3"),
}
Items =
[
new("First Item Sub Item 1"), new("First Item Sub Item 2"), new("First Item Sub Item 3")
]
},

new("Second Item")
{
Items = new ObservableCollection<ItemViewModel>()
{
new("Second Item Sub Item 1"),
new("Second Item Sub Item 2"),
new("Second Item Sub Item 3"),
}
Items =
[
new("Second Item Sub Item 1"), new("Second Item Sub Item 2"), new("Second Item Sub Item 3")
]
},

new("Third Item")
{
Items = new ObservableCollection<ItemViewModel>()
{
new("Third Item Sub Item 1"),
new("Third Item Sub Item 2"),
new("Third Item Sub Item 3"),
}
Items =
[
new("Third Item Sub Item 1"), new("Third Item Sub Item 2"), new("Third Item Sub Item 3")
]
},

new("Fourth Item")
{
Items = new ObservableCollection<ItemViewModel>()
{
new("Fourth Item Sub Item 1"),
new("Fourth Item Sub Item 2"),
new("Fourth Item Sub Item 3"),
}
Items =
[
new("Fourth Item Sub Item 1"), new("Fourth Item Sub Item 2"), new("Fourth Item Sub Item 3")
]
},

new("Fifth Item")
{
Items = new ObservableCollection<ItemViewModel>()
{
new("Fifth Item Sub Item 1"),
new("Fifth Item Sub Item 2"),
new("Fifth Item Sub Item 3"),
}
Items =
[
new("Fifth Item Sub Item 1"), new("Fifth Item Sub Item 2"), new("Fifth Item Sub Item 3")
]
},

new("Sixth Item")
{
Items = new ObservableCollection<ItemViewModel>()
{
new("Sixth Item Sub Item 1"),
new("Sixth Item Sub Item 2"),
new("Sixth Item Sub Item 3"),
}
},
};
Items =
[
new("Sixth Item Sub Item 1"), new("Sixth Item Sub Item 2"), new("Sixth Item Sub Item 3")
]
}

];

Values = Observable.Interval(TimeSpan.FromSeconds(1)).Select(_ => _value++);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using ReactiveUI;

namespace BehaviorsTestApplication.ViewModels.Core;
namespace BehaviorsTestApplication.ViewModels;

public abstract class ViewModelBase : ReactiveObject
{
}
}
Loading
Loading