longlistselector のジャンプ リストの色を動的に変更したいと考えています。リソースで以下のようにxamlで定義されたJumpListBackgroundCONverterがあります
<phone:PhoneApplicationPage.Resources>
<phone:JumpListItemBackgroundConverter x:Name="BackgroundConvert" x:Key="BackgroundConverter" Enabled="#FFA20025"/>
C# では、コンポーネントが初期化された後、BackgroundConvert は null を返します
public MainPage()
{
InitializeComponent();
this.BackgroundConvert.Enabled = new SolidColorBrush(ThemeGradient.Color);
有効な値を新しいブラシに変更し、コード全体で変更する予定です。何らかの理由で null を返し、クラッシュします。
InitializeComponent では、 FindName が null を返すと思いますが、理由がわかりません
this.BackgroundConvert = ((Microsoft.Phone.Controls.JumpListItemBackgroundConverter)(this.FindName("BackgroundConvert")));
ところで、これはWindows Phone 8用です!