Albumview controls
One, style one
We want to achieve the effect in the following actions:
- Drag a Albumview control to the form interface from "Smobiler components" on the toolbar
- Modifying the properties of a Albumview
- Load event code
C#:
private void Testalbumview_load (object sender, EventArgs e)
{
DataTable mattable = new DataTable ();
MATTABLE.COLUMNS.ADD ("Mat_desc1", typeof (String));
MATTABLE.ROWS.ADD ();
mattable.rows[0]["MAT_DESC1"] = "Q1";
MATTABLE.ROWS.ADD ();
mattable.rows[1]["MAT_DESC1"] = "Q2";
MATTABLE.ROWS.ADD ();
mattable.rows[2]["MAT_DESC1"] = "Q3";
MATTABLE.ROWS.ADD ();
mattable.rows[3]["MAT_DESC1"] = "Q4";
MATTABLE.ROWS.ADD ();
mattable.rows[4]["MAT_DESC1"] = "Q5";
MATTABLE.ROWS.ADD ();
mattable.rows[5]["MAT_DESC1"] = "Q6";
MATTABLE.ROWS.ADD ();
mattable.rows[6]["MAT_DESC1"] = "Q7";
MATTABLE.ROWS.ADD ();
mattable.rows[7]["MAT_DESC1"] = "Q8";
MATTABLE.ROWS.ADD ();
mattable.rows[8]["MAT_DESC1"] = "Q9";
MATTABLE.ROWS.ADD ();
mattable.rows[9]["MAT_DESC1"] = "Q10";
Bind data to Albumview
This.albumView1.DataSource = mattable;
This.albumView1.DataBind ();
}
- ColumnCount Property
Gets or sets the number of columns for the Albumview, set by default to "4", 1;
Figure 1 Setting up the interface
- Dispalymember Property
Set the data display field, set the property to "Mat_desc1", 2;
Figure 2 Setting up the interface
- Location Property
Make the control appear in the appropriate position (0, 120), 3;
Figure 3 Setting up the interface
- Mode property
Gets or sets the get image mode, the default setting is "file", which means that the image is read directly from the file, 4;
Figure 4 Setting up the interface
Setting this property to "Customize" indicates that the binary data of the image can be obtained from the custom interface.
- RowHeight Property
Gets or sets the row height of the control, which is set by default to "30", 5;
Figure 5 Setting up the interface
- Size Property
Make the Albumview control size (120, 90), 6;
Figure 6 Setting up the interface
Second, the mobile phone effect display
VisualStudio Mobile Development (C #, VB. NET) Smobiler Development Platform--albumview album controls how to use