Exemplo n.º 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;
 }
Exemplo n.º 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;
        }
Exemplo n.º 3
0
        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;
        }