营销型网站的运营配套不包括,wordpress 微信端 主题,在线定制家具,wordpress 安装后梅花首先我们有的是一个绑定好数据的ItemsControl
ItemsControl ItemsSource{Binding Starts}
/ItemsControl
运行后呢是朴素的将数据竖着排列 如果想要数据之间有间距#xff0c;可以使用数据模板#xff0c;将数据放到TextBlock中显示#xff0…首先我们有的是一个绑定好数据的ItemsControl
ItemsControl ItemsSource{Binding Starts}
/ItemsControl
运行后呢是朴素的将数据竖着排列 如果想要数据之间有间距可以使用数据模板将数据放到TextBlock中显示这样就可以设置间距了
ItemsControl ItemsSource{Binding Starts}ItemsControl.ItemTemplateDataTemplateTextBlock Padding5 Text{Binding}/TextBlock/DataTemplate/ItemsControl.ItemTemplate
/ItemsControl 如果还想要让数据隔一行显示不同背景就可以使用触发器来进行设置
ItemsControl ItemsSource{Binding Starts} AlternationCount2ItemsControl.ItemTemplateDataTemplateBorder x:Nameborder Padding5TextBlock Text{Binding}/TextBlock/BorderDataTemplate.TriggersTrigger PropertyItemsControl.AlternationIndex Value1Setter TargetNameborder PropertyBackground Valuelightgray/Setter/Trigger/DataTemplate.Triggers/DataTemplate/ItemsControl.ItemTemplate
/ItemsControl --- 重点是设置2个就是一个间隔 对于这个间隔的触发器是有很多种写法的WPF触发器的多种写法-CSDN博客