Windows.UI.Xaml.FrameworkElement.SetBinding C# (CSharp) Method

SetBinding() public method

public SetBinding ( [ dp, [ binding ) : void
dp [
binding [
return void
		public extern void SetBinding([In] DependencyProperty dp, [In] BindingBase binding);
		protected virtual extern Size MeasureOverride([In] Size availableSize);

Usage Example

コード例 #1
0
ファイル: ViewMapper.cs プロジェクト: ShibaJS/Shiba
        public override void SetValue(NativeView view, object value)
        {
            switch (value)
            {
            case null:
                view.SetValue(DependencyProperty, null);
                break;

            case NativeBinding binding:
                binding.Mode = IsTwoWay ? BindingMode.TwoWay : BindingMode.OneWay;
                view.SetBinding(DependencyProperty, binding);
                break;

            default:
                if (!ValueType.IsEnum)
                {
                    value.TryChangeType(ValueType, out value);
                }
                value = Converter == null ? value : Converter.Invoke(value);
                if (value.GetType() == PropertyType)
                {
                    view.SetValue(DependencyProperty, value);
                }
                break;
            }
        }
All Usage Examples Of Windows.UI.Xaml.FrameworkElement::SetBinding