3
現在、ListPickerのテンプレートを更新しています。特に、私はフルモードポップアップの内容をスタイルしようとしています。この情報は、次のコードで定義されるように表示されます。Silverlight - テンプレート内のコンバーターの適用
<Popup x:Name="FullModePopup">
<Border Background="{StaticResource PhoneChromeBrush}">
<!-- Popup.Child should always be a Border -->
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<ContentControl Grid.Row="0" Content="{TemplateBinding FullModeHeader}"
Foreground="{StaticResource PhoneForegroundBrush}"
FontFamily="{StaticResource PhoneFontFamilySemiBold}"
FontSize="{StaticResource PhoneFontSizeNormal}"
HorizontalAlignment="Left" Margin="24 12 0 0"/>
<ListBox x:Name="FullModeSelector" Grid.Row="1"
FontSize="{TemplateBinding FontSize}"
Margin="{StaticResource PhoneMargin}">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel/>
<!-- Ensures all containers will be available during the Loaded event -->
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
</ListBox>
</Grid>
</Border>
</Popup>
私の挑戦があり、私はこのポップアップリストにバインドされた各項目のテキストをトリミングする必要があります。もっと重要なことに、私はコンバータでこれを行う必要があります。これも可能ですか?このテンプレートでコンバータを使用するにはどうすればよいですか?従来、私は次のようなものを使用しました:
<TextBlock Text="{Binding Path=Name, Converter={StaticResource myConverter}}" />
私のListPickerのポップアップ内の項目にどのようにコンバータを適用しますか?
ありがとうございました!
すごいです!どうもありがとうございます! – user609886