Beispiel #1
0
 public FrameworkElement ResolveEditor(PropertyItem propertyItem)
 {
     Binding binding = new Binding("Value")
     {
         Source = propertyItem,
         Mode = propertyItem.IsReadOnly ? BindingMode.OneWay : BindingMode.TwoWay
     };
     BindingOperations.SetBinding(this, ShaderTypeView.ValueProperty, binding);
     SelectedShaderAsset = ShaderAssets.Find((sa) => sa.Shader == propertyItem.Value as Shader);
     return this;
 }
Beispiel #2
0
        public FrameworkElement ResolveEditor(PropertyItem propertyItem)
        {
            var binding = new Binding("Value")
            {
                Source = propertyItem,
                Mode = propertyItem.IsReadOnly ? BindingMode.OneWay : BindingMode.TwoWay
            };
            BindingOperations.SetBinding(this, FloatTypeView.ValueProperty, binding);

            Value = (float)propertyItem.Value;

            return this;
        }
        public FrameworkElement ResolveEditor(PropertyItem propertyItem)
        {
            Binding binding = new Binding("Value")
            {
                Source = propertyItem,
                Mode = propertyItem.IsReadOnly ? BindingMode.OneWay : BindingMode.TwoWay
            };
            BindingOperations.SetBinding(this, TextureTypeView.ValueProperty, binding);

            if (propertyItem.Value != null)
                SelectedTextureAsset = TextureAssets.FirstOrDefault((ta) => ta.Texture == propertyItem.Value as Texture);

            return this;
        }