feat: WPF控件-2-鼠标光标
This commit is contained in:
parent
58ca99a706
commit
47facf0670
|
@ -0,0 +1,9 @@
|
|||
<Application x:Class="WPF控件_2_鼠标光标.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:WPF控件_2_鼠标光标"
|
||||
StartupUri="MainWindow.xaml">
|
||||
<Application.Resources>
|
||||
|
||||
</Application.Resources>
|
||||
</Application>
|
|
@ -0,0 +1,12 @@
|
|||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Windows;
|
||||
|
||||
namespace WPF控件_2_鼠标光标;
|
||||
|
||||
/// <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,12 @@
|
|||
<Window x:Class="WPF控件_2_鼠标光标.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="WPF控件_2_鼠标光标" Height="450" Width="800">
|
||||
<StackPanel HorizontalAlignment="Left">
|
||||
<Button Cursor="Help" Padding="15 5">帮助</Button>
|
||||
<Button Padding="15 5">等待</Button>
|
||||
</StackPanel>
|
||||
</Window>
|
|
@ -0,0 +1,21 @@
|
|||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace WPF控件_2_鼠标光标;
|
||||
|
||||
/// <summary>
|
||||
/// Interaction logic for MainWindow.xaml
|
||||
/// </summary>
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
// 当前光标变为等待图标
|
||||
Cursor = Cursors.Wait;
|
||||
|
||||
// 覆盖之前元素上的光标
|
||||
Mouse.OverrideCursor = Cursors.Pen;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net8.0-windows</TargetFramework>
|
||||
<RootNamespace>WPF控件_2_鼠标光标</RootNamespace>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<UseWPF>true</UseWPF>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
|
@ -2,6 +2,8 @@
|
|||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF控件-1-设置颜色", "WPF控件-1-设置颜色\WPF控件-1-设置颜色.csproj", "{5D1AD019-4A90-48E2-815A-35EE2B002BD2}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF控件-2-鼠标光标", "WPF控件-2-鼠标光标\WPF控件-2-鼠标光标.csproj", "{C4F2DF6D-2982-419E-8027-CCAD24BC9A4F}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
@ -12,5 +14,9 @@ Global
|
|||
{5D1AD019-4A90-48E2-815A-35EE2B002BD2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5D1AD019-4A90-48E2-815A-35EE2B002BD2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5D1AD019-4A90-48E2-815A-35EE2B002BD2}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C4F2DF6D-2982-419E-8027-CCAD24BC9A4F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C4F2DF6D-2982-419E-8027-CCAD24BC9A4F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C4F2DF6D-2982-419E-8027-CCAD24BC9A4F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C4F2DF6D-2982-419E-8027-CCAD24BC9A4F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
Loading…
Reference in New Issue