概述
TabControl我之前有讲过一节,内容详见:
C# WPF TabControl用法指南(精品),上节主要讲解了tabcontrol控件的左右翻页,以及页面筛选,以及数据绑定等内容,这节内容继续接续上节内容进行扩展讲解,主要针对页面删除、增加以及对应的事件进行讲解.
功能演示
代码实现
前台XAML:
<UserControl x:Class="Caliburn.Micro.Hello.TabControlView"
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"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
xmlns:local="clr-namespace:Caliburn.Micro.Hello"
xmlns:cal="http://www.caliburnproject.org"
mc:Ignorable="d" d:DesignHeight="450" d:DesignWidth="800" >
<Grid >
<Grid.RowDefinitions>
<RowDefinition Height="35"/>
<RowDefinition Height="Auto"/>