Home WeChat Applet WeChat Development Detailed graphic explanation of how to imitate the message style of WeChat Moments in .Net language Smobiler development

Detailed graphic explanation of how to imitate the message style of WeChat Moments in .Net language Smobiler development

Mar 31, 2017 pm 03:28 PM

This article mainly introduces how the .Net language Smobiler development platform can imitate the message style of WeChat Moments? This article reveals the answer for everyone

The first words: Smobiler is a development platform that uses .Net language to develop APP in the VS environment. It may be more convenient than Xamarin

1. Goal Style

Detailed graphic explanation of how to imitate the message style of WeChat Moments in .Net language Smobiler development

To achieve the effect in the picture above, we need the following operations:

1. From the "Smobiler Components" on the toolbar Drag a MicroBlog control onto the form interface

Detailed graphic explanation of how to imitate the message style of WeChat Moments in .Net language Smobiler development

2. Use code to add the content displayed on the mobile phone interface

Load event code:

VB:


 Private Sub TestMicroBlog_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  Try
   Me.MicroBlog1.DefaultUserName = "伟斌"
   Me.MicroBlog1.DefaultUserID = "伟斌"

   contentArray(0) = "把青春献给身后那座"+ vbCrLf + "辉煌的城市" + vbCrLf + "为了这个美梦" + vbCrLf + "我们付出着代价"
   
   userarray(0) = "伟斌"

   picturearray(0) = 0

   InitialMicroBlogData()

  Catch ex As Exception
   MessageBox.Show(ex.Message, Sub() Me.Close())
  End Try
End Sub C#:
 private void TestMicroBlog_Load(object sender, EventArgs e)
 {
  try
  {
   this.MicroBlog1.DefaultUserName = "伟斌";
   this.MicroBlog1.DefaultUserID = "伟斌";

   contentArray[0] = "把青春献给身后那座" + System.Environment.NewLine + "辉煌的城市" + System.Environment.NewLine + "为了这个美梦"+ System.Environment.NewLine + "我们付出着代价";
   
   userarray[0] = "伟斌";

   picturearray[0] = "0";

   InitialMicroBlogData();
  }
  catch (Exception ex)
  {
   MessageBox.Show(ex.Message, (Object s, MessageBoxHandlerArgs args) => this.Close());
  }
 }
Copy after login

Other codes:
VB:


##

 Dim contentArray(4) As String
 Dim userarray(4) As String
 Dim picturearray(8) As String
 Dim voice(5) As String
 Private Sub InitialMicroBlogData(Optional count As Integer = 10, Optional ByVal insert As Boolean = False)
  Dim user As String = userarray(0)
  Dim picturerandomnum As Integer = 6
  Dim imageList As New List(Of String)
  imageList.Add(6)
  
  Dim item As New MicroBlogItem(user, user, contentArray(0), DateTime.Now.ToString)
  item.Pictures = imageList
  item.ILikes.Add(userarray(0), userarray(0))
  If insert = False Then
    Me.MicroBlog1.BlogItems.Add(item)
  Else
    Me.MicroBlog1.BlogItems.AddTop(item)
  End If
 Next
End Sub C#:
 string[] contentArray = new string[5];
 string[] userarray = new string[5];
 string[] picturearray new string[9];
 string[] voice = new string[6];
 private void InitialMicroBlogData(int count = 10, bool insert = false)
 {
  string user = userarray[0];
  List<string> imageList = new List<string>();
  imageList.Add("6");    
  MicroBlogItem item = new MicroBlogItem(user, user, contentArray[0], DateTime.Now.ToString());
  item.Pictures = imageList;
  item.ILikes.Add(userarray[0], userarray[0]);
  if (insert == false)
  {
    this.MicroBlog1.BlogItems.Add(item);
  }
  else
    this.MicroBlog1.BlogItems.AddTop(item);
  }
 }
Copy after login

2. Mobile phone effect display

Detailed graphic explanation of how to imitate the message style of WeChat Moments in .Net language Smobiler development

Detailed graphic explanation of how to imitate the message style of WeChat Moments in .Net language Smobiler development

##

The above is the detailed content of Detailed graphic explanation of how to imitate the message style of WeChat Moments in .Net language Smobiler development. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)