【问题标题】:Image button with check box windows 10 app带有复选框的图像按钮 windows 10 应用程序
【发布时间】:2015-12-29 00:38:26
【问题描述】:

是否可以定义自定义按钮样式。此按钮包括一个复选框。每当单击按钮时,复选框都会被选中/取消选中。

有可能吗,怎么做? 可以处理检查状态。什么时候点击按钮?

也可以从按钮集合中选择选中的按钮详细信息吗?

【问题讨论】:

    标签: windows xaml platform universal


    【解决方案1】:

    在 XAML 中试试这个

    <Button Width="200" Height="30">
            <Button.ContentTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                        <CheckBox IsChecked="{Binding IsCheckedButton}" />
                        <TextBlock Text=" Your Content here" />
                    </StackPanel>
                </DataTemplate>
            </Button.ContentTemplate>
        </Button>
    

    【讨论】:

      猜你喜欢
      • 2015-11-12
      • 2016-03-25
      • 1970-01-01
      • 1970-01-01
      • 2012-02-29
      • 1970-01-01
      • 1970-01-01
      • 2013-07-13
      • 2017-06-15
      相关资源
      最近更新 更多