课程和科目详情 [英] Course and Subject Details
问题描述
我有一个应用程序,一个模块处理一个控件显示日期和主题我在wpf网格中的行和列。我的控件应显示主题的详细信息。
控件应采用以下方式
星期一星期二星期三星期四星期五星期五星期五
subj1(教师姓名应显示在相应主题的文本块中
subj2在行和列中。 )
''
''
''
''
' '
请帮我解释一下代码。
I ''ve an application ,a module in that deals with a control displaying the days and subjects i rows and columns in a grid in wpf.My control should display the details of the subject .
The control should be in the following way
Monday Tues Wed Thurs Fri sat
subj1 (faculty name should be displayed in a textblock for the corresponding subject
subj2 in the rows and columns.)
''
''
''
''
''
Please help me in the code.
推荐答案
嗨。试试这个:
Hi. try this one:
<DataGrid x:Name="PreviewDataGrid" RowHeight="27" AlternatingRowBackground="DodgerBlue" AlternationCount="2" >
<DataGrid.Columns>
<DataGridTextColumn Header="Days" Binding="{Binding Day}"/>
<DataGridTextColumn Header="Subject" >
<DataGridTextColumn.ElementStyle>
<Style TargetType="{x:Type TextBox}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TextBox}">
<TextBlock Text="{TemplateBinding Text}"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</DataGridTextColumn.ElementStyle>
</DataGridTextColumn>
</DataGrid.Columns>
</DataGrid>
但我说你的问题并不明显。
我希望这可以帮到你。
祝你好运
But i say your question isn''t obvious.
I hope this help you.
Good luck
这篇关于课程和科目详情的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!