Height
問題は、ソース プロパティのタイプが double であり、タイプが でRowDefinition.Height
あることだと思いますGridLength
。コンバーターを使用すると、TwoWay で動作します
<Grid.RowDefinitions>
<RowDefinition Height="{Binding Path=Height,
Mode=TwoWay,
Converter={StaticResource DoubleGridLengthConverter}}"/>
<!--...-->
</Grid.RowDefinitions>
DoubleGridLengthConverter
public class DoubleGridLengthConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
return new GridLength((double)value);
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
GridLength gridLength = (GridLength)value;
return gridLength.Value;
}
}
更新
ここにサンプル アプリケーションをアップロードしました: http://www.mediafire.com/download.php?pgibb205d65596q
下部にRowDefinition.Height
値を入力して を設定し、TextBox
RowDefinition.Height
GridSplitter