我正在研究WPF,但UI已针对古吉拉特语进行了本地化.在我的window.xaml中,我有2行2列.
我无法使用HeaderedContentControl标记.代码在这里:
<Border
Grid.Row="1" Grid.Column="1"
Style="{StaticResource MainBorderStyle}"
Padding="0"
BorderThickness="0,0,0,1"
Background="#f9f9f9">
<HeaderedContentControl
VerticalContentAlignment="Stretch"
Content="{Binding Path=CurrentWorkspace}"
Style="{StaticResource MainWorkspaceStyle}"
ContentTemplate="{StaticResource WorkspaceTemplate}"/>
</Border>
Run Code Online (Sandbox Code Playgroud)
请解释一下,并解释内容模板的作用.
Rob*_*cus 16
A HeaderedContentControl
是一个显示其他控件的控件,但也提供了一个标题(如GroupBox
窗口标题或窗口标题).
该HeaderedContentControl
势必在这种情况下,"CurrentWorkspace"一组数据- .
在ContentTemplate
描述了数据的显示方式.在这种特殊情况下,它被称为"WorkspaceTemplate",它将被定义为项目中某处的静态资源 - 在资源XAML文件中,或者在窗口中,在<Window.Resources>
XAML的顶部.
无论它在哪里,如果您搜索整个解决方案,WorkspaceTemplate
最终应该看到它的定义.
归档时间: |
|
查看次数: |
9509 次 |
最近记录: |