Programmatically changing button icon in WPF

You can accomplish this by changing the content of the button, through an event handler. You can set both the “Play” Icon and “Stop” Icon as a resource, under Window.Resources like so: <Window x:Class=”WpfApplication1.MainWindow” xmlns=”http://schemas.microsoft.com/winfx/2006/xaml/presentation” xmlns:x=”http://schemas.microsoft.com/winfx/2006/xaml” Title=”MainWindow” Height=”350″ Width=”525″> <Window.Resources> <Image x:Key=”Play” Source=”/WpfApplication1;component/Play_Icon.png” Height=”50″ Width=”50″ /> <Image x:Key=”Stop” Source=”/WpfApplication1;component/Stop_Icon.png” Height=”50″ Width=”50″/> </Window.Resources> <Grid> <Button Click=”Button_Click” … Read more

Twitter bootstrap 3 – create a custom glyphicon and add to glyphicon “font”

This process might be one option. You could use the IcoMoon App. Their library includes FontAwesome which would get you off to a quick start, or you download glyphicon, and upload the fontawesome-webfont.svg For your custom icons, create SVGs, upload them to IcoMoon and add them to the FontAwesome / Glyphicon set. When you are … Read more

vuetify icon not showing

With Vue CLI 3 we have no index.html in the src folder so alternatively you can npm install –save material-design-icons-iconfont and import it in the main.js file import ‘material-design-icons-iconfont/dist/material-design-icons.css’

Change JTree node icons according to the depth level

As an alternative to a custom TreeCellRenderer, you can replace the UI defaults for collapsedIcon and expandedIcon: Icon expanded = new TreeIcon(true, Color.red); Icon collapsed = new TreeIcon(false, Color.blue); UIManager.put(“Tree.collapsedIcon”, collapsed); UIManager.put(“Tree.expandedIcon”, expanded); TreeIcon is simply an implementation of the Icon interface: class TreeIcon implements Icon { private static final int SIZE = 14; private … Read more

How to manually create icns files using iconutil?

Here’s a script to convert a 1024×1024 png (named “Icon1024.png”) to the required icns file. Save it to a file called “CreateICNS.src” in the folder where your png file is then in terminal “cd” to the same folder and type “source CreateICNS.src” to call it: mkdir MyIcon.iconset sips -z 16 16 Icon1024.png –out MyIcon.iconset/icon_16x16.png sips … Read more