目录
比如鼠标在某一个控件上面滑动,会出现文字提示的功能
只需要对控件增加ToolTip即可
-
"trvPersons" Width="150" Height="200" Foreground="#FF05C7CB" BorderBrush="#00ACACAC" Background="#004682B4" > -
-
"{Binding Children}"> -
"Horizontal" ToolTip="{Binding Name,NotifyOnSourceUpdated=True}"> -
"/TreeView;component/Images/1.png" Margin="0,0,5,0" /> -
"{Binding Name}" Margin="0,0,4,0" Foreground='#FF05C7CB' /> -
-
-
-
-
-
-
有时候,我们需要一个样式,全局使用,按照以下方式配置,使用button举例
"http://schemas.microsoft.com/winfx/2006/xaml/presentation" - xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
-
引用
"DataGrid.App" - xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:local="clr-namespace:DataGrid"
- StartupUri="MainWindow.xaml">
-
-
-
-
"pack://application:,,,/DataGrid;component/Button.xaml"/> -
-
-
如果单个界面使用,那么需要加上key
引用不变
在使用的界面中加入下面代码
-
-
-
如果是在某一个控件上面使用,只需要把
-
- Width="80" FontSize="20" HorizontalAlignment="Center" VerticalAlignment="Center">
-