wpf - How to overide the selected item style of MahApps Panorama Control? -
i using mahapps panorama control in project linking mahapps.metro.dll can't change xaml-code of panorama control directly. thought possible override values in mainwindow.xaml when nothing changes or maybe change wrong property.
the problem panorama control selected item has white border , can't find way remove selection style. tried several solutions changing style or changing control template (how disable highlighting on listbox keep selection?) changes have no influence of panorama control.
there can see panorama control xaml.
this issue way styles inherited, , it's tricky see how listviewitems , listboxitems work together. fixed inserting following in code behind. does, however, lose selected item:
var listbox = mypanorama.findchildbytype<listbox>(); if (listbox != null) { listbox.selectedindex = -1; } findchildbytype simple search return first listbox found under panorama. if have search name x:name of template listbox "items".
Comments
Post a Comment