当前位置: 首页 > wzjs >正文

电影网站怎么做优化企业为什么要建立战略联盟

电影网站怎么做优化,企业为什么要建立战略联盟,他达拉非什么是,珠宝怎么做网站C# WPF编程-TabControl 布局:代码:效果 WPF中的TabControl是一个非常灵活和强大的控件,用于在一组页面或选项卡之间进行导航。每个选项卡(TabItem)可以包含任意复杂的UI内容。接下来,我将介绍如何使用TabCo…

C# WPF编程-TabControl

  • 布局:
  • 代码:
  • 效果

WPF中的TabControl是一个非常灵活和强大的控件,用于在一组页面或选项卡之间进行导航。每个选项卡(TabItem)可以包含任意复杂的UI内容。接下来,我将介绍如何使用TabControl,包括基本用法、样式定制以及如何实现垂直标签布局。

  • TabControl : 添加选项卡控件
  • TabItem:添加选项卡页面

布局:

<Window x:Class="WpfBaseDemo.WindowTabctrolDemo"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:local="clr-namespace:WpfBaseDemo"mc:Ignorable="d"Title="WindowTabctrolDemo" Height="450" Width="800"><Window.Resources><Style x:Key="TabItemHeaderTextStyle"><Setter Property="TextBlock.FontSize" Value="15"/><Setter Property="TextBlock.FontStyle" Value="Italic"/><Setter Property="TextBlock.FontWeight" Value="Bold"/><Setter Property="TextBlock.Foreground" Value="#FF00479D"/></Style></Window.Resources><Grid><Grid.RowDefinitions><RowDefinition/></Grid.RowDefinitions><Grid.ColumnDefinitions><ColumnDefinition/><ColumnDefinition/></Grid.ColumnDefinitions><TabControl Grid.Row="0" Grid.Column="0" SelectionChanged="TabControl_SelectionChanged"><TabItem Header="第一页"><Grid><Grid.RowDefinitions><RowDefinition/><RowDefinition/></Grid.RowDefinitions><Grid.ColumnDefinitions><ColumnDefinition/><ColumnDefinition/></Grid.ColumnDefinitions><!-- 日历 --><Calendar Grid.Row="0" Grid.Column="0"/><Slider Grid.Row="0" Grid.Column="1" Value="50" Maximum="100"/></Grid></TabItem><TabItem Header="第二页"></TabItem><TabItem Header="第三页"></TabItem></TabControl><TabControl Grid.Row="0" Grid.Column="1" ><TabItem><TabItem.Header><StackPanel Orientation="Horizontal"><Image Source="Images/mail-send.png"/><TextBlock Text="第一页" Style="{StaticResource TabItemHeaderTextStyle}"/></StackPanel></TabItem.Header></TabItem><TabItem><TabItem.Header><StackPanel Orientation="Horizontal"><Image Source="Images/help-contents.png"/><Label Content="第二页" Style="{StaticResource TabItemHeaderTextStyle}"/></StackPanel></TabItem.Header></TabItem><TabItem><TabItem.Header><StackPanel Orientation="Horizontal"><Image Source="Images/stock_text_center.png"/><Label Content="第三页" Style="{StaticResource TabItemHeaderTextStyle}" /></StackPanel></TabItem.Header><StackPanel HorizontalAlignment="Center" VerticalAlignment="Center"><Rectangle Width="200" Height="200"><Rectangle.Fill><SolidColorBrush Color="Gold"/></Rectangle.Fill></Rectangle></StackPanel></TabItem></TabControl></Grid>
</Window>

代码:

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;namespace WpfBaseDemo
{/// <summary>/// WindowTabctrolDemo.xaml 的交互逻辑/// </summary>public partial class WindowTabctrolDemo : Window{public WindowTabctrolDemo(){InitializeComponent();}private void TabControl_SelectionChanged(object sender, SelectionChangedEventArgs e){TabControl? tabControl = sender as TabControl;if (tabControl != null) {switch (tabControl.SelectedIndex){case 0:Debug.WriteLine("第一页");break;case 1:Debug.WriteLine("第二页");break;case 2:Debug.WriteLine("第三页");break;default:break;}                }           }}
}

效果

在这里插入图片描述

http://www.dtcms.com/wzjs/588160.html

相关文章:

  • 网站自适应263企业邮箱官网入口
  • 松江做网站公司福州网站制作设计
  • 郑州网站建设与设计长春网站排名推广
  • 做招标代理应关注的网站网站seo优化排名
  • 网站建设平台多少钱温岭建设阳光网站
  • 住建局网站信息化建设重庆做商城网站建设
  • 网站备案期间能使用吗北京公司网站制作哪家专业
  • 湛江免费做网站网站空间域名
  • 网站建设需要通过哪些审批昆山网站制作哪家好
  • 营销网站开发哪家好宁波随身云网络科技有限公司
  • 网站开发学习课程安卓盒子做网站
  • 浙江省工程建设质量管理协会 网站胶州网站设计
  • 关键词你们懂的外贸seo博客
  • 公司网站定制开发广东省做网站推广公司
  • 知识网站保洁公司 网站模板
  • 499元做网站装修设计软件免费版下载
  • 泰安千橙网站建设北京网站建设 爱牛
  • 做网站配什么电脑wordpress cpu 100%
  • 一流的网站建设网站app下载大全
  • 做两个阿里网站十大免费行情软件视频
  • 江门站排名优化重庆100强企业名单
  • 学什么可以做响应式网站网站建设和网站优化哪个重要
  • 网站怎么做会被收录宁波网站建设开发公司
  • 万网建网站教程阿里云服务器做盗版视频网站吗
  • 厦门建设厅网站有没有做淘宝的网站
  • 网站域名 空间做淘宝客如何建自己的网站
  • 山东青岛网站制作wordpress添加变量
  • 一个域名可以绑定两个网站吗百度极速版app下载
  • wordpress行首空格郑州网站建设及优化
  • 贵阳网站建设制作方法seo博客是什么意思