I want to set my own customs app bar icons which I downloaded . How can I set that this doesnot work
<AppBarButton x:Name="save" Click="save_Click" Label="Save" Icon="Assets/icon/1.png" />
I want to set my own customs app bar icons which I downloaded . How can I set that this doesnot work
<AppBarButton x:Name="save" Click="save_Click" Label="Save" Icon="Assets/icon/1.png" />
Try adding it this way:
<AppBarButton Label="BitmapIcon" Click="AppBarButton_Click">
<AppBarButton.Icon>
<BitmapIcon UriSource="ms-appx:///Assets/icon/1.png"/>
</AppBarButton.Icon>
</AppBarButton>
Check also if the path is correct and that the image is in the correct format to be displayed. You could also give a try using Blend to check if the image is working.
Go back to basics, by creating a button from scratch, and animating it with Blend. I spent days tweaking the code for custom buttons and never got it right. In the end I spent a morning doing the tutorials, and then I was moving ahead. Both of these are very good: Make a Styled Button in XAML for Universal Windows Apps and Custom Styles in XAML - Edit Button Style to Create Your Own Custom Style. The second one is targetted to phone apps, but with some minor changes at the start can be used for desktop – Stephen Hosking 20 secs ago edit
© 2022 - 2024 — McMap. All rights reserved.