- tweak: UI improvement
This commit is contained in:
22
Nebula.Launcher/Views/Popup/ExceptionListView.axaml
Normal file
22
Nebula.Launcher/Views/Popup/ExceptionListView.axaml
Normal file
@@ -0,0 +1,22 @@
|
||||
<UserControl
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d"
|
||||
x:Class="Nebula.Launcher.Views.Popup.ExceptionListView"
|
||||
x:DataType="popup:ExceptionListViewModel"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:popup="clr-namespace:Nebula.Launcher.ViewModels.Popup"
|
||||
xmlns:system="clr-namespace:System;assembly=System.Runtime"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Design.DataContext>
|
||||
<popup:ExceptionListViewModel />
|
||||
</Design.DataContext>
|
||||
<ScrollViewer Margin="10" Padding="0,0,8,0">
|
||||
<ItemsControl
|
||||
Background="#00000000"
|
||||
ItemsSource="{Binding Errors}"
|
||||
Padding="0" />
|
||||
</ScrollViewer>
|
||||
</UserControl>
|
||||
17
Nebula.Launcher/Views/Popup/ExceptionListView.axaml.cs
Normal file
17
Nebula.Launcher/Views/Popup/ExceptionListView.axaml.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using Avalonia.Controls;
|
||||
using Nebula.Launcher.ViewModels.Popup;
|
||||
|
||||
namespace Nebula.Launcher.Views.Popup;
|
||||
|
||||
public partial class ExceptionListView : UserControl
|
||||
{
|
||||
public ExceptionListView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public ExceptionListView(ExceptionListViewModel listViewModel) : this()
|
||||
{
|
||||
DataContext = listViewModel;
|
||||
}
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
<UserControl 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:system="clr-namespace:System;assembly=System.Runtime"
|
||||
xmlns:popup="clr-namespace:Nebula.Launcher.ViewModels.Popup"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="Nebula.Launcher.Views.Popup.ExceptionView"
|
||||
x:DataType="popup:ExceptionViewModel">
|
||||
<Design.DataContext>
|
||||
<popup:ExceptionViewModel />
|
||||
</Design.DataContext>
|
||||
<ScrollViewer Margin="10" Padding="0,0,8,0">
|
||||
<ItemsControl
|
||||
Background="#00000000"
|
||||
ItemsSource="{Binding Errors}"
|
||||
Padding="0">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type system:Exception}">
|
||||
<Border Background="#333333" CornerRadius="5" Margin="0,0,0,5">
|
||||
<StackPanel>
|
||||
<Border Background="#aa2222" CornerRadius="5,5,0,0">
|
||||
<Label Margin="4">
|
||||
<TextBlock Text="{Binding Message}" />
|
||||
</Label>
|
||||
</Border>
|
||||
<Label Margin="4">
|
||||
<TextBlock Text="{Binding StackTrace}" />
|
||||
</Label>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</ScrollViewer>
|
||||
</UserControl>
|
||||
@@ -1,17 +0,0 @@
|
||||
using Avalonia.Controls;
|
||||
using Nebula.Launcher.ViewModels.Popup;
|
||||
|
||||
namespace Nebula.Launcher.Views.Popup;
|
||||
|
||||
public partial class ExceptionView : UserControl
|
||||
{
|
||||
public ExceptionView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public ExceptionView(ExceptionViewModel viewModel) : this()
|
||||
{
|
||||
DataContext = viewModel;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user