hi i'm trying to create a custom control with a public property Boundary of type MovingBoundary(as below), but when i'm trying to use my custom control in a xaml i cant't initialize Boundary property.
<custom:MyCustomControl
x:Name="m1"
Canvas.Left="0"
Canvas.Top="0"
Boundry.Top="100" />
line6 gives erro.
any help will be apprciated.
public class MovingBoundry : ViewModelBase
{
private double _left = double.MinValue;
public double Left
{
get
{
return _left;
}
set
{
if (value == _left) return;
_left = value;
RaisePropertyChanged(nameof(Left));
}
}
private double _right = double.MaxValue;
public double Right
{
get
{
return _right;
}
set
{
if (value == _right) return;
_right = value;
RaisePropertyChanged(nameof(Right));
}
}
private double _top = double.MinValue;
public double Top
{
get
{
return _top;
}
set
{
if (value == _top) return;
_top = value;
RaisePropertyChanged(nameof(Top));
}
}
private double _bottom = double.MaxValue;
public double Bottom
{
get
{
return _bottom;
}
set
{
if (value == _bottom) return;
_bottom = value;
RaisePropertyChanged(nameof(Bottom));
}
}
}