public void Select()
        {
            _isselected = true;
           // animate2color(_source.ChapterColor);
            StyleConstants styles = new StyleConstants();
            animate2color(styles.MainAlphaColors[_index%4]);

            animate2double(1.04, "ScaleX");
            animate2double(1.04, "ScaleY");
        }
예제 #2
0
        void select()
        {
            StyleConstants styles = new StyleConstants();

            this.Background = new SolidColorBrush(_infocolor);//ColorHelper.FromArgb(255,78,177,223));
            switch (IsOn)
            {
                case true:
                    _stateimage.Source = new BitmapImage(new Uri(SelectOnImage));
                    _content.Foreground = new SolidColorBrush(Colors.White);
                    break;
                case false:
                    _stateimage.Source = new BitmapImage(new Uri(SelectOffImage));
                    _content.Foreground = new SolidColorBrush(Colors.White);
                    break;
            }
        }
예제 #3
0
 void LOsInCircle_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
 {
     StyleConstants styles = new StyleConstants(); 
     loadLOsInCircle(e.NewStartingIndex);
     var vm = ViewModel as LOViewModel;
     down_menu.SelectElement(vm.LOCurrentIndex);
     booksource.TemporalColor = styles.MainAlphaColors[vm.LOCurrentIndex % 4];  //Util.GetColorbyIndex(vm.LOCurrentIndex);
 }
예제 #4
0
        //private:

        void loadcontrols()
        {
            if (_datasource != null)
            {
                _numberofstacks = _datasource.Sections.Count;
                for (int i = 0; i < _numberofstacks; i++)
                {
                    IStackView stack = new IStackView();
                    stack.StackNumber = i;
                    stack.Section = i;
                    stack.BorderSource = _bordersource;
                    stack.ThumbHeight = _thumbheight;
                    stack.ThumbWidth = _thumbwidth;
                    stack.BorderHeight = _borderheight;
                    stack.BorderWidth = _borderwidth;
                    stack.MaxScale = _maxscale;
                    stack.StackHeight = _listheight;
                    stack.VerticalPosition = _verticalposition;
                    stack.MinStackWidth = _minstackwidth;
                    stack.SpaceBetweenItems = _spacebetweenitems;
                    stack.DeviceWidth = _minlistwidth;
                    stack.Source = _datasource.Sections[i];
                    //header
                    _headercontrol.Author = _datasource.Author;
                    _headercontrol.Title = _datasource.Title;
                    _headercontrol.Description = _datasource.Description;
                    StyleConstants styles = new StyleConstants();
                    _headercontrol.ChapterColor = styles.SecondColors[_listnumber % 4];

                    stack.StackItemFullAnimationStarted += StackItem_FullAnimationStarted;
                    stack.StackItemFullAnimationCompleted += StackItem_FullAnimationCompleted;
                    stack.StackItemThumbAnimationStarted += StackItem_ThumbAnimationStarted;
                    stack.StackItemThumbAnimationCompleted += StackItem_ThumbAnimationCompleted;

                    stack.StackSizeChangeStarted += Stack_SizeChangeStarted;
                    stack.StackSizeChangeDelta += Stack_SizeChangeDelta;
                    stack.StackSizeChangeCompleted += Stack_SizeChangeCompleted;
                    stack.StackSizeAnimationStarted += Stack_SizeAnimationStarted;
                    stack.StackSizeAnimationCompleted += Stack_SizeAnimationCompleted;

                    stack.IControlsComponentSelected += IControls_ComponentSelected;

                    //_startimage.Source = new BitmapImage(new Uri("ms-appx:///roadsdata/text"+(int)(i+1)+".png"));

                    if (stack.NumberOfItems == 1)
                        stack.SetToOpen();

                    _panel.Children.Add(stack);
                    _stacksvector.Add(stack);
                }
                _panel.Children.Add(_auxgrid);
                updatewidth();
            }
        }