GetIsReadOnly() public static method

public static GetIsReadOnly ( DependencyObject obj ) : bool
obj System.Windows.DependencyObject
return bool
Esempio n. 1
0
        protected void _OnNavigating(object entity)
        {
            if (Navigating != null)
            {
                Navigating(entity);
            }
            else
            {
                var options = new NavigateOptions();

                bool isReadOnly = (ReadonlyEntity ?? Common.GetIsReadOnly(this));
                if (isReadOnly)
                {
                    options.ReadOnly = isReadOnly;
                }

                Navigator.NavigateUntyped(entity, options);
            }
        }
Esempio n. 2
0
        private object _OnViewing(object entity, bool creating)
        {
            if (Viewing != null)
            {
                return(Viewing(entity));
            }

            var options = new ViewOptions
            {
                PropertyRoute = CleanType.IsEmbeddedEntity() ? GetEntityPropertyRoute() : null,
            };

            bool isReadOnly = (ReadonlyEntity ?? Common.GetIsReadOnly(this)) && !creating;

            if (isReadOnly)
            {
                options.ReadOnly = isReadOnly;
            }

            return(Navigator.ViewUntyped(entity, options));
        }
 protected override bool CanRemove()
 {
     return(Remove && !Common.GetIsReadOnly(this));
 }
Esempio n. 4
0
 protected virtual bool CanCreate()
 {
     return(Entity == null && Create && !Common.GetIsReadOnly(this));
 }
Esempio n. 5
0
 protected virtual bool CanRemove()
 {
     return(Entity != null && Remove && !Common.GetIsReadOnly(this));
 }
Esempio n. 6
0
 protected virtual bool CanFind()
 {
     return(Entity == null && Find && !Common.GetIsReadOnly(this));
 }
Esempio n. 7
0
 public bool CanAutocomplete()
 {
     return(!Common.GetIsReadOnly(this) && Autocomplete);
 }
Esempio n. 8
0
 protected virtual bool CanMove()
 {
     return(Move && !Common.GetIsReadOnly(this));
 }
Esempio n. 9
0
 protected override bool CanCreate()
 {
     return(Create && !Common.GetIsReadOnly(this));
 }
Esempio n. 10
0
 protected override bool CanFind()
 {
     return(Find && !Common.GetIsReadOnly(this));
 }
 protected bool CanAutocomplete()
 {
     return(Autocomplete && !Common.GetIsReadOnly(this));
 }