无法使用 InkToolbar 将 InkToolbarRulerButton 背景设置为透明
Can't set InkToolbarRulerButton background as transparent using InkToolbar
我创建了一个墨迹工具栏,初始控件除了钢笔外都是。
我可以将橡皮擦按钮的背景设置为透明,但应用于标尺按钮。
这是墨迹工具栏错误吗?
<InkToolbar Background="Transparent" InitialControls="AllExceptPens" TargetInkCanvas="{x:Bind inkCanvas}">
<InkToolbarEraserButton Background="Transparent"/>
<InkToolbarRulerButton Background="Transparent"/>
</InkToolbar>
规则按钮实际上是可视化树中的InkToolbarStencilButton
,而不是InkToolbarRulerButton
。这样更新您的代码片段就可以了。
<InkToolbar
Background="Transparent"
InitialControls="AllExceptPens"
<InkToolbarEraserButton Background="Red" />
<!--<InkToolbarRulerButton Background="Red" Foreground="Blue" />-->
<InkToolbarStencilButton Background="Red"></InkToolbarStencilButton>
</InkToolbar>
我创建了一个墨迹工具栏,初始控件除了钢笔外都是。 我可以将橡皮擦按钮的背景设置为透明,但应用于标尺按钮。 这是墨迹工具栏错误吗?
<InkToolbar Background="Transparent" InitialControls="AllExceptPens" TargetInkCanvas="{x:Bind inkCanvas}">
<InkToolbarEraserButton Background="Transparent"/>
<InkToolbarRulerButton Background="Transparent"/>
</InkToolbar>
规则按钮实际上是可视化树中的InkToolbarStencilButton
,而不是InkToolbarRulerButton
。这样更新您的代码片段就可以了。
<InkToolbar
Background="Transparent"
InitialControls="AllExceptPens"
<InkToolbarEraserButton Background="Red" />
<!--<InkToolbarRulerButton Background="Red" Foreground="Blue" />-->
<InkToolbarStencilButton Background="Red"></InkToolbarStencilButton>
</InkToolbar>