[英]How can I replace Canvas element with SVG?
我目前正在嘗試為畫布元素提供具有圓形邊框的形狀。 根據我的經驗, Canvas
類中不存在CornerRadius
參數/方法?
我想使用 SVG 元素而不是這個白色畫布元素。
<Canvas Background="White" Width="250" Height="200">
<TextBlock Text="LOW" Foreground="Black" FontSize="30" TextAlignment="Center" Margin="10"></TextBlock>
<TextBlock FontSize="40" Padding="0, 0, 300, 0" Margin="74" Text="11" Foreground="Black"></TextBlock>
</Canvas>
<Border CornerRadius="10" Background="White" Height="200" Width="200">
<Canvas Background="White" Width="250" Height="200" HorizontalAlignment="Left" >
<TextBlock Text="LOW" Foreground="Black" FontSize="30" TextAlignment="Center" Margin="10"></TextBlock>
<TextBlock FontSize="40" Padding="0, 0, 300, 0" Margin="74" Text="11" Foreground="Black">
</TextBlock>
</Canvas>
</Border>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.