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


C# Windows.SetValue方法代码示例

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


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

示例1: PrepareContainerForItemOverride

        protected override void PrepareContainerForItemOverride(Windows.UI.Xaml.DependencyObject element, object item)
        {
            i++;
            MediaViewModel MediaViewModel;
            ViewedVideoViewModel viewedVideo;
            VLC_WINRT.ViewModels.MainPage.MusicLibraryViewModel.AlbumItem albumItem;
            MediaViewModel = item as MediaViewModel;
            viewedVideo = item as ViewedVideoViewModel;
            albumItem = item as VLC_WINRT.ViewModels.MainPage.MusicLibraryViewModel.AlbumItem;

            if (viewedVideo != null)
            {
                if (viewedVideo.Duration.TotalSeconds > viewedVideo.TimeWatched.TotalSeconds / 2 && i == 0)
                {
                    element.SetValue(VariableSizedWrapGrid.ColumnSpanProperty, 2);
                    element.SetValue(VariableSizedWrapGrid.RowSpanProperty, 2);
                }
            }
            else if (MediaViewModel != null || albumItem != null)
            {
                if (i == 0)
                {
                    element.SetValue(VariableSizedWrapGrid.ColumnSpanProperty, 2);
                    element.SetValue(VariableSizedWrapGrid.RowSpanProperty, 2);
                }
            }
            base.PrepareContainerForItemOverride(element, item);
        }
开发者ID:kusl,项目名称:vlcwinrt,代码行数:28,代码来源:VariableSizedItemsGridView.cs

示例2: PrepareContainerForItemOverride

 protected override void PrepareContainerForItemOverride(Windows.UI.Xaml.DependencyObject element, object item)
 {
     var viewModel = item as SampleDataItem;
        element.SetValue(VariableSizedWrapGrid.ColumnSpanProperty,viewModel.ColSpan);
        element.SetValue(VariableSizedWrapGrid.RowSpanProperty, viewModel.RowSpan);
        base.PrepareContainerForItemOverride(element, item);
 }
开发者ID:ramezdebbas,项目名称:MehndiHub,代码行数:7,代码来源:VariableTileControl.cs

示例3: PrepareContainerForItemOverride

        protected override void PrepareContainerForItemOverride(Windows.UI.Xaml.DependencyObject element, object item)
        {
            MediaItem media = item as MediaItem;

            element.SetValue(VariableSizedWrapGrid.ColumnSpanProperty, media.Width);
            element.SetValue(VariableSizedWrapGrid.RowSpanProperty, media.Height);

            base.PrepareContainerForItemOverride(element, item);
        }
开发者ID:gnani185,项目名称:MediaPlayer,代码行数:9,代码来源:VariableSizedGridView.cs

示例4: PrepareContainerForItemOverride

        protected override void PrepareContainerForItemOverride(Windows.UI.Xaml.DependencyObject element, object item)
        {
            base.PrepareContainerForItemOverride(element, item);
            if (item != null)
            {
                var span = 1;

                var projectInformationModel = item as ProjectInformationModel;
                if (projectInformationModel != null)
                {
                    span = projectInformationModel.Status == 1 ? 2 : 1;
                }

                element.SetValue(VariableSizedWrapGrid.RowSpanProperty, span);
                element.SetValue(VariableSizedWrapGrid.ColumnSpanProperty, span);
            }
        }
开发者ID:nghia2080,项目名称:CProject,代码行数:17,代码来源:VariableSizedWrapGridView.cs

示例5: PrepareContainerForItemOverride

 protected override void PrepareContainerForItemOverride(Windows.UI.Xaml.DependencyObject element, object item)
 {
     try
     {
         dynamic _Item = item;
         element.SetValue(VariableSizedWrapGrid.ColumnSpanProperty, _Item.ColSpan);
         element.SetValue(VariableSizedWrapGrid.RowSpanProperty, _Item.RowSpan);
     }
     catch
     {
         element.SetValue(VariableSizedWrapGrid.ColumnSpanProperty, 1);
         element.SetValue(VariableSizedWrapGrid.RowSpanProperty, 1);
     }
     finally
     {
         base.PrepareContainerForItemOverride(element, item);
     }
 }
开发者ID:holzleube,项目名称:upgradeConfigurator,代码行数:18,代码来源:VariableTileControl.cs

示例6: PrepareContainerForItemOverride

 protected override void PrepareContainerForItemOverride(Windows.UI.Xaml.DependencyObject element, object item)
 {
     try
     {
         dynamic _Item = item;
         element.SetValue(Windows.UI.Xaml.Controls.GridViewItem.WidthProperty, _Item.ColSpan);
         element.SetValue(Windows.UI.Xaml.Controls.GridViewItem.HeightProperty, _Item.RowSpan);;
         element.SetValue(Windows.UI.Xaml.Controls.VariableSizedWrapGrid.ColumnSpanProperty, _Item.ColSpan);
         element.SetValue(Windows.UI.Xaml.Controls.VariableSizedWrapGrid.RowSpanProperty, _Item.RowSpan);
     }
     catch
     {
         throw new Exception("Unable to set ColSpan or RowSpan from Item");
     }
     finally
     {
         base.PrepareContainerForItemOverride(element, item);
     }
 }
开发者ID:jbatman,项目名称:XPlatformCloudKit,代码行数:19,代码来源:DynamicGridView.cs

示例7: PrepareContainerForItemOverride

 protected override void PrepareContainerForItemOverride(Windows.UI.Xaml.DependencyObject element, object item)
 {
     try
     {
         if (item is IVariableGridSize)
         {
             dynamic _Item = item;
             element.SetValue(VariableSizedWrapGrid.ColumnSpanProperty, _Item.ColumnSpan);
             element.SetValue(VariableSizedWrapGrid.RowSpanProperty, _Item.RowSpan);
         }
     }
     catch // Ignoring Exceptions here is by design
     {
         element.SetValue(VariableSizedWrapGrid.ColumnSpanProperty, 1);
         element.SetValue(VariableSizedWrapGrid.RowSpanProperty, 1);
     }
     finally
     {
         base.PrepareContainerForItemOverride(element, item);
     }
 }
开发者ID:vapps,项目名称:Modern_LiveBoard,代码行数:21,代码来源:GridViewVariableWrapPanel.cs

示例8: PrepareContainerForItemOverride

        protected override void PrepareContainerForItemOverride(Windows.UI.Xaml.DependencyObject element, object item)
        {
            if (item.GetType() == typeof(HubPageDataItem))
            {
                var viewModel = item as HubPageDataItem;
                element.SetValue(VariableSizedWrapGrid.ColumnSpanProperty, viewModel.ColSpan);
                element.SetValue(VariableSizedWrapGrid.RowSpanProperty, viewModel.RowSpan);
                base.PrepareContainerForItemOverride(element, item);
            }

            else if (item.GetType() == typeof(SpokeDataItem))
            {
                var viewModel = item as SpokeDataItem;
                element.SetValue(VariableSizedWrapGrid.ColumnSpanProperty, viewModel.ColSpan);
                element.SetValue(VariableSizedWrapGrid.RowSpanProperty, viewModel.RowSpan);
                base.PrepareContainerForItemOverride(element, item);
            }

            else if (item.GetType() == typeof(DetailDataItem))
            {
                var viewModel = item as DetailDataItem;
                element.SetValue(VariableSizedWrapGrid.ColumnSpanProperty, viewModel.ColSpan);
                element.SetValue(VariableSizedWrapGrid.RowSpanProperty, viewModel.RowSpan);
                base.PrepareContainerForItemOverride(element, item);
            }

        }
开发者ID:Emilage,项目名称:App,代码行数:27,代码来源:VariableTileControl.cs

示例9: PrepareContainerForItemOverride

        protected override void PrepareContainerForItemOverride(Windows.UI.Xaml.DependencyObject element, object item)
        {
            
           
            //try
            //{
            //    dynamic _Item = item;
            //    element.SetValue(Windows.UI.Xaml.Controls.VariableSizedWrapGrid.ColumnSpanProperty, _Item.ColSpan);
            //    element.SetValue(Windows.UI.Xaml.Controls.VariableSizedWrapGrid.RowSpanProperty, _Item.RowSpan);

            //}
            //catch
            //{
            //    element.SetValue(Windows.UI.Xaml.Controls.VariableSizedWrapGrid.ColumnSpanProperty, 1);
            //    element.SetValue(Windows.UI.Xaml.Controls.VariableSizedWrapGrid.RowSpanProperty, 1);
            //}
            //finally
            //{
            //    base.PrepareContainerForItemOverride(element, item);
            //}
            //Dynamically Loaded The VariableSizeWrapGrid
            try
            {
                dynamic dynamic = item;
                element.SetValue(Windows.UI.Xaml.Controls.VariableSizedWrapGrid.ColumnSpanProperty, dynamic.ColSpan);
                element.SetValue(Windows.UI.Xaml.Controls.VariableSizedWrapGrid.RowSpanProperty, dynamic.RowSpan);
            }
            catch
            {

                element.SetValue(Windows.UI.Xaml.Controls.VariableSizedWrapGrid.ColumnSpanProperty, 1);
                element.SetValue(Windows.UI.Xaml.Controls.VariableSizedWrapGrid.RowSpanProperty, 1);
            }
            finally
            {
                base.PrepareContainerForItemOverride(element,item);
            }
        }
开发者ID:prabaprakash,项目名称:Visual-Studio-2013,代码行数:38,代码来源:GridView.cs

示例10: PrepareContainerForItemOverride

        protected override void PrepareContainerForItemOverride(Windows.UI.Xaml.DependencyObject element, object item)
        {
            if (item != null)
            {
                int iColumnSpan = 1;
                GridItemColumnSpan gridItemColumnSpan = item.GetCustomAttribute<GridItemColumnSpan>();
                if (gridItemColumnSpan != null)
                {
                    iColumnSpan = gridItemColumnSpan.ColumnSpan;
                }
                int iRowSpan = 1;
                GridItemRowSpan gridItemRowSpan = item.GetCustomAttribute<GridItemRowSpan>();
                if (gridItemRowSpan != null)
                {
                    iRowSpan = gridItemRowSpan.RowSpan;
                }

                element.SetValue(Windows.UI.Xaml.Controls.VariableSizedWrapGrid.ColumnSpanProperty, iColumnSpan);
                element.SetValue(Windows.UI.Xaml.Controls.VariableSizedWrapGrid.RowSpanProperty, iRowSpan);
            }

            base.PrepareContainerForItemOverride(element, item);
        }
开发者ID:uwe-e,项目名称:BSE.Tunes,代码行数:23,代码来源:VariableSizedWrapGridView.cs

示例11: SetRealTimeText

 public static void SetRealTimeText( Windows.UI.Xaml.Controls.TextBox obj, string value )
 {
     obj.SetValue ( RealTimeTextProperty, value );
 }
开发者ID:bl0rq,项目名称:Utilis,代码行数:4,代码来源:TextBoxService.cs

示例12: SetIsAutoUpdate

 public static void SetIsAutoUpdate( Windows.UI.Xaml.Controls.TextBox obj, bool value )
 {
     obj.SetValue ( IsAutoUpdateProperty, value );
 }
开发者ID:bl0rq,项目名称:Utilis,代码行数:4,代码来源:TextBoxService.cs

示例13: SetPolygonProperties

        private void SetPolygonProperties(Windows.UI.Xaml.Shapes.Polygon polygon)
        {
            polygon.SetValue(Grid.RowProperty, _row);
            polygon.SetValue(Grid.ColumnProperty, _column);

            polygon.Fill = ColorGenerator.GetRandomColor(ColorScheme.Purple);
            polygon.Opacity = .4f;
        }
开发者ID:jonathanyeung,项目名称:ozwego,代码行数:8,代码来源:Polygon.cs


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