请问关于c的具体应用场景有哪些?
- 内容介绍
- 文章标签
- 相关推荐
本文共计213个文字,预计阅读时间需要1分钟。
有没有办法动态地将列表项绑定到WrapPanel以及它们的事件?我不太确定这对您想做的事情是否正确,但听起来非常相似:
WPF - 从列表填充WrapPanelXAML链接如下:+ ItemsControl
有没有办法动态地将列表按钮绑定到WrapPanel以及它们的事件? 我不太确定这对你想要做的事情是否正确,但听起来非常相似:> WPF – Fill a WrapPanel from a List
上面链接中的XAML如下:
<ItemsControl x:Name="activitiesControl" Margin="10"> <ItemsControl.Template> <ControlTemplate> <WrapPanel Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" FlowDirection="LeftToRight" IsItemsHost="true"> </WrapPanel> </ControlTemplate> </ItemsControl.Template> <ItemsControl.ItemTemplate> <DataTemplate> <Button Style="{DynamicResource ActionButton}" HorizontalAlignment="Right" Margin="5" Content="{Binding Value}" Width="200" Command="{Binding Path=ViewModel.ActionTypeCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:CustomerEditView}}" CommandParameter="{Binding Key}"/> </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl>
本文共计213个文字,预计阅读时间需要1分钟。
有没有办法动态地将列表项绑定到WrapPanel以及它们的事件?我不太确定这对您想做的事情是否正确,但听起来非常相似:
WPF - 从列表填充WrapPanelXAML链接如下:+ ItemsControl
有没有办法动态地将列表按钮绑定到WrapPanel以及它们的事件? 我不太确定这对你想要做的事情是否正确,但听起来非常相似:> WPF – Fill a WrapPanel from a List
上面链接中的XAML如下:
<ItemsControl x:Name="activitiesControl" Margin="10"> <ItemsControl.Template> <ControlTemplate> <WrapPanel Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" FlowDirection="LeftToRight" IsItemsHost="true"> </WrapPanel> </ControlTemplate> </ItemsControl.Template> <ItemsControl.ItemTemplate> <DataTemplate> <Button Style="{DynamicResource ActionButton}" HorizontalAlignment="Right" Margin="5" Content="{Binding Value}" Width="200" Command="{Binding Path=ViewModel.ActionTypeCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:CustomerEditView}}" CommandParameter="{Binding Key}"/> </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl>

