Possible to use your own image in a ToggleButton? #4267
Unanswered
josdemmers
asked this question in
Q&A
Replies: 2 comments 2 replies
-
Seems to work fine when I use a binding for the image source. No idea why it doesn't directly work in the xaml. |
Beta Was this translation helpful? Give feedback.
0 replies
-
The way i do it: <ToggleButton Width="48" Height="48" Margin="4" Foreground="{DynamicResource MahApps.Brushes.Accent}" Style="{DynamicResource MahApps.Styles.ToggleButton.Circle}">
<Image Source="/Images/arcana_250px.png"/>
</ToggleButton> or if the image is in the solution, set the build action to <ToggleButton Width="48" Height="48" Margin="4" Foreground="{DynamicResource MahApps.Brushes.Accent}" Style="{DynamicResource MahApps.Styles.ToggleButton.Circle}">
<Image Source="/projectname;component/Images/arcana_250px.png"/>
</ToggleButton> replace the |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was trying out the toggle button and was wondering if you can use your own images or only those from the iconPacks?
The xaml view shows the image just fine but when launching the application I only have an empty toggle button.
Beta Was this translation helpful? Give feedback.
All reactions