private void GenerateLayout() { double num1 = this._marginTop; /* * VirtualizableImage a = new VirtualizableImage(40.0, 40.0, new Thickness(10, 0, 0, 0), "https://pp.userapi.com/c637424/v637424389/1abb0/RnkBYW_Ucjw.jpg", new Action<VirtualizableImage>(this.imageTap), "1", false, true, (Stretch)3, null, -1.0, false, true); * * base.VirtualizableChildren.Add(a); */ //ForwardedHeaderItem: /* * TextBlock textBlock1 = new TextBlock(); * textBlock1.Foreground = Application.Current.Resources["PhoneNameBlueBrush"] as SolidColorBrush; * textBlock1.FontFamily = new FontFamily("Segoe WP Semibold"); * textBlock1.Margin = (new Thickness(60.0, -8.0, 0.0, 0.0)); * textBlock1.Text = ("this._mvm.UIUserName" ?? ""); * this.Children.Add(textBlock1); */ TextBlock textBlock3 = new TextBlock(); textBlock3.Foreground = Application.Current.Resources["PhoneVKSubtleBrush"] as SolidColorBrush; textBlock3.Margin = (new Thickness(60.0, 18.0, 0.0, 0.0)); textBlock3.Text = UIStringFormatterHelper.FormatDateForMessageUI(Extensions.UnixTimeStampToDateTime((double)this._wallPost.date, true)); this.Children.Add(textBlock3); NewsTextItem _textItem = new NewsTextItem(this._verticalWidth - this._marginLeft * 2.0 - 3.0, new Thickness(this._marginLeft + 0, num1, 0.0, 0.0), this._wallPost.text, false, null, 20.0 /*25.33*/, new FontFamily("Segoe WP Semilight"), 24.0 /*32.0*/, (Application.Current.Resources["PhoneForegroundBrush"] as SolidColorBrush), true, this._horizontalWidth - this._marginLeft * 2.0 - 160.0, HorizontalAlignment.Left, "", TextAlignment.Left, true, null, false, false); num1 += _textItem.FixedHeight; base.VirtualizableChildren.Add(_textItem); AttachmentsItem a0 = new AttachmentsItem(base.Width, new Thickness(this._marginLeft, num1, 0, 0), this._wallPost.attachments, this._wallPost.geo, this._wallPost.id.ToString(), false, true); num1 += a0.FixedHeight; base.VirtualizableChildren.Add(a0); num1 += this._marginTop; this._height = num1; }
private string GetEventDate() { return(UIStringFormatterHelper.FormatDateForMessageUI(Extensions.UnixTimeStampToDateTime((double)this._group.start_date, false))); }
public void RefreshUIProperties() { Execute.ExecuteOnUIThread((Action)(() => { this.UIMessageText = this._message.body; this.ProcessMessageAction(); this.UIDate = this._outboundMessage == null || this._outboundMessage.OutboundMessageStatus != OutboundMessageStatus.Failed ? UIStringFormatterHelper.FormatDateForMessageUI(Extensions.UnixTimeStampToDateTime((double)this._message.date, true)) : string.Empty; this.UpdateUIOpacity(); if (this.IsChat || this._isForwarded) { this.UIImageUrl = this._associatedUser.photo_max; } this.UIUserName = this._associatedUser.first_name; this.NotifyPropertyChanged <Visibility>((Expression <Func <Visibility> >)(() => this.UIStatusDelivered)); this.NotifyPropertyChanged <Visibility>((Expression <Func <Visibility> >)(() => this.UIStatusFailed)); this.NotifyPropertyChanged <Visibility>((Expression <Func <Visibility> >)(() => this.DateTimeVisibility)); this.NotifyPropertyChanged <Visibility>((Expression <Func <Visibility> >)(() => this.UIStatusMessageNotRead)); foreach (MessageViewModel forwardedMessage in (Collection <MessageViewModel>) this.ForwardedMessages) { forwardedMessage.RefreshUIProperties(); } this.NotifyPropertyChanged <string>((Expression <Func <string> >)(() => this.ForwardedMessagesHeaderText)); this.NotifyPropertyChanged <bool>((Expression <Func <bool> >)(() => this.HaveForwardedMessages)); this.NotifyPropertyChanged <Visibility>((Expression <Func <Visibility> >)(() => this.UIHaveMessageText)); this.NotifyPropertyChanged <Visibility>((Expression <Func <Visibility> >)(() => this.HaveAttachments)); this.NotifyPropertyChanged <Visibility>((Expression <Func <Visibility> >)(() => this.HaveForwardedMessagesVisivility)); this.NotifyPropertyChanged <Thickness>((Expression <Func <Thickness> >)(() => this.ForwardedMargin)); this.NotifyPropertyChanged <bool>((Expression <Func <bool> >)(() => this.IsInSelectionMode)); })); }