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


C# DataGrid.Animate方法代码示例

本文整理汇总了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" ,
//.........这里部分代码省略.........
开发者ID:zumero,项目名称:DataGrid,代码行数:101,代码来源:wordpairs.cs


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