Ejemplo n.º 1
0
        async void OnViewChangeCompleted(object sender, SemanticZoomViewChangedEventArgs e)
        {
            if (e.IsSourceZoomedInView)
            {
                return;
            }

            // HACK: Technically more than one short name could be the same, this will potentially find the wrong one in that case
            var item = (string)e.SourceItem.Item;

            var templatedItems = TemplatedItemsView.TemplatedItems;
            int index          = templatedItems.ShortNames.IndexOf(item);

            if (index == -1)
            {
                return;
            }

            var til = templatedItems.GetGroup(index);

            if (til.Count == 0)
            {
                return;                 // FIXME
            }
            // Delay until after the SemanticZoom change _actually_ finishes, fixes tons of odd issues on Phone w/ virtualization.
            if (Device.Idiom == TargetIdiom.Phone)
            {
                await Task.Delay(1);
            }

            IListProxy listProxy = til.ListProxy;

            ScrollTo(listProxy.ProxiedEnumerable, listProxy[0], ScrollToPosition.Start, true, true);
        }
Ejemplo n.º 2
0
 public ProxySelect(string name, IListProxy proxy, Type itemType, bool allowDerived, IList list)
 {
     Name         = name;
     Proxy        = proxy;
     ItemType     = itemType;
     AllowDerived = allowDerived;
     List         = list;
 }
Ejemplo n.º 3
0
        public void Setup(IListProxy proxy)
        {
            Clear();

            Control = new ListControl(proxy);

            Add(Control);
            AddToClassList(UssClassName);
        }
Ejemplo n.º 4
0
        public ListControl(IListProxy proxy) : base(true)
        {
            Proxy = proxy;

            CreateFrame();
            SetupDragging();
            Refresh();

            AddToClassList(UssClassName);
            this.AddStyleSheet(Configuration.ElementsPath, Stylesheet);
        }
Ejemplo n.º 5
0
 /// <summary>
 /// Rule arg class constructor to abstract the creation of rules
 /// </summary>
 /// <param name="ruleId"></param>
 /// <param name="dataType"></param>
 /// <param name="description"></param>
 /// <param name="operands"></param>
 /// <param name="childRules"></param>
 /// <param name="logicType"></param>
 /// <param name="mode"></param>
 /// <param name="failureCode"></param>
 /// <param name="listProxy"></param>
 /// <param name="tenantId"></param>
 public RuleArguments(Guid ruleId, DataType dataType, string description, IReadOnlyList <IOperand> operands, IReadOnlyList <IRule> childRules,
                      LogicType logicType, EvaluationMode mode, string failureCode, IListProxy listProxy, string tenantId)
 {
     RuleId      = ruleId;
     DataType    = dataType;
     Description = description;
     Operands    = operands;
     ChildRules  = childRules;
     LogicType   = logicType;
     Mode        = mode;
     FailureCode = failureCode;
     ListProxy   = listProxy;
     TenantId    = tenantId;
 }
Ejemplo n.º 6
0
 public void Setup(SerializedProperty property, IListProxy proxy)
 {
     bindingPath = property.propertyPath;
     Setup(proxy);
 }
Ejemplo n.º 7
0
 public static IListProxyEvents Events(this IListProxy This)
 {
     return(new IListProxyEvents(This));
 }
Ejemplo n.º 8
0
 public IListProxyEvents(IListProxy This)
 {
     this.This = This;
 }