예제 #1
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.uc = ((System.Windows.Controls.LoadingMask)(target));
                return;

            case 2:
                this.grid = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.pr = ((System.Windows.Controls.ProgressRing)(target));
                return;
            }
            this._contentLoaded = true;
        }
예제 #2
0
        public LoadingAdorner(UIElement adornedElement, string Percent, string LoadingName)
            : base(adornedElement)
        {
            visualChildren = new VisualCollection(this);
            loading        = new LoadingMask();
            loading.UpdateLoadingInfo(Percent, LoadingName);

            Binding bd = new Binding("Width");

            bd.Source = adornedElement;
            bd.Mode   = BindingMode.OneWay;
            loading.SetBinding(FrameworkElement.WidthProperty, bd);

            Binding bd2 = new Binding("Height");

            bd2.Source = adornedElement;
            bd2.Mode   = BindingMode.OneWay;
            loading.SetBinding(FrameworkElement.HeightProperty, bd2);

            visualChildren.Add(loading);
        }