c# - Application Bar icons appearing as white even if the icons are colored in Windows phone app? -
actual intended result
but appearing in emulator
this icon image asset using
am adding application bar icon in c# this:
public void setappbar() { if (applicationbar == null) { applicationbar = new applicationbar(); applicationbar.mode = applicationbarmode.default; } this.applicationbar.buttons.clear(); applicationbariconbutton applicationbariconbutton = new applicationbariconbutton(); applicationbariconbutton.text = "play all"; applicationbariconbutton.iconuri = new uri("images/play_off.png", urikind.relative); applicationbariconbutton.click += appbarbutton_click_1; this.applicationbar.buttons.add(applicationbariconbutton); applicationbar.isvisible = true; }
i have read best practices bottom app bar icons here of dont have access icon white forgeround on transparent background. icon have, there way can intended green color in app bar icon ? have tried setting foreground color of app bar icon green doesn't change result. still white. there way can remove automatic functionality of windows phone sdk color icons white or black. want icon appear same image asset use.(green colored)
please let me know if possible.
thanks.
by default, application icon have light , dark colors depend on emulator/phone theme.
to change foreground color of application icon, use
xaml
foregroundcolor="red" //your desired color
c#
applicationbar.foregroundcolor = color.fromargb(255, 167, 246, 0); //your desired color's rgb code
Comments
Post a Comment