feat: WPF基础-9-InkCanvas1
This commit is contained in:
parent
ab7486cc6b
commit
08630d8574
|
@ -0,0 +1,9 @@
|
|||
<Application x:Class="WPF基础_9_InkCanvas1.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:WPF基础_9_InkCanvas1"
|
||||
StartupUri="MainWindow.xaml">
|
||||
<Application.Resources>
|
||||
|
||||
</Application.Resources>
|
||||
</Application>
|
|
@ -0,0 +1,12 @@
|
|||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Windows;
|
||||
|
||||
namespace WPF基础_9_InkCanvas1;
|
||||
|
||||
/// <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,22 @@
|
|||
<Window x:Class="WPF基础_9_InkCanvas1.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"
|
||||
Icon="public/logo/1.ico"
|
||||
Title="WPF基础_9_InkCanvas1" Height="450" Width="800">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<InkCanvas Grid.Row="1" Name="MyInkCanvas" Background="LightYellow" EditingMode="Ink">
|
||||
<Button>按钮</Button>
|
||||
<Image Source="public/images/003540AH4M72.jpg" InkCanvas.Top="10" InkCanvas.Left="10" Width="287"
|
||||
Height="319" />
|
||||
</InkCanvas>
|
||||
</Grid>
|
||||
|
||||
</Window>
|
|
@ -0,0 +1,20 @@
|
|||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace WPF基础_9_InkCanvas1;
|
||||
|
||||
/// <summary>
|
||||
/// Interaction logic for MainWindow.xaml
|
||||
/// </summary>
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void SelectButton_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
MyInkCanvas.EditingMode = InkCanvasEditingMode.Select;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net8.0-windows</TargetFramework>
|
||||
<RootNamespace>WPF基础_9_InkCanvas1</RootNamespace>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<UseWPF>true</UseWPF>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Resource Include="public\logo\1.ico">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Resource>
|
||||
<Resource Include="public\logo\1.png">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Resource>
|
||||
<None Remove="public\images\003540AH4M72.jpg"/>
|
||||
<Resource Include="public\images\003540AH4M72.jpg">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Resource>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
Binary file not shown.
After Width: | Height: | Size: 97 KiB |
Binary file not shown.
After Width: | Height: | Size: 9.4 KiB |
Binary file not shown.
After Width: | Height: | Size: 25 KiB |
|
@ -46,6 +46,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF基础-6-UniformGrid1",
|
|||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF基础-7-Canvas1", "WPF基础-7-Canvas1\WPF基础-7-Canvas1.csproj", "{0FE46719-7B96-4FFF-905B-E19DAF4A1474}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF基础-9-InkCanvas1", "WPF基础-9-InkCanvas1\WPF基础-9-InkCanvas1.csproj", "{78BD3D1C-1144-47CF-AAF1-E8401D7A769D}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
@ -144,5 +146,9 @@ Global
|
|||
{0FE46719-7B96-4FFF-905B-E19DAF4A1474}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0FE46719-7B96-4FFF-905B-E19DAF4A1474}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0FE46719-7B96-4FFF-905B-E19DAF4A1474}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{78BD3D1C-1144-47CF-AAF1-E8401D7A769D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{78BD3D1C-1144-47CF-AAF1-E8401D7A769D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{78BD3D1C-1144-47CF-AAF1-E8401D7A769D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{78BD3D1C-1144-47CF-AAF1-E8401D7A769D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
Loading…
Reference in New Issue