0

I create a ink toolbar, and the initial controls are all except pens. I can set the eraser button's background as transparent, but apply to the ruler button. Is this a ink toolbar bug?

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

enter image description here

Vincent
  • 3,124
  • 3
  • 21
  • 40

1 Answers1

1

The rule button is actually the InkToolbarStencilButton in the visual tree, not InkToolbarRulerButton. So that update your code snippet as follows will work.

<InkToolbar
    Background="Transparent"
    InitialControls="AllExceptPens" 
    <InkToolbarEraserButton Background="Red" />
    <!--<InkToolbarRulerButton Background="Red" Foreground="Blue"   />-->
    <InkToolbarStencilButton Background="Red"></InkToolbarStencilButton>
</InkToolbar>
Sunteen Wu
  • 10,509
  • 1
  • 10
  • 21