WIn_RustTools/RustTools/Views/ConcernPage.xaml.cs

60 lines
1.5 KiB
C#
Raw Normal View History

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Controls.Primitives;
using Microsoft.UI.Xaml.Data;
using Microsoft.UI.Xaml.Input;
using Microsoft.UI.Xaml.Media;
using Microsoft.UI.Xaml.Navigation;
using RustTools.muqing;
using RustTools.ViewModels;
using Windows.Foundation;
using Windows.Foundation.Collections;
// To learn more about WinUI, the WinUI project structure,
// and more about our project templates, see: http://aka.ms/winui-project-info.
namespace RustTools.Views;
/// <summary>
/// <20><>̬<EFBFBD><CCAC><EFBFBD><EFBFBD>
/// </summary>
public sealed partial class ConcernPage : Page
{
public ConcernViewModel ViewModels { get; set; }
public ConcernPage()
{
ViewModels = App.GetService<ConcernViewModel>();
InitializeComponent();
}
private void ItemsView_ItemInvoked(ItemsView sender, ItemsViewItemInvokedEventArgs args)
{
}
private void Page_SizeChanged(object sender, SizeChangedEventArgs e)
{
var height = ActualHeight; // ȷ<><C8B7>ʹ<EFBFBD><CAB9>ҳ<EFBFBD><D2B3><EFBFBD><EFBFBD>ʵ<EFBFBD>ʸ߶<CAB8>
// <20><><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD>Ϊ<EFBFBD><CEAA>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD>ֵ
if (!double.IsNaN(height) && !double.IsInfinity(height) && height > 16)
{
ListViewA.Height = height - 16;
ListViewB.Height = height - 16;
}
else
{
ListViewA.Height = 500; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD>Ĭ<EFBFBD><C4AC>ֵ
ListViewB.Height = 500; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD>Ĭ<EFBFBD><C4AC>ֵ
}
}
}