1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Visual Studio Codeの拡張機能「Powerful Animation」でSVG操作がラクラク【Power Apps】

Last updated at Posted at 2024-07-10

Powerful Animation

Visual Studio Codeの拡張機能 Powerful Animationが使えそうなので紹介。

SVGPower Appsで使うことがありますが、" ダブルクオーテーション' シングルクオーテーションに置き換えなければならなかったりと、少し手間があります。

実際にSVGPower Appsで描画する場合

"data:image/svg+xml," & EncodeUrl("<svg xmlns='http://www.w3.org/2000/svg'{画像}</svg>")

と式を書かなければならないことが若干手間だったりします。
この部分をクイックにできる拡張機能が Powerful Animationです。

下記のSVGを例にして試してみましょう。

image.png

自分で書いたゴリラの絵🦍です
ワンパンマン リスペクト✨

インストール

  1. Visual Studio Codeを開き、拡張機能を選択
  2. Powerful Animationを選択
  3. インストール

このステップでクイックに準備が完了します。

q1.png

使い方 Powerful Animations: Convert to Single Quotes

さっそくSVGファイルを開いてみましょう。
Visual Studio CodeSVGを開きます。

文字列を選択し、コマンドパレットからPowerful Animations: Convert to Single Quotesを実行します。

image.png

即座に" ダブルクオーテーション' シングルクオーテーションに置き換わります。
Power Appsの"data:image/svg+xml," & EncodeUrl("ここに値貼り付け")

image.png

スグにPower Appsで表示しやすくなりました。

image.png

気の利いた置き換え機能になります。

使い方 Powerful Animations: Prepare SVG for Power Apps

上記の機能では物足りない。理想はワンクリックです。
それをかなえるコマンドがPrepare SVG for Power Apps!!

image.png

コマンドパレットに入力して実行。

image.png

即座にクリップボードへ、Power Appsで使用する文字列が格納されます。

これをそのままPower AppsImage コントロールのImageプロパティに貼り付けると・・・

image.png

"data:image/svg+xml;utf8, " & EncodeUrl("<~~全ての必要な値が設定されます!
手間があったPower Fxの入力、" ダブルクオーテーション' シングルクオーテーションに置き換える手間もなく、Cool✨

何かと使えそうですね!

おわりに

今回は便利で要チェックな拡張機能を紹介しました!
Preview段階でインストール数もまだ少ないですね!

image.png

アーリーアダプタ感味わえます!

今後の追加機能にも期待大!
Powerな人へ届け!

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?