VerticalOptions="CenterAndExpand"
HorizontalOptions="CenterAndExpand"
Source="{Binding ThumbnailPath}"/>
- </Views:CustomImageControl>
+ </Views:CustomImageControl>
<Utils:NinePatch x:Name="DimImage"
VerticalOptions="CenterAndExpand"
HorizontalOptions="CenterAndExpand"
Source="img_stroke2.9.png"
IsVisible="{Binding IsDeleteStatus}"
Opacity="0"/>
- <Label x:Name="ContentTitle"
- TextColor="White"
- LineBreakMode="TailTruncation"
- Text="{Binding ContentName}"/>
+ <RelativeLayout x:Name="TitleContainer">
+ <Label x:Name="ContentTitle"
+ TextColor="White"
+ LineBreakMode="NoWrap"
+ Text="{Binding ContentName}"/>
+ </RelativeLayout>
</RelativeLayout>
private Rectangle PlayIconBounds;
+ private Rectangle TitleContainerBounds;
private Rectangle ContentTitleBounds;
public EventHandler OnFocusedEventHandler;
PlayIconBounds = new Rectangle(SizeUtils.GetWidthSize(208), SizeUtils.GetHeightSize(126), SizeUtils.GetWidthSize(80), SizeUtils.GetHeightSize(80));
- ContentTitleBounds = new Rectangle(SizeUtils.GetWidthSize(94), SizeUtils.GetHeightSize(214), SizeUtils.GetWidthSize(284), SizeUtils.GetHeightSize(30));
+ TitleContainerBounds = new Rectangle(SizeUtils.GetWidthSize(94), SizeUtils.GetHeightSize(214), SizeUtils.GetWidthSize(284), SizeUtils.GetHeightSize(30));
WidthRequest = SizeUtils.GetWidthSize(472);
HeightRequest = SizeUtils.GetHeightSize(332);
ImageArea.Layout(NormalBounds);
ContentImage.Layout(NormalContentImageBounds);
DimImage.Layout(NormalBounds);
- ContentTitle.Layout(ContentTitleBounds);
+ TitleContainer.Layout(TitleContainerBounds);
PlayImage.Layout(PlayIconBounds);
CheckDimImage.Layout(NormalBounds);
CheckImage.Layout(NormalBounds);
public async void OnUnfocused(object sender, FocusEventArgs e)
{
+ AnimationExtensions.AbortAnimation(this, "TextSliding");
BgDimImage.Opacity = 0;
Easing easing = new Easing(EasingFunction.EasyIn2);
#pragma warning disable CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
public async void OnFocused(object sender, FocusEventArgs e)
{
Easing easing = new Easing(EasingFunction.EasyIn1);
+ this.Animate("TextSilding",
+ (v) => { },
+ length: 2000,
+ finished: (a, b) =>
+ {
+ uint animationLength = (uint)(ContentTitle.Width * 12000 / 480);
+ this.Animate("TextSliding",
+ (v2) =>
+ {
+ ContentTitle.TranslationX = -ContentTitle.Width * v2;
+ },
+ length: animationLength,
+ finished: (c, d) =>
+ {
+ ContentTitle.TranslationX = 0;
+ });
+ });
+
await Task.Delay(167);
BgDimImage.Opacity = 0.99;
OnFocusedEventHandler?.Invoke(sender, e);