背水一战 Windows 10 (31) - 控件(按钮类): ButtonBase, Button, HyperlinkButton, RepeatButton, ToggleButton, AppBarButton, AppBarToggleButton
作者:webabcd
介绍
背水一战 Windows 10 之 控件(按钮类)
- ButtonBase
- Button
- HyperlinkButton
- RepeatButton
- ToggleButton
- AppBarButton
- AppBarToggleButton
示例
1、ButtonBase(基类) 的示例
Controls/ButtonControl/ButtonBaseDemo.xaml
<Page
x:Class="Windows10.Controls.ButtonControl.ButtonBaseDemo"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Windows10.Controls.ButtonControl"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"> <Grid Background="Transparent">
<StackPanel Margin="10 0 10 10" Name="root"> <!--
Button - 按钮控件,继承自 ButtonBase,下面介绍 ButtonBase 的相关知识点
Click - 单击事件
ClickMode - 引发 Click 事件的模式:ClickMode.Release(默认值), ClickMode.Press, ClickMode.Hover
IsPointerOver - 设备指针(鼠标或手指等)是否在按钮上
IsPressed - 当前按钮是否处于按下的状态
Command - 参见“绑定”部分
CommandParameter - 参见“绑定”部分
-->
<Button Name="button1" Content="我是 button1" ClickMode="Release" Click="button1_Click" Margin="5" />
<Button Name="button2" Content="我是 button2" ClickMode="Press" Click="button2_Click" Margin="5" />
<Button Name="button3" Content="我是 button3" ClickMode="Hover" Click="button3_Click" Margin="5" /> <TextBlock Name="lblMsg1" Margin="5" />
<TextBlock Name="lblMsg2" Margin="5" /> </StackPanel>
</Grid>
</Page>
Controls/ButtonControl/ButtonBaseDemo.xaml.cs
/*
* ButtonBase(基类) - 按钮控件基类(继承自 ContentControl, 请参见 /Controls/BaseControl/ContentControlDemo/)
*/ using System;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls; namespace Windows10.Controls.ButtonControl
{
public sealed partial class ButtonBaseDemo : Page
{
public ButtonBaseDemo()
{
this.InitializeComponent(); this.Loaded += ButtonBaseDemo_Loaded;
} private void ButtonBaseDemo_Loaded(object sender, RoutedEventArgs e)
{
DispatcherTimer dTimer = new DispatcherTimer();
dTimer.Interval = TimeSpan.Zero;
dTimer.Tick += DTimer_Tick;
dTimer.Start();
} private void DTimer_Tick(object sender, object e)
{
lblMsg1.Text = $"button1 IsPointerOver:{button1.IsPointerOver}, IsPressed:{button1.IsPressed}";
lblMsg1.Text += Environment.NewLine;
lblMsg1.Text += $"button2 IsPointerOver:{button2.IsPointerOver}, IsPressed:{button2.IsPressed}";
lblMsg1.Text += Environment.NewLine;
// 鼠标移动到 button3 上时,其 IsPointerOver 和 IsPressed 均为 true,因为其 ClickMode 为 Hover
lblMsg1.Text += $"button3 IsPointerOver:{button3.IsPointerOver}, IsPressed:{button3.IsPressed}";
} // ClickMode.Release - 鼠标按下并抬起即触发 Click 事件(默认值)
private void button1_Click(object sender, RoutedEventArgs e)
{
lblMsg2.Text += "button1 ClickMode.Release";
lblMsg2.Text += Environment.NewLine;
} // ClickMode.Press - 鼠标按下即触发 Click 事件
private void button2_Click(object sender, RoutedEventArgs e)
{
lblMsg2.Text += "button2 ClickMode.Press";
lblMsg2.Text += Environment.NewLine;
} // ClickMode.Hover - 鼠标经过即触发 Click 事件
private void button3_Click(object sender, RoutedEventArgs e)
{
lblMsg2.Text += "button3 ClickMode.Hover";
lblMsg2.Text += Environment.NewLine;
}
}
}
2、Button 的示例
Controls/ButtonControl/ButtonDemo.xaml
<Page
x:Class="Windows10.Controls.ButtonControl.ButtonDemo"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Windows10.Controls.ButtonControl"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"> <Grid Background="Transparent">
<StackPanel Margin="10 0 10 10" Name="root"> <!--
Button - 按钮控件
Flyout - 按钮控件关联的 FlyoutBase 控件
-->
<Button Name="button1" Content="按我弹出 Flyout" Margin="5">
<Button.Flyout>
<Flyout>
<StackPanel>
<TextBlock>我是 Flyout 中的内容</TextBlock>
</StackPanel>
</Flyout>
</Button.Flyout>
</Button> </StackPanel>
</Grid>
</Page>
Controls/ButtonControl/ButtonDemo.xaml.cs
/*
* Button - 按钮控件(继承自 ButtonBase, 请参见 /Controls/ButtonControl/ButtonBaseDemo.xaml)
*/ using Windows.UI.Xaml.Controls; namespace Windows10.Controls.ButtonControl
{
public sealed partial class ButtonDemo : Page
{
public ButtonDemo()
{
this.InitializeComponent();
}
}
}
3、HyperlinkButton 的示例
Controls/ButtonControl/HyperlinkButtonDemo.xaml
<Page
x:Class="Windows10.Controls.ButtonControl.HyperlinkButtonDemo"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Windows10.Controls.ButtonControl"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"> <Grid Background="Transparent">
<StackPanel Margin="10 0 10 10"> <!--
HyperlinkButton - 带超链接的按钮
NavigateUri - 按钮要导航到的 Uri
-->
<HyperlinkButton Name="btnLink" Content="webabcd blog" FontSize="36" Foreground="Blue" NavigateUri="http://webabcd.cnblogs.com" /> </StackPanel>
</Grid>
</Page>
Controls/ButtonControl/HyperlinkButtonDemo.xaml.cs
/*
* HyperlinkButton - 超链按钮(继承自 ButtonBase, 请参见 /Controls/ButtonControl/ButtonBaseDemo.xaml)
*/ using Windows.UI.Xaml.Controls; namespace Windows10.Controls.ButtonControl
{
public sealed partial class HyperlinkButtonDemo : Page
{
public HyperlinkButtonDemo()
{
this.InitializeComponent();
}
}
}
4、RepeatButton 的示例
Controls/ButtonControl/RepeatButtonDemo.xaml
<Page
x:Class="Windows10.Controls.ButtonControl.RepeatButtonDemo"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Windows10.Controls.ButtonControl"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"> <Grid Background="Transparent">
<StackPanel Margin="10 0 10 10"> <TextBlock Name="lblMsg" TextWrapping="Wrap" Margin="5" /> <!--
RepeatButton - 按住后会重复触发 Click 事件的按钮
Delay - 按住按钮后,会先触发一次 Click 事件,然后在此属性指定的时间后开始重复触发 Click 事件,单位毫秒,默认值 250
Interval - 重复触发 Click 事件时,这个重复时间的间隔,单位毫秒,默认值 250 注:Button 的 ClickMode 默认为 Release,而 RepeatButton 的 ClickMode 默认为 Press
-->
<RepeatButton Name="repeatButton" Content="按住" Delay="1000" Interval="250" Click="repeatButton_Click" Margin="5" /> </StackPanel>
</Grid>
</Page>
Controls/ButtonControl/RepeatButtonDemo.xaml.cs
/*
* RepeatButton - 按住后会重复触发 Click 事件的按钮(继承自 ButtonBase, 请参见 /Controls/ButtonControl/ButtonBaseDemo.xaml)
*/ using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls; namespace Windows10.Controls.ButtonControl
{
public sealed partial class RepeatButtonDemo : Page
{
public RepeatButtonDemo()
{
this.InitializeComponent();
} private void repeatButton_Click(object sender, RoutedEventArgs e)
{
lblMsg.Text += "x";
}
}
}
5、ToggleButton 的示例
Controls/ButtonControl/ToggleButtonDemo.xaml
<Page
x:Class="Windows10.Controls.ButtonControl.ToggleButtonDemo"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Windows10.Controls.ButtonControl"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"> <Grid Background="Transparent">
<StackPanel Margin="10 0 10 10"> <TextBlock Name="lblMsg" Margin="5" /> <!--
ToggleButton - 可切换状态的按钮
IsThreeState - 是否支持 3 状态(默认值: false)
IsChecked - 按钮的选中状态: false, true, null(修改此属性后会触发 Checked 事件或 Unchecked 事件或 Indeterminate 事件)
Checked - 按钮变为选中状态后所触发的事件
Unchecked - 按钮变为未选中状态后所触发的事件
Indeterminate - 按钮变为不确定状态后所触发的事件
-->
<ToggleButton Name="toggleButton1" Content="可切换状态的按钮" Margin="5"
IsThreeState="False"
Checked="toggleButton1_Checked"
Unchecked="toggleButton1_Unchecked"
Indeterminate="toggleButton1_Indeterminate" /> <ToggleButton Name="toggleButton2" Content="可切换状态的按钮" Margin="5"
IsThreeState="True"
Checked="toggleButton2_Checked"
Unchecked="toggleButton2_Unchecked"
Indeterminate="toggleButton2_Indeterminate" /> <!--
此处文本框显示的结果如下:
toggleButton3_Checked
toggleButton3_Loaded
Page_Loaded
-->
<TextBlock Name="lblToggleButton3" Margin="5 20 0 0" /> <!--
对于 IsChecked="True" 的 ToggleButton 控件来说,在它触发 Loaded 事件之前会先触发 Checked 事件
-->
<ToggleButton Name="toggleButton3" Content="可切换状态的按钮" IsChecked="True" Loaded="toggleButton3_Loaded" Checked="toggleButton3_Checked" Margin="5" /> </StackPanel>
</Grid>
</Page>
Controls/ButtonControl/ToggleButtonDemo.xaml.cs
/*
* ToggleButton - 可切换状态的按钮(继承自 ButtonBase, 请参见 /Controls/ButtonControl/ButtonBaseDemo.xaml)
*/ using System;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls; namespace Windows10.Controls.ButtonControl
{
public sealed partial class ToggleButtonDemo : Page
{
public ToggleButtonDemo()
{
this.InitializeComponent(); this.Loaded += ToggleButtonDemo_Loaded;
} private void toggleButton1_Checked(object sender, RoutedEventArgs e)
{
lblMsg.Text = $"toggleButton1_Checked, IsChecked:{toggleButton1.IsChecked}";
} private void toggleButton1_Unchecked(object sender, RoutedEventArgs e)
{
lblMsg.Text = $"toggleButton1_Unchecked, IsChecked:{toggleButton1.IsChecked}";
} // 这个事件不会被触发,因为 toggleButton1 的 IsThreeState 的值为 false
private void toggleButton1_Indeterminate(object sender, RoutedEventArgs e)
{
lblMsg.Text = $"toggleButton1_Indeterminate, IsChecked:{toggleButton1.IsChecked}";
} private void toggleButton2_Checked(object sender, RoutedEventArgs e)
{
lblMsg.Text = $"toggleButton2_Checked, IsChecked:{toggleButton2.IsChecked}";
} private void toggleButton2_Unchecked(object sender, RoutedEventArgs e)
{
lblMsg.Text = $"toggleButton2_Unchecked, IsChecked:{toggleButton2.IsChecked}";
} private void toggleButton2_Indeterminate(object sender, RoutedEventArgs e)
{
lblMsg.Text = $"toggleButton2_Indeterminate, IsChecked:{toggleButton2.IsChecked}";
} private void ToggleButtonDemo_Loaded(object sender, RoutedEventArgs e)
{
lblToggleButton3.Text += "Page_Loaded";
lblToggleButton3.Text += Environment.NewLine;
} private void toggleButton3_Loaded(object sender, RoutedEventArgs e)
{
lblToggleButton3.Text += "toggleButton3_Loaded";
lblToggleButton3.Text += Environment.NewLine;
} private void toggleButton3_Checked(object sender, RoutedEventArgs e)
{
lblToggleButton3.Text += "toggleButton3_Checked";
lblToggleButton3.Text += Environment.NewLine;
}
}
}
6、AppBarButton 的示例
Controls/ButtonControl/AppBarButtonDemo.xaml
<Page
x:Class="Windows10.Controls.ButtonControl.AppBarButtonDemo"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Windows10.Controls.ButtonControl"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"> <Grid Background="Transparent">
<StackPanel Margin="10 0 10 10"> <!--
AppBarButton - 程序栏按钮控件(关于此控件的应用场景请参见:/Controls/NavigationControl/AppBarDemo.xaml 和 /Controls/NavigationControl/CommandBarDemo.xaml)
Label - 显示的文本
Icon - 显示的图标(IconElement 类型,关于 IconElement 请参见 /Controls/IconControl/IconElementDemo.xaml)
IsCompact - 是否是紧凑模式,即是否不显示 Label 指定的文本(默认值 false)
--> <!--
直接指定 Icon 为一个 Symbol 枚举值,此时所设置的是 SymbolIcon
-->
<AppBarButton Name="appBarButton1" Icon="Accept" Label="accept" Margin="5" /> <!--
需要设置 Icon 为一个 SymbolIcon 或 FontIcon 或 PathIcon 或 BitmapIcon 类型的话,可以这样设置
-->
<AppBarButton Name="appBarButton2" Label="find" IsCompact="True" Margin="5">
<AppBarButton.Icon>
<FontIcon Name="fontIcon1" FontFamily="Segoe UI Emoji" Glyph="✓" />
</AppBarButton.Icon>
</AppBarButton> <!--
AppBarButton 是支持 Flyout 的
-->
<AppBarButton Icon="Add" Label="Add" Margin="5">
<AppBarButton.Flyout>
<MenuFlyout>
<MenuFlyoutItem Text="MenuFlyout Item 1"/>
<MenuFlyoutItem Text="MenuFlyout Item 2"/>
<MenuFlyoutItem Text="MenuFlyout Item 3"/>
</MenuFlyout>
</AppBarButton.Flyout>
</AppBarButton> </StackPanel>
</Grid>
</Page>
Controls/ButtonControl/AppBarButtonDemo.xaml.cs
/*
* AppBarButton - 程序栏按钮控件(继承自 ButtonBase, 请参见 /Controls/ButtonControl/ButtonBaseDemo.xaml)
*/ using Windows.UI.Xaml.Controls; namespace Windows10.Controls.ButtonControl
{
public sealed partial class AppBarButtonDemo : Page
{
public AppBarButtonDemo()
{
this.InitializeComponent();
}
}
}
7、AppBarToggleButton 的示例
Controls/ButtonControl/AppBarToggleButtonDemo.xaml
<Page
x:Class="Windows10.Controls.ButtonControl.AppBarToggleButtonDemo"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Windows10.Controls.ButtonControl"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"> <Grid Background="Transparent">
<StackPanel Margin="10 0 10 10"> <!--
AppBarToggleButton - 程序栏可切换状态的按钮控件(关于此控件的应用场景请参见:/Controls/NavigationControl/AppBarDemo.xaml 和 /Controls/NavigationControl/CommandBarDemo.xaml)
Label - 显示的文本
Icon - 显示的图标(IconElement 类型,关于 IconElement 请参见 /Controls/IconControl/IconElementDemo.xaml)
IsCompact - 是否是紧凑模式,即是否不显示 Label 指定的文本(默认值 false)
--> <!--
直接指定 Icon 为一个 Symbol 枚举值,此时所设置的是 SymbolIcon
-->
<AppBarToggleButton Name="appBarToggleButton1" Icon="Accept" Label="accept" Margin="5" /> <!--
需要设置 Icon 为一个 SymbolIcon 或 FontIcon 或 PathIcon 或 BitmapIcon 类型的话,可以这样设置
-->
<AppBarToggleButton Name="appBarToggleButton2" Label="find" IsCompact="True" Margin="5">
<AppBarToggleButton.Icon>
<FontIcon Name="fontIcon1" FontFamily="Segoe UI Emoji" Glyph="✓" />
</AppBarToggleButton.Icon>
</AppBarToggleButton> </StackPanel>
</Grid>
</Page>
Controls/ButtonControl/AppBarToggleButtonDemo.xaml.cs
/*
* AppBarToggleButton - 程序栏可切换状态的按钮控件(继承自 ToggleButton, 请参见 /Controls/ButtonControl/ToggleButtonDemo.xaml)
*/ using Windows.UI.Xaml.Controls; namespace Windows10.Controls.ButtonControl
{
public sealed partial class AppBarToggleButtonDemo : Page
{
public AppBarToggleButtonDemo()
{
this.InitializeComponent();
}
}
}
OK
[源码下载]
背水一战 Windows 10 (31) - 控件(按钮类): ButtonBase, Button, HyperlinkButton, RepeatButton, ToggleButton, AppBarButton, AppBarToggleButton的更多相关文章
- 控件(按钮类): ButtonBase, Button, HyperlinkButton, RepeatButton, ToggleButton, AppBarButton, AppBarToggleButton
介绍背水一战 Windows 10 之 控件(按钮类) ButtonBase Button HyperlinkButton RepeatButton ToggleButton AppBarButton ...
- 背水一战 Windows 10 (37) - 控件(弹出类): MessageDialog, ContentDialog
[源码下载] 背水一战 Windows 10 (37) - 控件(弹出类): MessageDialog, ContentDialog 作者:webabcd 介绍背水一战 Windows 10 之 控 ...
- 背水一战 Windows 10 (35) - 控件(弹出类): FlyoutBase, Flyout, MenuFlyout
[源码下载] 背水一战 Windows 10 (35) - 控件(弹出类): FlyoutBase, Flyout, MenuFlyout 作者:webabcd 介绍背水一战 Windows 10 之 ...
- 背水一战 Windows 10 (28) - 控件(文本类): TextBox, PasswordBox
[源码下载] 背水一战 Windows 10 (28) - 控件(文本类): TextBox, PasswordBox 作者:webabcd 介绍背水一战 Windows 10 之 控件(文本类) T ...
- 背水一战 Windows 10 (76) - 控件(控件基类): Control - 基础知识, 焦点相关, 运行时获取 ControlTemplate 和 DataTemplate 中的元素
[源码下载] 背水一战 Windows 10 (76) - 控件(控件基类): Control - 基础知识, 焦点相关, 运行时获取 ControlTemplate 和 DataTemplate 中 ...
- 背水一战 Windows 10 (68) - 控件(控件基类): UIElement - Pointer 相关事件, Tap 相关事件, Key 相关事件, Focus 相关事件
[源码下载] 背水一战 Windows 10 (68) - 控件(控件基类): UIElement - Pointer 相关事件, Tap 相关事件, Key 相关事件, Focus 相关事件 作者: ...
- 背水一战 Windows 10 (40) - 控件(导航类): AppBar, CommandBar
[源码下载] 背水一战 Windows 10 (40) - 控件(导航类): AppBar, CommandBar 作者:webabcd 介绍背水一战 Windows 10 之 控件(导航类) App ...
- 背水一战 Windows 10 (36) - 控件(弹出类): ToolTip, Popup, PopupMenu
[源码下载] 背水一战 Windows 10 (36) - 控件(弹出类): ToolTip, Popup, PopupMenu 作者:webabcd 介绍背水一战 Windows 10 之 控件(弹 ...
- 背水一战 Windows 10 (34) - 控件(进度类): RangeBase, Slider, ProgressBar, ProgressRing
[源码下载] 背水一战 Windows 10 (34) - 控件(进度类): RangeBase, Slider, ProgressBar, ProgressRing 作者:webabcd 介绍背水一 ...
随机推荐
- 走向面试之数据库基础:三、SQL进阶之变量、事务、存储过程与触发器
一.变量那点事儿 1.1 局部变量 (1)声明局部变量 DECLARE @变量名 数据类型 ) DECLARE @id int (2)为变量赋值 SET @变量名 =值 --set用于普通的赋值 SE ...
- 如何设计一门语言(十)——正则表达式与领域特定语言(DSL)
几个月前就一直有博友关心DSL的问题,于是我想一想,我在gac.codeplex.com里面也创建了一些DSL,于是今天就来说一说这个事情. 创建DSL恐怕是很多人第一次设计一门语言的经历,很少有人一 ...
- [公告]Senparc.Weixin v4.7.0 升级说明(2016-08-08)
本次升级包含了除QY以外所有的类库,升级内容包括: 1.重构Conatainer结构,删除 ItemCollection 属性,直接使用ContainerBag加入到缓存: 2.重构IContaine ...
- 循序渐进,了解Hive是什么!
一直想抽个时间整理下最近的所学,断断续续接触hive也有半个多月了,大体上了解了很多Hive相关的知识.那么,一般对陌生事物的认知都会经历下面几个阶段: 为什么会出现?解决了什么问题? 如何搭建?如何 ...
- 【requireJS源码学习01】了解整个requireJS的结构
前言 现在工作中基本离不开requireJS这种模块管理工具了,之前一直在用,但是对其原理不甚熟悉,整两天我们来试着学习其源码,而后在探寻其背后的AMD思想吧 于是今天的目标是熟悉requireJS整 ...
- Css概要与选择器,刻度单位
目录 一.CSS3概要 1.1.特点 1.2.效果演示 1.3.帮助文档与学习 二.选择器 1.1.基础的选择器 1.2.组合选择器 1.3.属性选择器 1.4.伪类 1.5.伪元素 三.特殊性(优先 ...
- 移动web app开发必备 - Deferred 源码分析
姊妹篇 移动web app开发必备 - 异步队列 Deferred 在分析Deferred之前我觉得还是有必要把老套的设计模式给搬出来,便于理解源码! 观察者模式 观察者模式( 又叫发布者-订阅者模 ...
- 数据结构与算法JavaScript (三) 链表
我们可以看到在javascript概念中的队列与栈都是一种特殊的线性表的结构,也是一种比较简单的基于数组的顺序存储结构.由于javascript的解释器针对数组都做了直接的优化,不会存在在很多编程语言 ...
- php的mysql\mysqli\PDO(二)mysqli
原文链接:http://www.orlion.ga/1147/ mysqli有面向对象风格和面向过程风格,个人感觉还是用面向对象风格比较好(毕竟是面向对象) 1.mysqli::_construct( ...
- hibernate基础之无法自动创建表总结
刚刚接触Hibernate尝试写一个事例项目,但是搞了一天硬是苦逼的没弄通,一直的报无法创建表,现在就把这些经验给大家分享一下: 1.书写问题: <property name="hbm ...