0
私はInkscapeからエクスポートした非常に単純なパス(+記号のみ)を持っていますが、これをボタンのコンテンツとして使用したいと思います。ボタン内の中心パスの内容
<Button Height="24" Width="24">
<Viewbox HorizontalAlignment="Center" VerticalAlignment="Center" Stretch="Fill">
<Path Fill="#000000" Data="M 11 5 L 11 11 L 5 11 L 5 13 L 11 13 L 11 19 L 13 19 L 13 13 L 19 13 L 19 11 L 13 11 L 13 5 L 11 5 z"/>
</Viewbox>
</Button>
私はので、私はそれを拡張することができViewbox
に包みましたし、私はHorizontalAlignment
、VerticalAlignment
とLayoutRounding
で遊んでみましたが、彼らはポジショニングに影響を与えていないように見えます。
私はパスデータ自体がこれを担当していると推測しています。おそらく最初の移動先(M)から開始しますが、手動でパスを編集することはできません。
これを修正してボタンの中央に表示する方法はありますか?私はもっと多くのボタンを作りましたので、何が起こっているのか理解したいと思います。
はここで、元のSVGです:
<svg xmlns="http://www.w3.org/2000/svg" version="1" viewBox="0 0 24 24" enable-background="new 0 0 24 24" width="48" height="48">
<path style="text-indent:0;text-align:start;line-height:normal;text-transform:none;block-progression:tb;-inkscape-font-specification:Bitstream Vera Sans" d="M 11 5 L 11 11 L 5 11 L 5 13 L 11 13 L 11 19 L 13 19 L 13 13 L 19 13 L 19 11 L 13 11 L 13 5 L 11 5 z" color="#000" overflow="visible" enable-background="accumulate" font-family="Bitstream Vera Sans"/>
はありがとうございました!!このような
ありがとうございました!マージンとストレッチを実際のパスの内側に置くとは思わなかった。私はXAMLについて考え続けています。 – MagellanTX