1

Microsoft アプリや、Facebook、Whatsapp などのサードパーティ アプリで表示される既定のビュー用の無料の XAML テンプレートはありますか?

SMS や Whatsapp アプリで使用されているような、メッセージ スレッドを表示するためのテンプレートを探しています。アプリ (メッセージング、更新、その他多くの機能を備えたソーシャル プラットフォーム アプリ) を開発する途中で、Microsoft が開発者として私たちをサポートしていないように見えるため、既定の UI ビューを実装する際にいくつかの問題がありました。うまくいけば、コミュニティの誰かがいくつかのテンプレートを作成し、それらを共有しています.

また、Nokia が提供するような開発者コミュニティへのリンクにも感謝します。

4

1 に答える 1

3

SMS テンプレート リクエストに対する手っ取り早い解決策は次のとおりです。これは電話機のアクセント カラーを尊重しますが、受信メッセージ ボックスと送信メッセージ ボックスの色の正しい違いを得るには、さらに微調整が必​​要になる場合があります。また、色リソースをアイテムの宣言の外に移動して、それらが再利用されるようにすることも価値があります。

<!-- incoming message template -->
<Grid Width="294" HorizontalAlignment="Left" Margin="20,0,0,10">
    <Grid.Resources>
        <SolidColorBrush x:Key="IncomingColor" Color="{StaticResource PhoneAccentColor}" />
        <SolidColorBrush x:Key="MessageForeground" Color="White" />
        <SolidColorBrush x:Key="TimeForeground" Color="White" Opacity="0.6" />
    </Grid.Resources>
    <Grid.RowDefinitions>
        <RowDefinition Height="18"/>
        <RowDefinition Height="Auto"/>
    </Grid.RowDefinitions>
    <Path Fill="{StaticResource IncomingColor}" Data="M19 18 l 0 -18 l 24 18 z" />
    <Grid Background="{StaticResource IncomingColor}" Grid.Row="1">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <TextBlock Text="Message content goes in here. It should wrap and take as many lines as are required to display the whole thing" TextWrapping="Wrap" Margin="10,10,10,0" Foreground="{StaticResource MessageForeground}"/>
        <TextBlock Grid.Row="1" Text="17:53" Margin="10,0,10,10" HorizontalAlignment="Right" Foreground="{StaticResource TimeForeground}"/>
    </Grid>
</Grid>

<!-- outgoing message template -->
<Grid Width="294" HorizontalAlignment="Right" Margin="0,10,20,0">
    <Grid.Resources>
        <SolidColorBrush x:Key="OutgoingColor" Opacity="0.7" Color="{StaticResource PhoneAccentColor}" />
        <SolidColorBrush x:Key="MessageForeground" Color="White" />
        <SolidColorBrush x:Key="TimeForeground" Color="White" Opacity="0.6" />
    </Grid.Resources>
    <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="18"/>
    </Grid.RowDefinitions>
    <Path Grid.Row="1" Fill="{StaticResource OutgoingColor}" Data="M 275 0 l 0 18 l -24 -18 z" />
    <Grid Background="{StaticResource OutgoingColor}" >
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <TextBlock Text="Message content goes in here." TextWrapping="Wrap" Margin="10,10,10,0" Foreground="{StaticResource MessageForeground}"/>
        <TextBlock Grid.Row="1" Text="17:53" Margin="10,0,10,10" HorizontalAlignment="Right" Foreground="{StaticResource TimeForeground}"/>
    </Grid>
</Grid>
于 2013-10-03T11:48:01.087 に答える