当前位置: 首页>>代码示例>>C#>>正文


C# Controls.RowDefinition类代码示例

本文整理汇总了C#中System.Windows.Controls.RowDefinition的典型用法代码示例。如果您正苦于以下问题:C# RowDefinition类的具体用法?C# RowDefinition怎么用?C# RowDefinition使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


RowDefinition类属于System.Windows.Controls命名空间,在下文中一共展示了RowDefinition类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AttachControl

        public override bool AttachControl(FilterPropertiesControl control)
        {
            Control = control;

            Grid grid = new Grid();
            int rowIndex = 0;

            CheckBox distinctEdgesCheckBox = new CheckBox();
            TextBlock textBlock = new TextBlock {Text = AppResources.DistinctEdges};
            distinctEdgesCheckBox.Content = textBlock;
            distinctEdgesCheckBox.IsChecked = _cartoonFilter.DistinctEdges;
            distinctEdgesCheckBox.Checked += distinctEdgesCheckBox_Checked;
            distinctEdgesCheckBox.Unchecked += distinctEdgesCheckBox_Unchecked;
            Grid.SetRow(distinctEdgesCheckBox, rowIndex++);

            for (int i = 0; i < rowIndex; ++i)
            {
                RowDefinition rd = new RowDefinition();
                grid.RowDefinitions.Add(rd);
            }

            grid.Children.Add(distinctEdgesCheckBox);

            control.ControlsContainer.Children.Add(grid);

            return true;
        }
开发者ID:KayNag,项目名称:LumiaImagingSDKSample,代码行数:27,代码来源:MarvelFilter.cs

示例2: AttachControl

        public override bool AttachControl(FilterPropertiesControl control)
        {
            Control = control;

            Grid grid = new Grid();
            int rowIndex = 0;

            TextBlock brightnessText = new TextBlock();
            brightnessText.Text = "Threshold";
            Grid.SetRow(brightnessText, rowIndex++);

            Slider brightnessSlider = new Slider();
            brightnessSlider.Minimum = 0.0;
            brightnessSlider.Maximum = 1.0;
            brightnessSlider.Value = _colorSwapFilter.Threshold;
            brightnessSlider.ValueChanged += brightnessSlider_ValueChanged;
            Grid.SetRow(brightnessSlider, rowIndex++);


            for (int i = 0; i < rowIndex; ++i)
            {
                RowDefinition rd = new RowDefinition();
                grid.RowDefinitions.Add(rd);
            }

            grid.Children.Add(brightnessText);
            grid.Children.Add(brightnessSlider);

            control.ControlsContainer.Children.Add(grid);

            return true;
        }
开发者ID:sachin4203,项目名称:ClassicPhotoEditor,代码行数:32,代码来源:MynewFilter3.cs

示例3: ShowGrid

        public Grid ShowGrid()
        {
            Grid grid = new Grid();

            for (var i = 0; i < tileLayer.Count; i++)
            {
                RowDefinition row = new RowDefinition();
                grid.RowDefinitions.Add(row);

                for (var j = 0; j < tileLayer[i].Count; j++)
                {
                    ColumnDefinition col = new ColumnDefinition();
                    grid.ColumnDefinitions.Add(col);

                    List<Tile> sublist = tileLayer[i];
                    Tile temp = sublist[j];

                    Image img = new Image();
                    img.Source = temp.BackgroundImage;

                    img.SetValue(Grid.ColumnProperty, j);
                    img.SetValue(Grid.RowProperty, i);
                    img.Stretch = Stretch.UniformToFill;
                    grid.Children.Add(img);
                }
            }

            return grid;
        }
开发者ID:JeroenEgelmeers,项目名称:Sokoban,代码行数:29,代码来源:GameLayer.cs

示例4: GetNewKeymapGrid

        public static Grid GetNewKeymapGrid(int numRows, int numCols, Keymap[,] keymaps)
        {
            var keymapGrid = new Grid();
            keymapGrid.Children.Clear();

            var rows = new RowDefinition[numRows];
            var columns = new ColumnDefinition[numCols];

            for (var i = 0; i < numRows; i++)
            {
                rows[i] = new RowDefinition();
                keymapGrid.RowDefinitions.Add(rows[i]);
            }

            for (var i = 0; i < numCols; i++)
            {
                columns[i] = new ColumnDefinition();
                keymapGrid.ColumnDefinitions.Add(columns[i]);
            }

            for (var i = 0; i < numRows; i++)
            {
                for (var j = 0; j < numCols; j++)
                {
                    var button = new Button();
                    keymaps[i, j].Button = button;
                    Grid.SetRow(button, i);
                    Grid.SetColumn(button, j);
                    keymapGrid.Children.Add(button);
                }
            }

            return keymapGrid;
        }
开发者ID:jreardon,项目名称:KeymapGenerator,代码行数:34,代码来源:KeymapGrid.cs

示例5: AttachControl

        public override bool AttachControl(FilterPropertiesControl control)
        {
            Control = control;

            var grid = new Grid();
            int rowIndex = 0;

            TextBlock levelText = new TextBlock()
            {
                Text = "Level"
            };
            Grid.SetRow(levelText, rowIndex++);

            Slider levelSlider = new Slider() { Minimum = 0.0, Maximum = 1.0, Value = _filter.Level};
            levelSlider.ValueChanged += levelSlider_ValueChanged;
            Grid.SetRow(levelSlider, rowIndex++);

            for (int i = 0; i < rowIndex; ++i)
            {
                RowDefinition rd = new RowDefinition();
                grid.RowDefinitions.Add(rd);
            }

            grid.Children.Add(levelText);
            grid.Children.Add(levelSlider);

            control.ControlsContainer.Children.Add(grid);

            return true;
        }
开发者ID:KayNag,项目名称:LumiaImagingSDKSample,代码行数:30,代码来源:EmbossWrapperFilter.cs

示例6: ShowView

        private void ShowView(Grid grid)
        {
            //grid.RowDefinitions.Clear();
            //grid.ColumnDefinitions.Clear();
            //grid.Children.Clear();

            for (int i = 0; i < _Round.ColCount; i += 1)
            {
                ColumnDefinition col = new ColumnDefinition();
                grid.ColumnDefinitions.Add(col);
            }

            for (int i = 0; i < _Round.RowCount; i += 1)
            {
                RowDefinition row = new RowDefinition();
                grid.RowDefinitions.Add(row);
            }

            _Ucs = new List<Uc1>(_Round.ColCount * _Round.RowCount);
            Uc1 uc;
            for (int i = 0; i < _Round.RowCount; i += 1)
            {
                for (int j = 0; j < _Round.ColCount; j += 1)
                {
                    uc = new Uc1();
                    uc.SetValue(Grid.RowProperty, i);
                    uc.SetValue(Grid.ColumnProperty, j);
                    grid.Children.Add(uc);
                    _Ucs.Add(uc);
                }
            }
        }
开发者ID:burstas,项目名称:rmps,代码行数:32,代码来源:Vc01.xaml.cs

示例7: switch

 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this._candidatesParaRow = ((System.Windows.Controls.RowDefinition)(target));
     return;
     }
     this._contentLoaded = true;
 }
开发者ID:JohnsonYuan,项目名称:TTSFramework,代码行数:9,代码来源:TrajectoryInfoUserControl.g.cs

示例8: Insert

    public void Insert(int index, RowDefinition row)
    {
      if (row == null)
      {
        throw new ArgumentNullException("row");
      }

      List.Insert(index, row);
    }
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:9,代码来源:RowDefinitionCollection.cs

示例9: IndexOf

    public int IndexOf(RowDefinition row)
    {
      if (row == null)
      {
        throw new ArgumentNullException("row");
      }

      return List.IndexOf(row);
    }
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:9,代码来源:RowDefinitionCollection.cs

示例10: CopyTo

    public void CopyTo(RowDefinition[] array, int arrayIndex)
    {
      if (array == null)
      {
        throw new ArgumentNullException("array");
      }

      List.CopyTo(array, arrayIndex);
    }
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:9,代码来源:RowDefinitionCollection.cs

示例11: Contains

    public bool Contains(RowDefinition row)
    {
      if (row == null)
      {
        throw new ArgumentNullException("row");
      }

      return List.Contains(row);
    }
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:9,代码来源:RowDefinitionCollection.cs

示例12: Add

    public void Add(RowDefinition row)
    {
      if (row == null)
      {
        throw new ArgumentNullException("row");
      }

      List.Add(row);
    }
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:9,代码来源:RowDefinitionCollection.cs

示例13: AttachControl

        public override bool AttachControl(FilterPropertiesControl control)
        {
            Control = control;

            Grid grid = new Grid();
            int rowIndex = 0;

            TextBlock sketchModeText = new TextBlock();
            sketchModeText.Text = AppResources.SketchMode;
            Grid.SetRow(sketchModeText, rowIndex++);

            RadioButton grayRadioButton = new RadioButton();
            grayRadioButton.GroupName = SketchModeGroup;
            TextBlock textBlock = new TextBlock();
            textBlock.Text = AppResources.Gray;
            grayRadioButton.Content = textBlock;
            grayRadioButton.Checked += grayRadioButton_Checked;
            Grid.SetRow(grayRadioButton, rowIndex++);

            RadioButton colorRadioButton = new RadioButton();
            colorRadioButton.GroupName = SketchModeGroup;
            textBlock = new TextBlock();
            textBlock.Text = AppResources.Color;
            colorRadioButton.Content = textBlock;
            colorRadioButton.Checked += colorRadioButton_Checked;
            Grid.SetRow(colorRadioButton, rowIndex++);

            if (_sketchFilter.SketchMode == SketchMode.Gray)
            {
                grayRadioButton.IsChecked = true;
            }
            else
            {
                colorRadioButton.IsChecked = true;
            }

            for (int i = 0; i < rowIndex; ++i)
            {
                RowDefinition rd = new RowDefinition();
                grid.RowDefinitions.Add(rd);
            }

            grid.Children.Add(sketchModeText);
            grid.Children.Add(grayRadioButton);
            grid.Children.Add(colorRadioButton);

            control.ControlsContainer.Children.Add(grid);

            return true;
        }
开发者ID:sachin4203,项目名称:ClassicPhotoEditor,代码行数:50,代码来源:EightiesPopSongFilter.cs

示例14: GameListViewItem

        public GameListViewItem()
        {
            gameTitle.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;

            monitorCheck.VerticalAlignment = System.Windows.VerticalAlignment.Center;
            monitorCheck.HorizontalAlignment = System.Windows.HorizontalAlignment.Center;

            gameVersion.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
            gameVersion.HorizontalContentAlignment = System.Windows.HorizontalAlignment.Right;

            gameVersion.Padding = new System.Windows.Thickness(0);
            gameTitle.Padding = new System.Windows.Thickness(0);

            gameGrid.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
            gameGrid.Margin = new System.Windows.Thickness(0);

            gameTitle.Margin = new System.Windows.Thickness(0);
            gameVersion.Margin = new System.Windows.Thickness(0);

            ColumnDefinition col = new ColumnDefinition();
            col.Width = new System.Windows.GridLength(1, System.Windows.GridUnitType.Star);
            gameGrid.ColumnDefinitions.Add(col);

            col = new ColumnDefinition();
            col.Width = new System.Windows.GridLength(1, System.Windows.GridUnitType.Star);
            gameGrid.ColumnDefinitions.Add(col);

            monitorColumn.Width = new System.Windows.GridLength(50, System.Windows.GridUnitType.Pixel);
            gameGrid.ColumnDefinitions.Add(monitorColumn);

            RowDefinition row = new RowDefinition();
            gameGrid.RowDefinitions.Add(row);
            row = new RowDefinition();
            gameGrid.RowDefinitions.Add(row);

            Grid.SetColumn(gameTitle, 0);
            Grid.SetRow(gameTitle, 0);
            Grid.SetColumn(gameVersion, 1);
            Grid.SetRow(gameVersion, 0);
            Grid.SetColumn(monitorCheck, 2);
            Grid.SetRow(monitorCheck, 0);

            gameGrid.Children.Add(gameTitle);
            gameGrid.Children.Add(gameVersion);
            gameGrid.Children.Add(monitorCheck);

            Content = gameGrid;
        }
开发者ID:raven-ie,项目名称:MASGAU,代码行数:48,代码来源:GameListViewItem.cs

示例15: Remove

    public bool Remove(RowDefinition row)
    {
      if (row == null)
      {
        throw new ArgumentNullException("row");
      }

      if (List.Contains(row) == false)
      {
        return false;
      }

      List.Remove(row);

      return true;
    }
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:16,代码来源:RowDefinitionCollection.cs


注:本文中的System.Windows.Controls.RowDefinition类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。