VS2008 WPF中的Tab控件 [英] Tab Control in WPF of VS2008

查看:100
本文介绍了VS2008 WPF中的Tab控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的应用程序中使用Tab控件.在设计时,我不会移动其他选项卡项目,但在运行时会执行它的工作.它总是出现在第一个选项卡上.我必须设置tabcontrol的任何属性吗?

 <   Window     x:Class   ="  
 
          xmlns   ="  http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
          xmlns:x   ="  
 
         标题  =" 老师"      高度  ="    宽度  ="  <  画布    ="   1249" <  图片    ="   0"  Canvas.Top    0" 高度   71" 名称  ="     ="  填充"    宽度  ="      ="  D:\ Software Development \ vishal_wpf \ vishal_WPF \ DLL_2008_WPF \ DLL_TEACHER \ DLL_TEACHER \ Images \ logo.jpg" / > 
        <   TabControl     ="   0"  Canvas.Top    77" 高度   572"   宽度  ="     ="   tabControl1" <   TabItem     ="  学生状态" 名称   tabItem1"   > 
                这是一
            <  /TabItem  > 
            <   TabItem     ="  课程分配" 名称   tabItem2"   > 
                这是两个
            <  /TabItem  > 
            <   TabItem     ="  课程摘要" 名称   tabItem3"   > 
                <  网格 > 
                <  /Grid  > 
            <  /TabItem  > 
            <   TabItem     ="  保存的课程" 名称   tabItem4"   > 
                <  网格 > 
                <  /Grid  > 
            <  /TabItem  > 
            <   TabItem     ="  聊天" 名称   tabItem5"   > 
                <  网格 > 
                <  /Grid  > 
            <  /TabItem  > 
        <  /TabControl  > 
    <  /画布 > 
<  /Window  >  

解决方案

您可能未安装VS2008 SP1.

http://stackoverflow.com/questions/2106252/visual-studio-2008-wpf-tabitem-how-do-i-bring-it-to-front [<Window x:Class="DLL_TEACHER.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Teacher" Height="700" Width="1300"> <Canvas Width="1249"> <Image Canvas.Left="0" Canvas.Top="0" Height="71" Name="image1" Stretch="Fill" Width="120" Source="D:\Software Development\vishal_wpf\vishal_WPF\DLL_2008_WPF\DLL_TEACHER\DLL_TEACHER\Images\logo.jpg" /> <TabControl Canvas.Left="0" Canvas.Top="77" Height="572" Width="1252" Name="tabControl1"> <TabItem Header="Student Status" Name="tabItem1" > this is one </TabItem> <TabItem Header="Lesson Assignment" Name="tabItem2" > this is two </TabItem> <TabItem Header="Lesson Preperation" Name="tabItem3" > <Grid> </Grid> </TabItem> <TabItem Header="Saved Lesson" Name="tabItem4" > <Grid> </Grid> </TabItem> <TabItem Header="chat" Name="tabItem5" > <Grid> </Grid> </TabItem> </TabControl> </Canvas> </Window>

解决方案

You might not be having VS2008 SP1 installed.

http://stackoverflow.com/questions/2106252/visual-studio-2008-wpf-tabitem-how-do-i-bring-it-to-front[^]


You''are asking about the property. You can use System.Windows.Forms.TabControl.SelectedIndex.

—SA


这篇关于VS2008 WPF中的Tab控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆