0
如何引用generic.xaml中顯示的默認樣式?引用Silverlight中控件的默認樣式
我想創建一個靜態類,它返回一個自定義控件的已知樣式。我知道如何拉取App.xaml中存在的樣式,但我不確定如何抓取通用樣式。
public static class VehicleTypes
{
public static readonly Style SportsCar = /*???Default style for VehicleIcon from generic.xaml*/;
public static readonly Style Sedan = Application.Current.Resources["SedanStyle"] as Style;
public static readonly Style Jeep = Application.Current.Resources["JeepStyle"] as Style;
...
}
謝謝!