Posts: 17
Threads: 7
Joined: Mar 2025
03-22-2025, 03:47 AM
(This post was last modified: 03-22-2025, 06:12 AM by hiro.)
I can add image to WPF with Icon's name using:
FrameworkElement LoadWpfImageElement(string image)
But is there an
easy way to set its size inside WPF windows by just using Icon's name without converting FrameworkElement -> Bitmap -> Base64 -> BitmapFrame then assign it to Image.Source
Posts: 12,197
Threads: 144
Joined: Dec 2002
var b = new wpfBuilder("My WPF app").Columns(0);
b.R.Add(ImageUtil.LoadWpfImageElement("*BootstrapIcons.HouseDoor #9156A9")); //normal
b.R.Add(ImageUtil.LoadWpfImageElement("*BootstrapIcons.HouseDoor #9156A9 @12")); //smaller; this also can be used in toolbars etc
b.R.Add(ImageUtil.LoadWpfImageElement("*BootstrapIcons.HouseDoor #9156A9")).Size(32, 32); //bigger or smaller
b.ShowDialog();
Posts: 17
Threads: 7
Joined: Mar 2025
Thanks for the help! I see now how simple it is. Really appreciate it!