0
我正在爲Tab控件 創建一個新模板,其中我需要安排附加圖像等項目。下面給出的風格是有主標籤..和內容...雖然提到的內容(內容提要)我必須指定網格列/行...因此,如果我使用行列/行爲「0」,「 0「..那麼我所有的內容將在左上方區域...如何爲一個內容演示者指定3/4?
請告訴我如何指定與網格3/4區域的內容演示者。
<Style x:Key="OutlookTabControlStyle" TargetType="{x:Type TabControl}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TabControl}">
<Grid ClipToBounds="true" SnapsToDevicePixels="true"
KeyboardNavigation.TabNavigation="Local">
<Grid.RowDefinitions>
<RowDefinition x:Name="RowDefinition0" Height="Auto"/>
<RowDefinition x:Name="RowDefinition1" Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition x:Name="ColumnDefinition0"/>
<ColumnDefinition x:Name="ColumnDefinition1" Width="0"/>
</Grid.ColumnDefinitions>
<Grid x:Name="ContentPanel" Grid.Column="0" Grid.Row="1">
<ContentPresenter SnapsToDevicePixels=
"{TemplateBinding SnapsToDevicePixels}" Margin="2,2,2,2"
x:Name="PART_SelectedContentHost"
ContentSource="SelectedContent"/>
</Grid>
<StackPanel HorizontalAlignment="Stretch" Margin="0,-2,0,0"
x:Name="HeaderPanel" VerticalAlignment="Bottom" Width="Auto"
Height="Auto" Grid.Row="1" IsItemsHost="True"/>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Foreground"
Value="{DynamicResource
{x:Static SystemColors.GrayTextBrushKey}}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
我的問題是我怎麼分配的剩餘部分(除主標籤區域等)作爲內容paresenter ......我可以看到畫布一個選項。如果你對此有更多瞭解,請幫助我。
我的意思不是像在「主標籤」區域以外的所有區域。如果我給兩個內容主持人..我可以只使用它的一個爲我的「主選項卡的子標籤」區域...和實際內容 - 我必須在同一區域顯示...我清楚 – Relativity
@Relativity查看我的回答更新 – Rachel
所以...我可以使用3/4部分作爲內容演示者嗎? – Relativity