本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
}
}
示例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;
}
示例8: Insert
public void Insert(int index, RowDefinition row)
{
if (row == null)
{
throw new ArgumentNullException("row");
}
List.Insert(index, row);
}
示例9: IndexOf
public int IndexOf(RowDefinition row)
{
if (row == null)
{
throw new ArgumentNullException("row");
}
return List.IndexOf(row);
}
示例10: CopyTo
public void CopyTo(RowDefinition[] array, int arrayIndex)
{
if (array == null)
{
throw new ArgumentNullException("array");
}
List.CopyTo(array, arrayIndex);
}
示例11: Contains
public bool Contains(RowDefinition row)
{
if (row == null)
{
throw new ArgumentNullException("row");
}
return List.Contains(row);
}
示例12: Add
public void Add(RowDefinition row)
{
if (row == null)
{
throw new ArgumentNullException("row");
}
List.Add(row);
}
示例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;
}
示例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;
}
示例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;
}