自定义控件中,IPAddress部类的自定义依赖属性

自定义控件中,IPAddress类型的自定义依赖属性
我做了一个自定义控件,其中有一个自定义依赖属性是IPAddress类型的,我希望这个属性可以在设计界面的属性窗口中编辑。但是按照int、string这样的常用类型的写法没法实现,如下:
          public IPAddress RemoteIP
         {
             get { return (IPAddress)this.GetValue(RemoteIPProperty); }
             set { this.SetValue(RemoteIPProperty, value); }
         }
         private static readonly DependencyProperty RemoteIPProperty = DependencyProperty.Register("RemoteIP", typeof(IPAddress), typeof(ThisClass), new PropertyMetadata(new IPAddress(16885952)));
虽然属性窗口有显示,但是内容是空白,也不能编辑。
项目是wp8的,使用的vs2012.
请问有什么办法可以实现
控件

------解决方案--------------------
IPAddress没有缺省构造,所以wpf设计器没有办法正确生成这个属性的xaml。
简单的做法你就把RemoteIP改成string类型,用到的时候再转下。
否则可以派生一个MyIPAddress的不带参数构造类型:

public class MyTextBox : TextBox
{
[TypeConverter(typeof (IpAddrConverter))]
public MyIPAddress RemoteIP
{
get { return (MyIPAddress)this.GetValue(RemoteIPProperty); }
set { this.SetValue(RemoteIPProperty, value); }
}
private static readonly DependencyProperty RemoteIPProperty = DependencyProperty.Register("RemoteIP",
typeof(MyIPAddress), typeof (MyTextBox), new PropertyMetadata(new MyIPAddress()));
}

public class MyIPAddress : IPAddress
{
public MyIPAddress() : base(0) { }
public MyIPAddress(IPAddress ip) : base(ip.Address) { }
}

public class IpAddrConverter : TypeConverter
{
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
{
if (sourceType == typeof (string)) return true;
return base.CanConvertFrom(context, sourceType);
}
 
public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)