WPF基础-5-DockPanel3对话框
This commit is contained in:
parent
71e145a44f
commit
1031be446f
|
@ -0,0 +1,9 @@
|
||||||
|
<Application x:Class="WPF基础_5_DockPanel0对话框.App"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:local="clr-namespace:WPF基础_5_DockPanel0对话框"
|
||||||
|
StartupUri="MainWindow.xaml">
|
||||||
|
<Application.Resources>
|
||||||
|
|
||||||
|
</Application.Resources>
|
||||||
|
</Application>
|
|
@ -0,0 +1,12 @@
|
||||||
|
using System.Configuration;
|
||||||
|
using System.Data;
|
||||||
|
using System.Windows;
|
||||||
|
|
||||||
|
namespace WPF基础_5_DockPanel0对话框;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for App.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class App : Application
|
||||||
|
{
|
||||||
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
using System.Windows;
|
||||||
|
|
||||||
|
[assembly: ThemeInfo(
|
||||||
|
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
|
||||||
|
//(used if a resource is not found in the page,
|
||||||
|
// or application resource dictionaries)
|
||||||
|
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
|
||||||
|
//(used if a resource is not found in the page,
|
||||||
|
// app, or any theme specific resource dictionaries)
|
||||||
|
)]
|
|
@ -0,0 +1,28 @@
|
||||||
|
<Window x:Class="WPF基础_5_DockPanel0对话框.MainWindow"
|
||||||
|
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
Title="MainWindow" Height="350" Width="500">
|
||||||
|
<DockPanel LastChildFill="True">
|
||||||
|
<StackPanel DockPanel.Dock="Bottom" HorizontalAlignment="Right" Orientation="Horizontal" Margin="10">
|
||||||
|
<Button Margin="0 0 2 0" Padding="3" Click="ButtonBase_OnClick"> 确认</Button>
|
||||||
|
<Button Margin="2 0 0 0 " Padding="3" Click="ButtonBase_OnClick"> 取消</Button>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<Border DockPanel.Dock="Top" BorderBrush="Red" Background="Pink" BorderThickness="10" CornerRadius="6"
|
||||||
|
Margin="10">
|
||||||
|
<TextBox Padding="3" TextWrapping="Wrap" Margin="30" AcceptsReturn="True">
|
||||||
|
这是消息提示
|
||||||
|
</TextBox>
|
||||||
|
</Border>
|
||||||
|
</DockPanel>
|
||||||
|
</Window>
|
||||||
|
<!-- <DockPanel LastChildFill="True"> -->
|
||||||
|
<!-- <StackPanel DockPanel.Dock="Bottom" HorizontalAlignment="Right" Orientation="Horizontal" Margin="10"> -->
|
||||||
|
<!-- <Button Margin="0 0 5 0" Padding="3" Click="ButtonBase_OnClick">确认</Button> -->
|
||||||
|
<!-- <Button Margin="5 0 0 0" Padding="3">取消</Button> -->
|
||||||
|
<!-- </StackPanel> -->
|
||||||
|
<!-- <TextBox HorizontalAlignment="Stretch" DockPanel.Dock="Top" Margin="10">对话框</TextBox> -->
|
||||||
|
<!-- </DockPanel> -->
|
|
@ -0,0 +1,20 @@
|
||||||
|
using System.Windows;
|
||||||
|
|
||||||
|
namespace WPF基础_5_DockPanel0对话框;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for MainWindow.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class MainWindow : Window
|
||||||
|
{
|
||||||
|
public MainWindow()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
MessageBox.Show("我知道了", "你要退出了!");
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>WinExe</OutputType>
|
||||||
|
<TargetFramework>net8.0-windows</TargetFramework>
|
||||||
|
<RootNamespace>WPF基础_5_DockPanel0对话框</RootNamespace>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<UseWPF>true</UseWPF>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
</Project>
|
|
@ -20,6 +20,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF基础-5-DockPanel1", "W
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF基础-5-DockPanel2", "WPF基础-5-DockPanel2\WPF基础-5-DockPanel2.csproj", "{492BB6A7-437F-4E7B-BCA8-3C8BB624B8C7}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF基础-5-DockPanel2", "WPF基础-5-DockPanel2\WPF基础-5-DockPanel2.csproj", "{492BB6A7-437F-4E7B-BCA8-3C8BB624B8C7}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF基础-5-DockPanel3对话框", "WPF基础-5-DockPanel3对话框\WPF基础-5-DockPanel3对话框.csproj", "{7165AC1A-72DD-4124-A9F1-1CA0205111B8}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
@ -66,5 +68,9 @@ Global
|
||||||
{492BB6A7-437F-4E7B-BCA8-3C8BB624B8C7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{492BB6A7-437F-4E7B-BCA8-3C8BB624B8C7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{492BB6A7-437F-4E7B-BCA8-3C8BB624B8C7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{492BB6A7-437F-4E7B-BCA8-3C8BB624B8C7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{492BB6A7-437F-4E7B-BCA8-3C8BB624B8C7}.Release|Any CPU.Build.0 = Release|Any CPU
|
{492BB6A7-437F-4E7B-BCA8-3C8BB624B8C7}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{7165AC1A-72DD-4124-A9F1-1CA0205111B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{7165AC1A-72DD-4124-A9F1-1CA0205111B8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{7165AC1A-72DD-4124-A9F1-1CA0205111B8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{7165AC1A-72DD-4124-A9F1-1CA0205111B8}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
EndGlobal
|
EndGlobal
|
||||||
|
|
Loading…
Reference in New Issue