Skip to content

Commit

Permalink
Merge pull request #249 from irihitech/enhance
Browse files Browse the repository at this point in the history
Several Enhancements
  • Loading branch information
rabbitism authored Aug 29, 2023
2 parents de578d3 + d54e4ab commit 255e21d
Show file tree
Hide file tree
Showing 14 changed files with 79 additions and 207 deletions.
11 changes: 0 additions & 11 deletions demo/Semi.Avalonia.Demo.Android/App.axaml

This file was deleted.

10 changes: 7 additions & 3 deletions demo/Semi.Avalonia.Demo.Android/MainActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@

namespace Semi.Avalonia.Demo.Android;

[Activity(Label = "Semi.Avalonia.Demo.Android", Icon = "@drawable/Icon", MainLauncher = true, Theme = "@style/MyTheme.NoActionBar",
LaunchMode = LaunchMode.SingleTop, ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.ScreenSize | ConfigChanges.UiMode)]
[Activity(
Label = "Semi.Avalonia",
Theme = "@style/MyTheme.NoActionBar",
Icon = "@drawable/Icon",
MainLauncher = true,
LaunchMode = LaunchMode.SingleTop,
ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.ScreenSize | ConfigChanges.UiMode)]
public class MainActivity : AvaloniaMainActivity<App>
{

}
11 changes: 0 additions & 11 deletions demo/Semi.Avalonia.Demo.Android/Views/MainView.axaml

This file was deleted.

18 changes: 0 additions & 18 deletions demo/Semi.Avalonia.Demo.Android/Views/MainView.axaml.cs

This file was deleted.

13 changes: 0 additions & 13 deletions demo/Semi.Avalonia.Demo.Desktop/App.axaml

This file was deleted.

23 changes: 0 additions & 23 deletions demo/Semi.Avalonia.Demo.Desktop/App.axaml.cs

This file was deleted.

13 changes: 0 additions & 13 deletions demo/Semi.Avalonia.Demo.Drm/App.axaml

This file was deleted.

24 changes: 0 additions & 24 deletions demo/Semi.Avalonia.Demo.Drm/App.axaml.cs

This file was deleted.

23 changes: 0 additions & 23 deletions demo/Semi.Avalonia.Demo.Web/App.axaml.cs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Application
x:Class="Semi.Avalonia.Demo.Web.App"
x:Class="Semi.Avalonia.Demo.App"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Application.Styles>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Markup.Xaml;
using Semi.Avalonia.Demo.Views;

namespace Semi.Avalonia.Demo.Android;
namespace Semi.Avalonia.Demo;

public partial class App : Application
{
Expand All @@ -15,13 +14,16 @@ public override void Initialize()

public override void OnFrameworkInitializationCompleted()
{
if (ApplicationLifetime is ISingleViewApplicationLifetime single)
switch (ApplicationLifetime)
{
single.MainView = new MainView()
{

};
case IClassicDesktopStyleApplicationLifetime desktop:
desktop.MainWindow = new MainWindow();
break;
case ISingleViewApplicationLifetime singleView:
singleView.MainView = new MainView();
break;
}

base.OnFrameworkInitializationCompleted();
}
}
20 changes: 10 additions & 10 deletions demo/Semi.Avalonia.Demo/Pages/FlyoutDemo.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,22 +129,22 @@
<Button.Flyout>
<Flyout FlyoutPresenterTheme="{StaticResource LightFlyout}" Placement="Top">
<StackPanel>
<Label Classes="Amber" Theme="{StaticResource TagLabel}">Amber</Label>
<Label Classes="Red" Theme="{StaticResource TagLabel}">Red</Label>
<Label Classes="Pink" Theme="{StaticResource TagLabel}">Pink</Label>
<Label Classes="Purple" Theme="{StaticResource TagLabel}">Purple</Label>
<Label Classes="Violet" Theme="{StaticResource TagLabel}">Violet</Label>
<Label Classes="Indigo" Theme="{StaticResource TagLabel}">Indigo</Label>
<Label Classes="Blue" Theme="{StaticResource TagLabel}">Blue</Label>
<Label Classes="LightBlue" Theme="{StaticResource TagLabel}">LightBlue</Label>
<Label Classes="Cyan" Theme="{StaticResource TagLabel}">Cyan</Label>
<Label Classes="Teal" Theme="{StaticResource TagLabel}">Teal</Label>
<Label Classes="Green" Theme="{StaticResource TagLabel}">Green</Label>
<Label Classes="Grey" Theme="{StaticResource TagLabel}">Grey</Label>
<Label Classes="Indigo" Theme="{StaticResource TagLabel}">Indigo</Label>
<Label Classes="LightBlue" Theme="{StaticResource TagLabel}">LightBlue</Label>
<Label Classes="LightGreen" Theme="{StaticResource TagLabel}">LightGreen</Label>
<Label Classes="Lime" Theme="{StaticResource TagLabel}">Lime</Label>
<Label Classes="Orange" Theme="{StaticResource TagLabel}">Orange</Label>
<Label Classes="Pink" Theme="{StaticResource TagLabel}">Pink</Label>
<Label Classes="Purple" Theme="{StaticResource TagLabel}">Purple</Label>
<Label Classes="Red" Theme="{StaticResource TagLabel}">Red</Label>
<Label Classes="Teal" Theme="{StaticResource TagLabel}">Teal</Label>
<Label Classes="Violet" Theme="{StaticResource TagLabel}">Violet</Label>
<Label Classes="Yellow" Theme="{StaticResource TagLabel}">Yellow</Label>
<Label Classes="Amber" Theme="{StaticResource TagLabel}">Amber</Label>
<Label Classes="Orange" Theme="{StaticResource TagLabel}">Orange</Label>
<Label Classes="Grey" Theme="{StaticResource TagLabel}">Grey</Label>
<Label Classes="White" Theme="{StaticResource TagLabel}">White</Label>
</StackPanel>
</Flyout>
Expand Down
2 changes: 2 additions & 0 deletions demo/Semi.Avalonia.Demo/Pages/SelectableTextBlock.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
</Style>
</StackPanel.Styles>
<HeaderedContentControl
Width="400"
Height="400"
Margin="16"
VerticalAlignment="Top"
Expand Down Expand Up @@ -95,6 +96,7 @@
</Grid>
</HeaderedContentControl>
<HeaderedContentControl
Width="400"
Height="400"
Margin="16"
VerticalAlignment="Top"
Expand Down
Loading

0 comments on commit 255e21d

Please sign in to comment.