<Style TargetType="{x:Type TabControl}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TabControl}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition></RowDefinition>
</Grid.RowDefinitions>
<TabPanel Grid.Row="0" Panel.ZIndex="1" Margin="5,0,0,0" IsItemsHost="True"></TabPanel>
<Border Name="Borderl" Grid.Row="1" Background="#ffff0000" BorderBrush="#FF999999" BorderThickness="1" Padding="2">
<ContentPresenter ContentSource="SelectedContent" ></ContentPresenter>
</Border>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>if(this.tabControl.FindName("Border1")==null)
{
this.Title="NULL";
}
else
{
this.Title="Finded";
}为什么this.tabControl.FindName("Border1"),是空的?模板里分明是有Border1的啊
解决方案 »
- 如何读取文本文件代码
- 关于C#线程问题,请大虾们帮忙解决
- 解密RAR文件时 要你输入TXT文件的密码怎么办呀
- 求C# SOCKET?
- (winform)datagridview如何响应textbox输入事件?
- EL Table里怎么获得画面上多选行的行号
- 为何模板列中checkbox的选定无效
- 怎么在自己的网页在地址栏上个自己的图标或者人家收藏自己的网页时显示自己的个性图标???(.aspx)???
- 询问vs2008+sql2005winform程序发布的问题
- 请问关于myTable .Rows.InsertAt的问题。。
- [分享] C# 基于AForge类库实现的摄像头控制,(附本衰人照片) 最近很流行免积分下载..
- 图片采集,你懂的~
http://msdn.microsoft.com/zh-cn/library/bb613586.aspx不能用FrameElement.FindControl的原因看这里
http://msdn.microsoft.com/zh-cn/library/ms746659.aspx