说明
使用内联 SVG 作为平铺背景实现,不额外请求图片资源。
常见能力:
- 平铺文字
- 可调角度与透明度
- 间距与字号可调
用法
<Watermark Text="内部资料" Opacity="0.12">
<Card>受保护内容</Card>
</Watermark>
API 参数
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
ChildContent |
RenderFragment |
null |
|
Color |
string |
"#000000" |
|
FontSize |
int |
15 |
|
GapX |
int |
220 |
单块水印的平铺间距(px)。 |
GapY |
int |
140 |
|
Opacity |
double |
0.13 |
不透明度 0-1。 |
Rotate |
int |
-22 |
|
Text |
string |
null |
|
Visible |
bool |
true |
取得或设置组件是否可见,默认为false。 |
VisibleChanged |
EventCallback<bool> |
— | 事件 取得或设置组件可见性变化时的回调事件。 |
Class |
string |
null |
取得或设置组件的CSS类名,用于自定义样式。 |
Disabled |
bool |
false |
取得或设置组件是否禁用,默认为false。 |
Style |
string |
null |
取得或设置组件的内联样式,用于自定义样式。 |
所有组件均继承
BaseComponent,除上表参数外还支持Class、Style、Disabled、Visible。
扫码关注公众号
扫码加入 QQ 群