Exemplo n.º 1
0
        public void AddOperation(IAsyncOperation operation)
        {
            var item = new AsyncOperationItem
            {
                Operation = operation,
                IsOneTime = true
            };

            AddItem(item);
        }
Exemplo n.º 2
0
        public void SetOperationBinding(object source, string path)
        {
            if (source == null)
            {
                throw new ArgumentNullException("source");
            }

            var binding = new Binding(path)
            {
                Mode   = BindingMode.OneWay,
                Source = source
            };

            var item = new AsyncOperationItem {
                IsOneTime = false
            };

            BindingOperations.SetBinding(item, AsyncOperationItem.OperationProperty, binding);

            AddItem(item);
        }