本文整理汇总了C#中DataGrid.Animate方法的典型用法代码示例。如果您正苦于以下问题:C# DataGrid.Animate方法的具体用法?C# DataGrid.Animate怎么用?C# DataGrid.Animate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataGrid
的用法示例。
在下文中一共展示了DataGrid.Animate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: createLotsOfWordPairsWithButtons
public static IList<object> createLotsOfWordPairsWithButtons(DataGrid dg)
{
return new ObservableCollection<object> {
new WordPair {
English = "speak",
Spanish = "hablar",
ButtonText = "RowHeight+",
X = 31,
Action = () => {
var a = new Animation ((x) => {
dg.RowHeight = x;
}, dg.RowHeight, dg.RowHeight * 1.2, null, null);
dg.Animate ("foo", a, 16, 1000);
}
},
new WordPair {
English = "ask",
Spanish = "preguntar" ,
ImageName = "breaking.png",
ButtonText = "RowHeight-",
X = 27,
Action = () => {
var a = new Animation ((x) => {
dg.RowHeight = x;
}, dg.RowHeight, dg.RowHeight * 0.8, null, null);
dg.Animate ("foo", a, 16, 1000);
}
},
new WordPair {
English = "raise",
Spanish = "levantar" ,
ButtonText = "RowSpacing+",
X = 31,
Action = () => {
var a = new Animation ((x) => {
dg.RowSpacing = x;
}, dg.RowSpacing, dg.RowSpacing * 2, null, null);
dg.Animate ("foo", a, 16, 1000);
}
},
new WordPair {
English = "fall",
Spanish = "caer",
ImageName = "breaking.png",
ButtonText = "RowSpacing-",
X = 27,
Action = () => {
var a = new Animation ((x) => {
dg.RowSpacing = x;
}, dg.RowSpacing, dg.RowSpacing / 2, null, null);
dg.Animate ("foo", a, 16, 1000);
}
},
new WordPair {
English = "live",
Spanish = "vivir" ,
X = 11,
ButtonText = "R.English.append *",
Action = () => {
WordPair me = dg.Rows[2] as WordPair;
me.English += "*";
}
},
new WordPair {
English = "go",
Spanish = "ir",
SpanishBackgroundColor = Color.Yellow,
ButtonText = "C[0].Width+",
Action = () => {
var a = new Animation ((x) => {
dg.Columns[0].Width = x;
}, dg.Columns[0].Width, dg.Columns[0].Width * 1.2, null, null);
dg.Animate ("foo", a, 16, 1000);
}
},
new WordPair {
English = "be",
Spanish = "ser" ,
ButtonText = "C[-1].Width+",
Action = () => {
var a = new Animation ((x) => {
dg.FrozenColumn.Width = x;
}, dg.FrozenColumn.Width, dg.FrozenColumn.Width * 1.5, null, null);
dg.Animate ("foo", a, 16, 1000);
}
},
new WordPair {
English = "run",
Spanish = "correr" ,
ButtonText = "C[-1].Width-",
Action = () => {
var a = new Animation ((x) => {
dg.FrozenColumn.Width = x;
}, dg.FrozenColumn.Width, dg.FrozenColumn.Width * 0.8, null, null);
dg.Animate ("foo", a, 16, 1000);
}
},
new WordPair {
English = "give",
Spanish = "dar" ,
//.........这里部分代码省略.........