增加Prism 框架
This commit is contained in:
1 parent
2cd6b8db86
commit
726eb6de16
99 files changed
+12527
No files matched your search
@@ -0,0 +1,16 @@
|
||||
<UserControl
|
||||
x:Class="Main.Test.Views.HeaderView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:Main.Test.Views"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:tf="Trade.Framework"
|
||||
xmlns:vm="clr-namespace:Main.Test.ViewModels"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800" DataContext="{tf:DISource Type=vm:HeaderViewModel}"
|
||||
mc:Ignorable="d">
|
||||
<Grid>
|
||||
<Button Command="{Binding ccCommand}" Content="abc" />
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace Main.Test.Views;
|
||||
|
||||
/// <summary>
|
||||
/// HeaderView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class HeaderView : UserControl
|
||||
{
|
||||
public HeaderView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
<UserControl x:Class="Main.Test.Views.bbbDialogView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:Main.Test.Views"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<Grid>
|
||||
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,57 @@
|
||||
using Prism.Services.Dialogs;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using Trade.Framework.Services;
|
||||
|
||||
namespace Main.Test.Views;
|
||||
|
||||
/// <summary>
|
||||
/// bbbDialogView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class bbbDialogView : UserControl
|
||||
{
|
||||
public bbbDialogView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
public class bbbDialogViewModel : IDialogAware
|
||||
{
|
||||
private readonly IUserManager _user;
|
||||
|
||||
public bbbDialogViewModel(IUserManager user)
|
||||
{
|
||||
_user = user;
|
||||
}
|
||||
public string Title => "ttt";
|
||||
|
||||
public event Action<IDialogResult> RequestClose;
|
||||
|
||||
public bool CanCloseDialog()
|
||||
{
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public void OnDialogClosed()
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
public void OnDialogOpened(IDialogParameters parameters)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user