【问题标题】:Can't set InkToolbarRulerButton background as transparent using InkToolbar无法使用 InkToolbar 将 InkToolbarRulerButton 背景设置为透明
【发布时间】:2017-12-29 05:48:34
【问题描述】:

我创建了一个墨水工具栏,初始控件都是除了钢笔。 我可以将橡皮擦按钮的背景设置为透明,但适用于标尺按钮。 这是墨迹工具栏的错误吗?

<InkToolbar Background="Transparent" InitialControls="AllExceptPens" TargetInkCanvas="{x:Bind inkCanvas}">
      <InkToolbarEraserButton Background="Transparent"/>
      <InkToolbarRulerButton Background="Transparent"/>
</InkToolbar>

【问题讨论】:

    标签: xaml uwp-xaml inkcanvas


    【解决方案1】:

    规则按钮实际上是可视化树中的InkToolbarStencilButton,而不是InkToolbarRulerButton。因此,如下更新您的代码 sn-p 将起作用。

    <InkToolbar
        Background="Transparent"
        InitialControls="AllExceptPens" 
        <InkToolbarEraserButton Background="Red" />
        <!--<InkToolbarRulerButton Background="Red" Foreground="Blue"   />-->
        <InkToolbarStencilButton Background="Red"></InkToolbarStencilButton>
    </InkToolbar>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-08-31
      • 2018-07-03
      • 2021-03-04
      相关资源
      最近更新 更多