SalesBuy
1-855-856-7678
Technical SupportSupport
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:common="clr-namespace:FlashCards.UI.Common"
xmlns:view="clr-namespace:FlashCards.UI"
xmlns:conv="clr-namespace:FlashCards.UI.Converters"
xmlns:controls="clr-namespace:FlashCards.UI.Controls"
x:Class="FlashCards.UI.DecalsTemplatesCode"
>
<conv:ObjectToVisibility x:Key="objectToVisibility" />
<conv:NopConverter x:Key="nopConverter" />
<DataTemplate x:Key="ImageDecalKey">
<Grid>
<Image
Visibility="{Binding IsImageDecal, Converter={StaticResource objectToVisibility}, ConverterParameter=True}"
Stretch="Uniform"
Source="{Binding MetaData.Source, Converter={StaticResource imageSourceConverter}}"
common:SurrogateBind.Value="{Binding Path=Orientation}"
common:SurrogateBind.Target="RenderTransform.Angle"
RenderTransformOrigin ="0.5,0.5"
>
<Image.RenderTransform>
<RotateTransform />
</Image.RenderTransform>
</Image>
</Grid>
</DataTemplate>
<DataTemplate x:Key="TextDecalKey">
<Grid>
<TextBlock
Visibility="{Binding IsTextDecal, Converter={StaticResource objectToVisibility}, ConverterParameter=True}"
x:Name="textBlock"
Margin="2"
TextAlignment="Center"
Foreground="{Binding MetaData.ColorBrush}"
Text="{Binding MetaData.Source}"
FontFamily="Segoe UI Semibold"
common:SurrogateBind.Value="{Binding Path=Orientation}"
common:SurrogateBind.Target="RenderTransform.Angle"
RenderTransformOrigin ="0.5,0.5"
>
<TextBlock.RenderTransform>
<RotateTransform />
</TextBlock.RenderTransform>
</TextBlock>
</Grid>
</DataTemplate>
<DataTemplate x:Key="InfoLinkDecalKey">
<Grid>
<Button
Visibility="{Binding IsInfoLinkDecal, Converter={StaticResource objectToVisibility}, ConverterParameter=True}"
x:Name="btn"
Content="{StaticResource Resource_OpenURL}"
common:ButtonService.Command="{Binding OpenUrl}"
Click="OpenUrl"
Margin="0,0,-2,-2"
HorizontalAlignment="Right"
VerticalAlignment="Bottom"
/>
</Grid>
</DataTemplate>
<DataTemplate x:Key="VideoControlDecalKey">
<Grid>
<ToggleButton
Visibility="{Binding IsVideoControlDecal, Converter={StaticResource objectToVisibility}, ConverterParameter=True}"
x:Name="btn"
Content="{StaticResource Resource_Play}"
Width="65"
Height="45"
common:ButtonService.Command="{Binding Play}"
Click="PlayVideo"
Margin="0,0,0,10"
/>
</Grid>
</DataTemplate>
<DataTemplate x:Key="VideoDecalKey">
<Grid>
<MediaElement
Visibility="{Binding IsVideoDecal, Converter={StaticResource objectToVisibility}, ConverterParameter=True}"
AutoPlay="False"
Margin="10"
Source="{Binding MetaData.Source}"
Loaded="MediaLoaded"
view:MediaPlayerHelper.IsPlay="{Binding VideoControl.IsPlay, Mode=TwoWay}"
/>
</Grid>
</DataTemplate>
<DataTemplate x:Key="TextToSpeechDecalKey">
<Grid>
<!--<Button x:Name="btn" Content="{StaticResource Resource_Play}" Width="65" Height="45" common:ButtonService.Command="{Binding Play}" Style="{StaticResource PlayButtonStyle}" Margin="0,0,0,10"/>-->
</Grid>
</DataTemplate>
</ResourceDictionary>