Inheritance: Control, IProgressRing
        private WC.ProgressRing GetBusyIndicator()
        {
            if (this.busyIndicator == null)
            {
                this.busyIndicator = new WC.ProgressRing()
                {
                    IsActive   = false,
                    Visibility = WX.Visibility.Collapsed,
                    //VerticalAlignment = WX.VerticalAlignment.Bottom,
                    //HorizontalAlignment = WX.HorizontalAlignment.Center,
                    Width  = this.Width,
                    Height = this.Height
                };
                WC.Canvas.SetZIndex(this.busyIndicator, 1);
                var c = WX.Window.Current.Content.FindChildControl <WC.Canvas>("");
                if (c != null)
                {
                    var x = (c.ActualWidth - this.Width) / 2;
                    var y = (c.ActualHeight - this.Height) / 2;

                    WC.Canvas.SetTop(this.busyIndicator, y);
                    WC.Canvas.SetLeft(this.busyIndicator, x);

                    c.Children.Add(this.busyIndicator);
                }
            }
            return(this.busyIndicator);
        }
Exemple #2
0
 protected override void OnApplyTemplate()
 {
     scrollViewer = GetTemplateChild("ScrollViewer") as ScrollViewer;
     progressRing = GetTemplateChild("ProgressRing") as ProgressRing;
     scrollViewer.Loaded += scrollViewer_Loaded;
     base.OnApplyTemplate();
 }
Exemple #3
0
        public ProgressManager(FlipView mainContent, StackPanel progressLayer, ProgressRing progressRingHandler)
        {
            this.mainContent = mainContent;
            this.progressLayer = progressLayer;
            this.progressRingHandler = progressRingHandler;

            this.progressRingHandler.IsActive = true;
            this.progressLayer.Visibility = Visibility.Visible;
            this.mainContent.Visibility = Visibility.Collapsed;
        }
        protected override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            scrollViewer = GetTemplateChild("ScrollViewer") as ScrollViewer;
            progressRing = GetTemplateChild("ProgressRing") as ProgressRing;
            if (scrollViewer != null)
            {
                scrollViewer.Loaded += ScrollViewerLoaded;
            }
        }
Exemple #5
0
        protected override void OnApplyTemplate()
        {
            _frame = base.GetTemplateChild("frame") as Grid;
            _webView = base.GetTemplateChild("webView") as WebView;
            _glass = base.GetTemplateChild("glass") as Grid;

            _container = base.GetTemplateChild("container") as Grid;
            _header = base.GetTemplateChild("header") as ContentPresenter;
            _footer = base.GetTemplateChild("footer") as ContentPresenter;
            _asideLeft = base.GetTemplateChild("asideLeft") as ContentPresenter;
            _asideRight = base.GetTemplateChild("asideRight") as ContentPresenter;

            _clip = base.GetTemplateChild("clip") as RectangleGeometry;

            _progress = base.GetTemplateChild("progress") as ProgressRing;

            _webView.NavigationStarting += OnNavigationStarting;
            _webView.NavigationCompleted += OnNavigationCompleted;
            _webView.ScriptNotify += OnScriptNotify;

            _glass.ManipulationStarting += OnGlassManipulationStarting;
            _glass.ManipulationStarted += OnGlassManipulationStarted;
            _glass.PointerPressed += OnGlassPointerPressed;

            _header.PointerWheelChanged += OnPointerWheelChanged;
            _footer.PointerWheelChanged += OnPointerWheelChanged;
            _asideLeft.PointerWheelChanged += OnPointerWheelChanged;
            _asideRight.PointerWheelChanged += OnPointerWheelChanged;

            _header.ManipulationStarted += OnAdornManipulationStarted;
            _footer.ManipulationStarted += OnAdornManipulationStarted;
            _asideLeft.ManipulationStarted += OnAdornManipulationStarted;
            _asideRight.ManipulationStarted += OnAdornManipulationStarted;

            _header.ManipulationDelta += OnAdornManipulationDelta;
            _footer.ManipulationDelta += OnAdornManipulationDelta;
            _asideLeft.ManipulationDelta += OnAdornManipulationDelta;
            _asideRight.ManipulationDelta += OnAdornManipulationDelta;

            _header.ManipulationCompleted += OnAdornManipulationCompleted;
            _footer.ManipulationCompleted += OnAdornManipulationCompleted;
            _asideLeft.ManipulationCompleted += OnAdornManipulationCompleted;
            _asideRight.ManipulationCompleted += OnAdornManipulationCompleted;

            _header.SizeChanged += AdornSizeChanged;
            _footer.SizeChanged += AdornSizeChanged;
            _asideLeft.SizeChanged += AdornSizeChanged;
            _asideRight.SizeChanged += AdornSizeChanged;

            this.SizeChanged += OnSizeChanged;

            base.OnApplyTemplate();
        }
Exemple #6
0
        public void ShowLoadingDialog()
        {
            ProgressRing pr = new ProgressRing()
            {
                IsActive = true, HorizontalAlignment = HorizontalAlignment.Stretch, VerticalAlignment = VerticalAlignment.Stretch
            };

            progressDialog = new ContentDialog()
            {
                Content = pr
            };
            progressDialog.ShowAsync();
        }
Exemple #7
0
        UWPControls.ProgressRing CreateGettingDataProgressRing()
        {
            var isGettingDataProgressRing = new UWPControls.ProgressRing();

            isGettingDataProgressRing.SetBinding(UWPControls.ProgressRing.IsActiveProperty,
                                                 new UWPXaml.Data.Binding()
            {
                Source = _viewModel,
                Path   = new UWPXaml.PropertyPath("IsGettingData")
            });

            return(isGettingDataProgressRing);
        }
        public AttachedProgress(Panel parentElement, double width, double height)
        {
            ParentElement = parentElement;
            isActive = false;
            popup = new Popup();
            progressRing = new ProgressRing();
            progressRing.IsActive = false;

            progressRing.VerticalAlignment = VerticalAlignment.Stretch;
            progressRing.HorizontalAlignment = HorizontalAlignment.Stretch;
            Width = width;
            Height = height;
            popup.Child = progressRing;

            parentElement.Children.Add(popup);
        }
        private async void RefreshButton_Click(object sender, RoutedEventArgs e)
        {
            if (refreshImage == null)
            {
                refreshImage = FlyoutHelper.FindNameInContainer<Image>(RefreshButton, "");
                refreshProgressRing = FlyoutHelper.FindNameInContainer<ProgressRing>(RefreshButton, "");
            }

            refreshImage.Visibility = Visibility.Collapsed;
            refreshProgressRing.IsActive = true;

            await particleDevice.RefreshAsync();

            refreshProgressRing.IsActive = false;
            refreshImage.Visibility = Visibility.Visible;
        }
Exemple #10
0
        protected override void OnApplyTemplate()
        {
            base.OnApplyTemplate();
            _textBlock = GetTemplateChild("TextBlock") as Windows.UI.Xaml.Controls.TextBlock;
            _proress   = GetTemplateChild("Progress") as Windows.UI.Xaml.Controls.ProgressRing;

            if (_textBlock != null)
            {
                _textBlock.Visibility = Visibility.Visible;
                _textBlock.Text       = Text;
            }

            if (_proress != null)
            {
                _proress.Visibility = Visibility.Collapsed;
            }
        }
        public LoadingView()
        {
            this.Height = 768;
            this.Width = 1366;

            this.Background = new SolidColorBrush(ColorHelper.FromArgb(170, 0, 0, 0));

            pr = new ProgressRing()
            {
                IsActive = true,
                Background = new SolidColorBrush(Colors.Transparent),
                Width = 80 ,
                Height = 80,
                BorderBrush = new SolidColorBrush(Colors.White),
                Foreground = new SolidColorBrush(Colors.White)
  
            }; 

            this.Children.Add(pr);
        }
        private WC.ProgressRing GetBusyIndicator() {
            if (this.busyIndicator == null) {
                this.busyIndicator = new WC.ProgressRing() {
                    IsActive = false,
                    Visibility = WX.Visibility.Collapsed,
                    //VerticalAlignment = WX.VerticalAlignment.Bottom,
                    //HorizontalAlignment = WX.HorizontalAlignment.Center,
                    Width = this.Width,
                    Height = this.Height
                };
                WC.Canvas.SetZIndex(this.busyIndicator, 1);
                var c = WX.Window.Current.Content.FindChildControl<WC.Canvas>("");
                if (c != null) {
                    var x = (c.ActualWidth - this.Width) / 2;
                    var y = (c.ActualHeight - this.Height) / 2;

                    WC.Canvas.SetTop(this.busyIndicator, y);
                    WC.Canvas.SetLeft(this.busyIndicator, x);

                    c.Children.Add(this.busyIndicator);
                }
            }
            return this.busyIndicator;
        }
Exemple #13
0
        /// <summary>
        /// Update the visual state of the control when its template is changed.
        /// </summary>
        protected override void OnApplyTemplate()
        {
            if (_image != null)
            {
                _image.ImageOpened -= OnImageOpened;
                _image.ImageFailed -= OnImageFailed;
            }

            _image = GetTemplateChild("Image") as Image;
            _placeholderImage = GetTemplateChild("PlaceholderImage") as Image;
            _progress = GetTemplateChild("Progress") as ProgressRing;

            _isInitialized = true;

            SetSource(Source);

            if (_image != null)
            {
                _image.ImageOpened += OnImageOpened;
                _image.ImageFailed += OnImageFailed;
            }

            base.OnApplyTemplate();
        }
Exemple #14
0
 private void SyncIndLoaded( object sender, RoutedEventArgs e )
 {
     InSync = sender as ProgressRing;
     InSync.IsActive = SyncStarted;
 }
Exemple #15
0
        private void SetTemplateNone()
        {
            StringResources stx = new StringResources();
            TextBlock ButThereIsNothing = new TextBlock();
            ButThereIsNothing.Text = stx.Text( "But_There_Is_Nothing" );
            ButThereIsNothing.TextWrapping = TextWrapping.Wrap;
            ButThereIsNothing.Foreground = new SolidColorBrush(
                global::wenku8.Config.Properties.APPEARENCE_THEME_MAJOR_COLOR
            );
            ButThereIsNothing.TextAlignment = TextAlignment.Center;

            ProgressRing Pring = new ProgressRing();
            Pring.Height = Pring.Width = 40;
            Pring.IsActive = true;

            MasterContainer.Orientation = Orientation.Vertical;
            MasterContainer.HorizontalAlignment = HorizontalAlignment.Center;
            MasterContainer.VerticalAlignment = VerticalAlignment.Center;
            MasterContainer.Children.Add( Pring );
            MasterContainer.Children.Add( ButThereIsNothing );

            Logger.Log( ID, "Everything is disabled, this section will be skipped", LogType.INFO );
            SkipThisPage = true;
        }
 protected async void SetProgressRing(ProgressRing progressRing, bool value)
 {
     await this.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
     {
         progressRing.IsActive = value;
     });
 }
        protected override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            _scrollViewer = GetTemplateChild(ScrollViewerName) as ScrollViewer;
            _manipulationCanvas = GetTemplateChild(ManipulationCanvasName) as Canvas;
            _dragCanvas = GetTemplateChild(DragCanvasName) as Canvas;
            _progressRing = GetTemplateChild(ProgressRingName) as ProgressRing;

            if (_dragCanvas == null || _manipulationCanvas == null || _scrollViewer == null || _progressRing == null)
            {
                throw new Exception("Container missing in CatrobatListViewWorker");
            }

            _dragCanvas.Tapped += _dragCanvas_Tapped;
            _dragCanvas.RightTapped += _dragCanvas_RightTapped;


            _dragCanvas.PointerPressed += _dragCanvas_PointerPressed;
            this.ManipulationDelta += CatrobatListViewWorker_ManipulationDelta;
            this.ManipulationCompleted += CatrobatListViewWorker_ManipulationCompleted;
            this.PointerReleased += CatrobatListViewWorker_PointerReleased;



            SetReorderEnabled(this._reorderEnabled);
            SetGroupingEnabled(this.GroupingEnabled);

            InitReorderableEmptyDummyControl();
        }
            public async void Execute(object param)
            {
                FeedDataSource feedDataSource = (FeedDataSource)App.Current.Resources["feedDataSource"];
                if (feedDataSource == null)
                {
                    return;
                }
            
                //Shouldn't need this now, but I'll leave it here
                ProgressRing filter_ring = new ProgressRing();
                filter_ring.IsActive = true;
                Flyout flyout = new Flyout();
                flyout.PlacementTarget = sender as UIElement;
                flyout.Placement = PlacementMode.Top;
                flyout.HostMargin = new Thickness(0);
                Border b = new Border();
                b.Width = 20;
                b.Height = 20;
                b.Child = filter_ring;
                flyout.Content = b;
                flyout.IsOpen = true;

                Menu menu = new Menu();
                menu.MaxHeight = 300;

                switch (type)
                {
                    case "category":
                        foreach (Category item in feedDataSource.CategoryList.categories)
                            {
                                ToggleMenuItem menuItem = new ToggleMenuItem();
                                menuItem.Text = item.title;
                                menuItem.Command = new MenuCategoryCommand(item.slug, item.title);
                                menu.Items.Add(menuItem);
                            }
                        break;

                    case "tag":
                    default:
                        foreach (Tag item in feedDataSource.TagList.tags)
                        {
                            ToggleMenuItem menuItem = new ToggleMenuItem();
                            menuItem.Text = item.title;
                            menuItem.Command = new MenuTagCommand(item.slug, item.title);
                            menu.Items.Add(menuItem);
                        }
                        break;
                }

                flyout.Content = menu;
            }
        protected override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            _fallbackImageElement = GetTemplateChild(FallbackImageElementName) as Image;
            _imageElement = GetTemplateChild(ImageElementName) as Image;
            _loadingElement = GetTemplateChild(ProgressRingElementName) as ProgressRing;

            if (_imageElement != null)
            {
                _imageElement.ImageOpened += _imageElement_ImageOpened;
                _imageElement.ImageFailed += _imageElement_ImageFailed;
            }
        }
Exemple #20
0
 private ProgressRing CreateProgressRing()
 {
     ProgressRing progressRing = new ProgressRing();
     progressRing.Foreground = new SolidColorBrush(Windows.UI.ColorHelper.FromArgb(255, 0, 143, 174));
     progressRing.Height = 100;
     progressRing.Width = 100;
     progressRing.IsActive = true;
     return progressRing;
 }
Exemple #21
0
        private void BuildControl(InputType type, string label, string placeholderText, double labelFontSize, double labelTranslateY, string groupName, ContentControl ccInput) {

            FrameworkElement fe = null;

            if (type == InputType.text)
            {
                _udfTB1 = new TextBox();
                _udfTB1.PlaceholderText = placeholderText;
                _udfTB1.Style = _GeneralTextBoxStyle;
                _udfTB1.SetBinding(TextBox.DataContextProperty, new Binding() { Path= new PropertyPath("{x:Null}") });
                _udfTB1.SetBinding(TextBox.TextProperty, new Binding() { Source = Value });
                _udfTB1.KeyUp += ittext_KeyUp;

                _udfg1 = new Grid() { Padding = new Thickness(2, 2, 2, 2), HorizontalAlignment = HorizontalAlignment.Left, VerticalAlignment= VerticalAlignment.Top};
                _udfTBL1 = new TextBlock();
                _udfTBL1.Text = label;
                _udfTBL1.FontSize = labelFontSize;
                _udfg1.Margin = new Thickness(0, labelTranslateY, 0, 0);
                _udfg1.Visibility = Visibility.Collapsed;
                _udfg1.Children.Add(_udfTBL1);
                
                var gd = new Grid();
                gd.Children.Add(_udfg1);
                gd.Children.Add(_udfTB1);

                fe = gd;
            }
            else if (type == InputType.password)
            {
                _udfPB1 = new PasswordBox();
                _udfPB1.PlaceholderText = placeholderText;
                _udfPB1.Style = _GeneralPasswordBoxStyle;
                _udfPB1.PasswordChanged += itpassword_PasswordChanged;

                _udfg1 = new Grid() { Padding = new Thickness(2, 2, 2, 2), HorizontalAlignment = HorizontalAlignment.Left, VerticalAlignment = VerticalAlignment.Top };
                _udfTBL1 = new TextBlock();
                _udfTBL1.Text = label;
                _udfTBL1.FontSize = labelFontSize;
                _udfg1.Margin = new Thickness(0, labelTranslateY, 0, 0);
                _udfg1.Visibility = Visibility.Collapsed;
                _udfg1.Children.Add(_udfTBL1);

                var gd = new Grid();
                gd.Children.Add(_udfg1);
                gd.Children.Add(_udfPB1);

                fe = gd;
            }
            else if (type == InputType.combobox)
            {
                _udfCB1 = new ComboBox();
                _udfCB1.Style = _GeneralComboBoxStyle;
                _udfCB1.PlaceholderText = placeholderText;
                _udfCB1.SetBinding(ComboBox.ItemsSourceProperty, new Binding() { Source = Items });
                _udfCB1.Width = this.Width;
                _udfCB1.SelectionChanged += itcombobox_SelectionChanged;

                _udfg1 = new Grid() { Padding = new Thickness(2, 2, 2, 2), HorizontalAlignment = HorizontalAlignment.Left, VerticalAlignment = VerticalAlignment.Top };
                _udfTBL1 = new TextBlock();
                _udfTBL1.Text = label;
                _udfTBL1.FontSize = labelFontSize;
                _udfg1.Margin = new Thickness(0, labelTranslateY, 0, 0);
                _udfg1.Visibility = Visibility.Collapsed;
                _udfg1.Children.Add(_udfTBL1);

                var gd = new Grid();
                gd.Children.Add(_udfg1);
                gd.Children.Add(_udfCB1);

                fe = gd;
            }
            else if (type == InputType.checkbox)
            {
                var sp = new StackPanel();
                sp.Orientation = Orientation.Horizontal;
                
                var lb = new TextBlock();
                lb.Text = label;
                lb.FontSize = LabelFontSize;
                lb.Margin = new Thickness(0, LabelTranslateY, 0, 0);

                _udfChkB1 = new CheckBox();
                _udfChkB1.Checked += itcheckbox_Changed;
                _udfChkB1.Unchecked += itcheckbox_Changed;
                _udfChkB1.Content = lb;
                _udfChkB1.Style = _GeneralCheckBoxStyle;
                sp.Children.Add(_udfChkB1);

                fe = sp;
            }
            else if (type == InputType.toggleButton)
            {
                _udfTBut1 = new ToggleButton();
                _udfTBut1.Style = _GeneralToggleButtonStyle;
                _udfTBut1.Checked += ittogglebutton_changed;
                _udfTBut1.Unchecked += ittogglebutton_changed;
                _udfTBut1.FontSize = FontSize;
                _udfTBut1.Content = Content1;
                fe = _udfTBut1;
            }
            else if (type == InputType.toggleSwitch)
            {
                _udfTS1 = new ToggleSwitch();
                _udfTS1.Style = _GeneralToggleSwitchStyle;
                _udfTS1.Toggled += ittoggleswitch_Toggled;
                _udfTS1.FontSize = FontSize;
                _udfTS1.OnContent = Content1;
                _udfTS1.OffContent = Content2;
                fe = _udfTS1;
            }
            else if (type == InputType.radio)
            {
                var sp = new StackPanel();
                sp.Orientation = Orientation.Horizontal;
                
                var lb = new TextBlock();
                lb.Text = label;
                lb.FontSize = LabelFontSize;
                lb.Margin = new Thickness(0, LabelTranslateY, 0, 0);

                _udfRB1 = new RadioButton();
                _udfRB1.GroupName = groupName;
                _udfRB1.Checked += itradio_Changed;
                _udfRB1.Unchecked += itradio_Changed;
                _udfRB1.Content = lb;
                _udfRB1.Style = _GeneralRadioButtonStyle;
                sp.Children.Add(_udfRB1);

                fe = sp;
            }
            else if (type == InputType.progress)
            {
                _udfProgBr1 = new ProgressBar();
                _udfProgBr1.Style = _GeneralProgressBarStyle;
                _udfProgBr1.ValueChanged += itProgBr_ValueChanged;
                _udfProgBr1.FontSize = FontSize;
                _udfProgBr1.DataContext = this;
                _udfProgBr1.SetBinding(ProgressBar.MaximumProperty, new Binding() { Path= new PropertyPath("Maximum1") });
                _udfProgBr1.SetBinding(ProgressBar.MinimumProperty, new Binding() { Path = new PropertyPath("Minimum1") });
                _udfProgBr1.SetBinding(ProgressBar.ValueProperty, new Binding() { Path = new PropertyPath("Value1")  });
                _udfProgBr1.SetBinding(ProgressBar.SmallChangeProperty, new Binding() { Path = new PropertyPath("SmallChange1") });
                _udfProgBr1.SetBinding(ProgressBar.LargeChangeProperty, new Binding() { Path = new PropertyPath("LargeChange1") });
                
                fe = _udfProgBr1;
            }
            else if (type == InputType.progressRing)
            {
                _udfProgRn1 = new ProgressRing();
                _udfProgRn1.Style = _GeneralProgressRingStyle;
                //_udfProgRn1.val += itProgBr_ValueChanged;
                _udfProgRn1.FontSize = FontSize;
                _udfProgRn1.DataContext = this;
                _udfProgRn1.SetBinding(ProgressRing.IsActiveProperty, new Binding() { Path = new PropertyPath("IsActive") });

                fe = _udfProgRn1;
            }
            else if (type == InputType.slider)
            {
                _udfSl1 = new Slider();
                _udfSl1.Style = _GeneralSliderStyle;
                _udfSl1.ValueChanged += itSl_ValueChanged;
                _udfSl1.FontSize = FontSize;
                _udfSl1.DataContext = this;
                _udfSl1.SetBinding(Slider.MaximumProperty, new Binding() { Path = new PropertyPath("Maximum1") });
                _udfSl1.SetBinding(Slider.MinimumProperty, new Binding() { Path = new PropertyPath("Minimum1") });
                _udfSl1.SetBinding(Slider.ValueProperty, new Binding() { Path = new PropertyPath("Value1") });
                _udfSl1.SetBinding(Slider.SmallChangeProperty, new Binding() { Path = new PropertyPath("SmallChange1") });
                _udfSl1.SetBinding(Slider.StepFrequencyProperty, new Binding() { Path = new PropertyPath("SmallChange1") });
                _udfSl1.SetBinding(Slider.LargeChangeProperty, new Binding() { Path = new PropertyPath("LargeChange1") });

                fe = _udfSl1;
            }



            fe.HorizontalAlignment = HorizontalAlignment.Stretch;
            fe.VerticalAlignment = VerticalAlignment.Stretch;
            ccInput.Content = fe;

        }
Exemple #22
0
        private void UnloadControl(InputType type)
        {

            if (type == InputType.text)
            {
                _udfTB1.KeyUp -= ittext_KeyUp;
                
            }
            else if (type == InputType.password)
            {
                _udfPB1.PasswordChanged -= itpassword_PasswordChanged;
            }
            else if (type == InputType.checkbox)
            {

            }
            else if (type == InputType.radio)
            {

            }
            else if (type == InputType.combobox)
            {
                if (_ccInput != null) {
                    var sp = (Grid)_ccInput.Content;
                    var cb = (ComboBox)sp.Children[1];
                    cb.SelectionChanged -= itcombobox_SelectionChanged;
                    Value2 = null;
                    //if (cb.Items != null && cb.Items.Count > 0) cb.Items.Clear();
                    //if (cb.ItemsSource != null) cb.ItemsSource = null;
                }
            }
            if (_udfTS1 != null) {
                _udfTS1.Toggled -= ittoggleswitch_Toggled;
            }
            if (_udfProgBr1 != null)
            {
                _udfProgBr1.ValueChanged -= itProgBr_ValueChanged;
            }
            if (_udfSl1 != null)
            {
                _udfSl1.ValueChanged -= itSl_ValueChanged;
            }
            if (_udfRB1 != null)
            {
                _udfRB1.Checked -= itradio_Changed;
                _udfRB1.Unchecked -= itradio_Changed;
            }
            if (_udfChkB1 != null)
            {
                _udfChkB1.Checked -= itcheckbox_Changed;
                _udfChkB1.Unchecked -= itcheckbox_Changed;
            }
            if (_udfTBut1 != null)
            {
                _udfTBut1.Checked -= ittogglebutton_changed;
                _udfTBut1.Unchecked -= ittogglebutton_changed;
            }
            if (_udfProgRn1 != null)
            {
                _udfProgRn1.IsActive = false;
            }
            if (_udfg1 != null)
            {
                _udfg1.Children.Clear();
                _udfg1 = null;
            }

            if (dtInvalidate != null) {
                dtInvalidate.Stop();
                dtInvalidate.Tick += DtInvalidate_Tick;
            }

            _sbHideBgLayer?.Stop();
            _sbHideBgLayer = null;
            _sbShowBgLayer?.Stop();
            _sbShowBgLayer = null;

            _udfProgBr1 = null;
            _udfPB1 = null;
            _udfTB1 = null;
            _udfTBL1 = null;
            _udfCB1 = null;
            _udfChkB1 = null;
            _udfRB1 = null;
            _udfTS1 = null;
            _udfProgRn1 = null;
            _udfTBut1 = null;
            dtInvalidate = null;
            if (_ccInput != null && _ccInput.Content != null) _ccInput.Content = null;
            if (_ccInput != null) _ccInput = null;
            _grdContainer = null;
            if (_grdRoot != null) { _grdRoot.DataContext = null; _grdRoot = null; }
            _model = null;
            hasInitialized = false;
        }
Exemple #23
0
        protected override void OnApplyTemplate()
        {
            _progress = base.GetTemplateChild("progress") as ProgressRing;
            _webView = base.GetTemplateChild("webView") as WebView;

            _webView.LoadCompleted += OnLoadCompleted;

            _isInitialized = true;

            SetHtmlSource(this.HtmlSource);
            SetCSharpSource(this.CSharpSource);
            SetXamlSource(this.XamlSource);
            SetXmlSource(this.XmlSource);
            SetJsonSource(this.JsonSource);

            base.OnApplyTemplate();
        }
Exemple #24
0
        private void SetProgress()
        {
            if (this.Progress != null)
            {
                return;
            }

            bool available = false;

            lock (_progressCountLock)
            {
                if (_progressCount < 100)
                {
                    _progressCount++;
                    available = true;
                }
            }

            if (available)
            {
                var progress = new ProgressRing
                {
                    IsActive = true
                };
                progress.SetBinding(ProgressRing.BackgroundProperty, new Binding { Source = this, Path = new PropertyPath("Background") });
                progress.SetBinding(ProgressRing.ForegroundProperty, new Binding { Source = this, Path = new PropertyPath("Foreground") });
                this.Content = progress;
            }
        }
 private void CounterRing_Loaded(object sender, RoutedEventArgs e)
 {
     counterLoadingRing = sender as ProgressRing;
     if (championFeedbackLoaded)
         counterLoadingRing.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
 }
Exemple #26
0
        private async void movieListView_Loaded(object sender, RoutedEventArgs e)
        {

            ProgressRing pr = new ProgressRing();
            pr.IsActive = true;

            popcornpk_Dal popcorn_dal = new popcornpk_Dal();


            MovieList movieList = await popcorn_dal.GetAllMovies();
            var listView = (ListView)sender;

            listView.ItemsSource = movieList.movie_list;

            pr.IsActive = false;

        }
        protected override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            _dragHandle = GetTemplateChild(DragHanldeName) as Canvas;
            _selectionHandleUnselected = GetTemplateChild(SelectionHandleUnselectedName) as Canvas;
            _selectionHandleSelected = GetTemplateChild(SelectionHandleSelectedName) as Canvas;
            _contentContainer = GetTemplateChild(ContentContainerName) as ContentControl;
            _clickPreventerCanvas = GetTemplateChild(ClickPreventerCanvasName) as Canvas;
            _groupingGrid = GetTemplateChild(GroupingGridName) as Grid;
            _groupingMaxCanvas = GetTemplateChild(GroupingMaxCanvasName) as Canvas;
            _groupingMinCanvas = GetTemplateChild(GroupingMinCanvasName) as Canvas;
            _progressRing = GetTemplateChild(ProgressRingName) as ProgressRing;

            if (_dragHandle == null || _selectionHandleSelected == null || _selectionHandleUnselected == null ||
                _contentContainer == null || _clickPreventerCanvas == null || _groupingGrid == null ||
                _groupingMaxCanvas == null || _groupingMinCanvas == null || _progressRing == null)
            {
                throw new Exception("Container missing in CatrobatListViewItem");
            }

            if (Content != null && Content.GetType().Namespace == typeof(Script).Namespace)
            {
                _selectionHandleUnselected.Margin = new Thickness(0, 22, 0, 0);
                _selectionHandleSelected.Margin = new Thickness(0, 22, 0, 0);
                _groupingMaxCanvas.Margin = new Thickness(10, 47, 0, 0);
                _groupingMinCanvas.Margin = new Thickness(13, 47, 0, 0);
            }

            InitGrouping();
            SetGroupingCanvasVisibility();

            SetVerticalMargin(_verticalItemMargin);
            SetReorder(ReorderEnabled);
            if (_selectionEnabled)
            {
                EnableSelectionMode();
            }
            if (_visible == false)
            {
                this.Opacity = 0;
            }
            this.SizeChanged += CatrobatListViewItem_SizeChanged;
            this._clickPreventerCanvas.Tapped += _clickPreventerCanvas_Tapped;
        }
Exemple #28
0
        protected override void OnApplyTemplate()
        {

            if (_cvMain == null) {
                _cvMain = GetTemplateChild("cvMain") as ContentView;
                _cvMain.SendMessage += _cvMain_SendMessage;
            }
            
            if (_prLoading == null)
            {
                _prLoading = GetTemplateChild("prLoading") as ProgressRing;
            }

            if (_tbSearchUrl  == null)
            {
                _tbSearchUrl = GetTemplateChild("tbSearchUrl") as TextBox;
                _tbSearchUrl.KeyUp += _tbSearchUrl_KeyUp;
            }

            if (_tbText == null)
            {
                _tbText = GetTemplateChild("tbText") as TextBlock;
            }

            if (_butAddTab == null)
            {
                _butAddTab = GetTemplateChild("butAddTab") as Button;
            }
            


            base.OnApplyTemplate();
        }