Optimization, refactoring, debugging
Related Work Items: #251, #252, #261
This commit is contained in:
@@ -31,10 +31,8 @@ namespace FoxTube.Controls.Adverts
|
||||
{
|
||||
title.Text = advert.Title;
|
||||
image.Source = new BitmapImage(advert.MainImages.First().Url.ToUri());
|
||||
if (advert.AdIcon == null)
|
||||
contentGrid.ColumnDefinitions[0].Width = new GridLength(0);
|
||||
else
|
||||
icon.ProfilePicture = advert.AdIcon.Source;
|
||||
|
||||
icon.ProfilePicture = advert.AdIcon.Source;
|
||||
|
||||
if (string.IsNullOrWhiteSpace(advert.SponsoredBy))
|
||||
sponsor.Visibility = Visibility.Collapsed;
|
||||
@@ -53,10 +51,5 @@ namespace FoxTube.Controls.Adverts
|
||||
|
||||
Visibility = Visibility.Visible;
|
||||
}
|
||||
|
||||
private void UserControl_SizeChanged(object sender, SizeChangedEventArgs e)
|
||||
{
|
||||
Height = e.NewSize.Width * 0.75;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user