コード例 #1
0
        public void LoadFrame(IGnosisFrameImplementation frameImplementation, IGnosisToggleButtonImplementation _headerButton)
        {
            // gridContent.Children.Clear();
            //if (headerButton != null && pnlHeader.Children.Contains(headerButton))
            //{
            //    pnlHeader.Children.Remove(headerButton);
            //}
            headerButton           = (GnosisToggleButton)_headerButton;
            headerButton.GotFocus += headerButton_GotFocus;
            //Binding binding = new Binding("IsSelected");
            //binding.Source = this;
            //headerButton.SetBinding(GnosisToggleButton.IsCheckedProperty, binding);
            // headerButton.Margin = new Thickness(0);
            //headerButton.Padding = new Thickness(5);
            //headerButton.BorderThickness = new Thickness(0);
            this.Header = headerButton;
            // btnClose.Visibility = Visibility.Visible;
            //  btnClose.CopyStyle(headerButton.Style);
            //string xaml = XamlWriter.Save(btnClose.Style);

            if (frameImplementation is GnosisSearchFrame)
            {
                gridContent.Children.Add((GnosisSearchFrame)frameImplementation);
            }
            else
            {
                gridContent.Children.Add((GnosisFrame)frameImplementation);
            }

            HideLoadingAnimation();
        }
コード例 #2
0
        public GnosisFrameController(
            IGnosisFrameImplementation frame,
            //  IGnosisFrameImplementation _frameImplementation,
            GnosisInstanceController instanceController,
            GnosisContainerController parent)
            : base(frame, instanceController, parent)
        {
            frame.SetWidthChangedHandler(new Action <double>(WidthChanged));
            string font     = instanceController.EntityController.GetNormalStyle().Font;
            int    fontSize = instanceController.EntityController.GetNormalStyle().FontSize;

            optimalSectionWidth = OptimalSectionCharacters * GlobalData.Singleton.StyleHelper.GetCharacterWidth(font, fontSize);
            frame.SetVerticalScrollbarVisibility(BaseControllers.GnosisVisibleController.GnosisVerticalScrollbarVisibility.Auto);

            //layout will be carried out after loading since we need to know available width
            ((IGnosisFrameImplementation)ControlImplementation).SetLoadedHandler(new Action <double>(FrameLoaded));

            frame.PropertyChanged += GnosisFrame_PropertyChanged;
        }
コード例 #3
0
 public void RemoveFrame(IGnosisFrameImplementation gnosisControlImplementation)
 {
     throw new NotImplementedException();
 }
コード例 #4
0
ファイル: GnosisTile.xaml.cs プロジェクト: sukhajata/shiva
 public void RemoveFrameImplementation(IGnosisFrameImplementation frameImplementation)
 {
     throw new NotImplementedException();
 }
コード例 #5
0
ファイル: GnosisTile.xaml.cs プロジェクト: sukhajata/shiva
 public void LoadFrameImplementation(IGnosisFrameImplementation frame)
 {
     contentGrid.Children.Clear();
     contentGrid.Children.Add((UIElement)frame);
     //contentGrid.Children.Add(new TextBox() { Text = ((GnosisFrameWPF)frame).GetController(). });
 }