Hi,I tried to the code below but I cant drop my picturebox on form. Any ideas?
using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;
using MicroFour.StrataFrame.UI.Windows.Forms;
using JK.Framework.Base;
namespace JK.Framework.UI.Windows.Forms
{
[Designer(typeof(System.Windows.Forms.Design.ControlDesigner))]
public class ImageLocationPictureBox : System.Windows.Forms.PictureBox, INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
public string ImageLocation2
{
get
{
return this.ImageLocation;
}
set
{
string lcImageLocation = this.ImageLocation;
if (this.CheckPropertyChanged<string>("ImageLocation2", ref lcImageLocation, ref value))
{
this.ImageLocation = value;
this.ImageLocation2Changed();
}
}
}
protected bool CheckPropertyChanged<T>(string propertyName, ref T oldValue, ref T newValue)
{
if (oldValue == null && newValue == null)
{
return false;
}
if ((oldValue == null && newValue != null) || !oldValue.Equals((T)newValue))
{
oldValue = newValue;
FirePropertyChanged(propertyName);
return true;
}
return false;
}
protected void FirePropertyChanged(string propertyName)
{
if (this.PropertyChanged != null)
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
private void ImageLocation2Changed()
{
this.FirePropertyChanged("ImageLocation2");
}
}
}