T
Tamir Khason
Question when I'm using property of Point (or Size) type in User Control. In
design time while adding the control you can edit X,Y each one.
I want to create my own struct like point to be able to appears as point in
designer. In my case I can see only ReadOnly "10x10" in Properties view
while adding this user control
Following the example:
[DefaultValue(typeof(Dimension),"16x16"), Category("Design"),
Description("Dimension Value"),
Editor (typeof(Dimension),typeof(System.Drawing.Design.UITypeEditor))]
public Dimension Size {get{return m_size;} set{m_size=value;}}
-----------------------
public struct Dimension
{
int m_inputs;
public int Inputs{get{return m_inputs;}set{m_inputs=value;}}
int m_outputs;
public int Outputs{get{return m_outputs;}set{m_outputs=value;}}
public Dimension(int inputs, int outputs)
{
m_inputs=inputs;
m_outputs = outputs;
}
public override string ToString()
{
return Inputs.ToString()+"x"+Outputs.ToString();
}
}
Please assist
design time while adding the control you can edit X,Y each one.
I want to create my own struct like point to be able to appears as point in
designer. In my case I can see only ReadOnly "10x10" in Properties view
while adding this user control
Following the example:
[DefaultValue(typeof(Dimension),"16x16"), Category("Design"),
Description("Dimension Value"),
Editor (typeof(Dimension),typeof(System.Drawing.Design.UITypeEditor))]
public Dimension Size {get{return m_size;} set{m_size=value;}}
-----------------------
public struct Dimension
{
int m_inputs;
public int Inputs{get{return m_inputs;}set{m_inputs=value;}}
int m_outputs;
public int Outputs{get{return m_outputs;}set{m_outputs=value;}}
public Dimension(int inputs, int outputs)
{
m_inputs=inputs;
m_outputs = outputs;
}
public override string ToString()
{
return Inputs.ToString()+"x"+Outputs.ToString();
}
}
Please assist