* Datagrid fixes
This commit is contained in:
parent
defcc0b360
commit
cd2a9d72aa
@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
using Avalonia;
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Avalonia.Controls.ApplicationLifetimes;
|
using Avalonia.Controls.ApplicationLifetimes;
|
||||||
@ -6,6 +7,7 @@ using Avalonia.Markup.Xaml;
|
|||||||
using Avalonia.Styling;
|
using Avalonia.Styling;
|
||||||
using Avalonia.Themes.Fluent;
|
using Avalonia.Themes.Fluent;
|
||||||
using Avalonia.Themes.Simple;
|
using Avalonia.Themes.Simple;
|
||||||
|
|
||||||
using AvaloniaCoreRTDemo.Interfaces;
|
using AvaloniaCoreRTDemo.Interfaces;
|
||||||
using AvaloniaCoreRTDemo.Windows;
|
using AvaloniaCoreRTDemo.Windows;
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ namespace AvaloniaCoreRTDemo.Controls
|
|||||||
|
|
||||||
public void Reload(IMainWindowState? model)
|
public void Reload(IMainWindowState? model)
|
||||||
{
|
{
|
||||||
if(model is not null)
|
if (model is not null)
|
||||||
this.DataContext = new MainControlViewModel(model);
|
this.DataContext = new MainControlViewModel(model);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.IO;
|
|
||||||
|
|
||||||
using Avalonia.Media.Imaging;
|
using Avalonia.Media.Imaging;
|
||||||
using AvaloniaCoreRTDemo.Interfaces;
|
|
||||||
using ReactiveUI;
|
using ReactiveUI;
|
||||||
|
|
||||||
namespace AvaloniaCoreRTDemo.Controls.ViewModels
|
namespace AvaloniaCoreRTDemo.Controls.ViewModels
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
using Avalonia.Controls;
|
namespace AvaloniaCoreRTDemo.Interfaces
|
||||||
|
|
||||||
namespace AvaloniaCoreRTDemo.Interfaces
|
|
||||||
{
|
{
|
||||||
public interface IMainWindow
|
public interface IMainWindow
|
||||||
{
|
{
|
||||||
|
@ -1,15 +1,16 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
using Avalonia.Media.Imaging;
|
using Avalonia.Media.Imaging;
|
||||||
|
|
||||||
namespace AvaloniaCoreRTDemo
|
namespace AvaloniaCoreRTDemo
|
||||||
{
|
{
|
||||||
public interface IMainWindowState
|
public interface IMainWindowState
|
||||||
{
|
{
|
||||||
IBitmap DotNetImage { get; }
|
IBitmap DotNetImage { get; }
|
||||||
IBitmap AvaloniaImage { get; }
|
IBitmap AvaloniaImage { get; }
|
||||||
String? Text { get; }
|
String? Text { get; }
|
||||||
|
|
||||||
void SetUnloadable();
|
void SetUnloadable();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
using Avalonia;
|
using Avalonia;
|
||||||
using Avalonia.Media.Imaging;
|
using Avalonia.Media.Imaging;
|
||||||
using Avalonia.Platform;
|
using Avalonia.Platform;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
<Grid VerticalAlignment="Top" HorizontalAlignment="Left" ColumnDefinitions="Auto,*">
|
<Grid VerticalAlignment="Top" HorizontalAlignment="Left" ColumnDefinitions="Auto,*">
|
||||||
<Image Margin="0, 60" Grid.Column="0" Stretch="None" Source="{Binding ComputerImage}" VerticalAlignment="Top" HorizontalAlignment="Left">
|
<Image Margin="0, 60" Grid.Column="0" Stretch="None" Source="{Binding ComputerImage}" VerticalAlignment="Top" HorizontalAlignment="Left">
|
||||||
</Image>
|
</Image>
|
||||||
<DataGrid Grid.Column="1" Items="{Binding SystemDetails}" IsReadOnly="True">
|
<DataGrid Grid.Column="1" Items="{Binding SystemDetails}" IsReadOnly="True" CanUserReorderColumns="False" CanUserSortColumns="False" CanUserResizeColumns="False" HeadersVisibility="None">
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
<DataGridTextColumn Header="Key" Binding="{Binding Key, x:DataType=viewModels:SystemDetail}" FontWeight="Bold" />
|
<DataGridTextColumn Header="Key" Binding="{Binding Key, x:DataType=viewModels:SystemDetail}" FontWeight="Bold" />
|
||||||
<DataGridTextColumn Header="Value" Binding="{Binding Value, x:DataType=viewModels:SystemDetail}" />
|
<DataGridTextColumn Header="Value" Binding="{Binding Value, x:DataType=viewModels:SystemDetail}" />
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
using Avalonia;
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Avalonia.Markup.Xaml;
|
using Avalonia.Markup.Xaml;
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
using System;
|
|
||||||
using Avalonia;
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Avalonia.Controls.ApplicationLifetimes;
|
|
||||||
using Avalonia.Markup.Xaml;
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
using AvaloniaCoreRTDemo.Controls;
|
using AvaloniaCoreRTDemo.Controls;
|
||||||
using AvaloniaCoreRTDemo.Controls.ViewModels;
|
|
||||||
using AvaloniaCoreRTDemo.Interfaces;
|
using AvaloniaCoreRTDemo.Interfaces;
|
||||||
using AvaloniaCoreRTDemo.Windows.ViewModels;
|
using AvaloniaCoreRTDemo.Windows.ViewModels;
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Reactive;
|
using System.Reactive;
|
||||||
|
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
|
||||||
using AvaloniaCoreRTDemo.Interfaces;
|
using AvaloniaCoreRTDemo.Interfaces;
|
||||||
|
@ -1,10 +1,6 @@
|
|||||||
using System;
|
using Avalonia.Controls;
|
||||||
using System.Reactive;
|
|
||||||
|
|
||||||
using Avalonia.Controls;
|
|
||||||
using AvaloniaCoreRTDemo.Controls.ViewModels;
|
|
||||||
using AvaloniaCoreRTDemo.Interfaces;
|
using AvaloniaCoreRTDemo.Interfaces;
|
||||||
using ReactiveUI;
|
|
||||||
|
|
||||||
namespace AvaloniaCoreRTDemo.Windows.ViewModels
|
namespace AvaloniaCoreRTDemo.Windows.ViewModels
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user