namespace EmreIstikam001.component.TehranOffice.Components.Other.CustomLibrary
{
    partial class ListItemUC
    {
        /// <summary> 
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary> 
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Component Designer generated code

        /// <summary> 
        /// Required method for Designer support - do not modify 
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.previewPic = new System.Windows.Forms.PictureBox();
            this.lblFileName = new System.Windows.Forms.Label();
            this.SelectedSigne = new System.Windows.Forms.Panel();
            ((System.ComponentModel.ISupportInitialize)(this.previewPic)).BeginInit();
            this.SuspendLayout();
            // 
            // previewPic
            // 
            this.previewPic.Location = new System.Drawing.Point(25, 25);
            this.previewPic.Name = "previewPic";
            this.previewPic.Size = new System.Drawing.Size(250, 150);
            this.previewPic.TabIndex = 0;
            this.previewPic.TabStop = false;
            // 
            // lblFileName
            // 
            this.lblFileName.AutoSize = true;
            this.lblFileName.Font = new System.Drawing.Font("Century Gothic", 16F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.lblFileName.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
            this.lblFileName.Location = new System.Drawing.Point(94, 191);
            this.lblFileName.Name = "lblFileName";
            this.lblFileName.Size = new System.Drawing.Size(113, 38);
            this.lblFileName.TabIndex = 1;
            this.lblFileName.Text = "label1";
            // 
            // SelectedSigne
            // 
            this.SelectedSigne.BackColor = System.Drawing.Color.Transparent;
            this.SelectedSigne.ForeColor = System.Drawing.Color.Transparent;
            this.SelectedSigne.Location = new System.Drawing.Point(0, 280);
            this.SelectedSigne.Name = "SelectedSigne";
            this.SelectedSigne.Size = new System.Drawing.Size(300, 20);
            this.SelectedSigne.TabIndex = 2;
            // 
            // ListItemUC
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.Controls.Add(this.SelectedSigne);
            this.Controls.Add(this.lblFileName);
            this.Controls.Add(this.previewPic);
            this.Name = "ListItemUC";
            this.Size = new System.Drawing.Size(300, 300);
            ((System.ComponentModel.ISupportInitialize)(this.previewPic)).EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.PictureBox previewPic;
        private System.Windows.Forms.Label lblFileName;
        private System.Windows.Forms.Panel SelectedSigne;
    }
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace EmreIstikam001.component.TehranOffice.Components.Other.CustomLibrary
{
    public partial class ListItemUC : UserControl
    {
        public ListItemUC()
        {
            InitializeComponent();
            SelectedSigne.BackColor = Color.Transparent;
        }

        private string _title;
        private Bitmap _icon;
        private bool _isSelected;

        [Category("Custom Props")]
        public string Title
        {
            get => _title;
            set
            {
                _title = value;
                lblFileName.Text = value;
            }
        }

        [Category("Custom Props")]
        public Bitmap Icon
        {
            get => _icon;
            set
            {
                _icon = value;
                previewPic.Image = value;
            } 
        }

        [Category("Custom Props")]
        public bool IsSelected
        {
            get => _isSelected;
            set
            {
                _isSelected = value;
                if (value)
                {
                    SelectedSigne.BackColor = Color.DarkCyan;
                }
                else
                {
                    SelectedSigne.BackColor = Color.Transparent;
                }
            }
        }
      
    }
}