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


C# IPalette.GetContentShortTextFont方法代码示例

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


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

示例1: ImageListView


//.........这里部分代码省略.........
            AllowColumnClick = true;
            AllowColumnResize = true;
            AllowDrag = false;
            AllowDuplicateFileNames = false;
            AllowPaneResize = true;
            mBorderStyle = BorderStyle.Fixed3D;
            mCacheMode = CacheMode.OnDemand;
            mCacheLimitAsItemCount = 0;
            mCacheLimitAsMemory = 20 * 1024 * 1024;
            mColumns = new ImageListViewColumnHeaderCollection(this);
            resources = new ResourceManager("Manina.Windows.Forms.ImageListViewResources", typeof(ImageListView).Assembly);
            mDefaultImage = resources.GetObject("DefaultImage") as Image;
            mErrorImage = resources.GetObject("ErrorImage") as Image;
            mRatingImage = resources.GetObject("RatingImage") as Image;
            mEmptyRatingImage = resources.GetObject("EmptyRatingImage") as Image;
            GroupHeaderFont = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Bold);
            ColumnHeaderFont = new Font("Microsoft Sans Serif", 8.25f);
            mIntegralScroll = false;
            mItems = new ImageListViewItemCollection(this);
            MultiSelect = true;
            mPaneWidth = 240;
            mRetryOnError = true;
            mSelectedItems = new ImageListViewSelectedItemCollection(this);
            mCheckedItems = new ImageListViewCheckedItemCollection(this);
            mSortColumn = 0;
            mGroupColumn = 0;
            mSortOrder = SortOrder.None;
            mGroupOrder = SortOrder.None;
            SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.Opaque | ControlStyles.Selectable | ControlStyles.UserMouse, true);
            ScrollBars = true;
            ShellIconFallback = true;
            ShellIconFromFileContent = true;
            Size = new Size(120, 100);
            mShowCheckBoxes = false;
            mCheckBoxAlignment = ContentAlignment.BottomRight;
            mCheckBoxPadding = new Size(2, 2);
            mShowFileIcons = false;
            mIconAlignment = ContentAlignment.TopRight;
            mIconPadding = new Size(2, 2);
            Text = string.Empty;
            mThumbnailSize = new Size(96, 96);
            mUseEmbeddedThumbnails = UseEmbeddedThumbnails.Auto;
            mUseWIC = UseWIC.Auto;
            mView = View.Thumbnails;
            mViewOffset = new Point(0, 0);
            mShowScrollBars = true;

            // Child controls
            hScrollBar = new HScrollBar();
            vScrollBar = new VScrollBar();
            hScrollBar.Visible = false;
            vScrollBar.Visible = false;
            hScrollBar.Scroll += hScrollBar_Scroll;
            vScrollBar.Scroll += vScrollBar_Scroll;
            Controls.Add(hScrollBar);
            Controls.Add(vScrollBar);

            // Groups
            groups = new ImageListViewGroupCollection(this);
            showGroups = false;

            // Lazy refresh timer
            lazyRefreshTimer = new System.Timers.Timer();
            lazyRefreshTimer.Interval = ImageListViewRenderer.LazyRefreshInterval;
            lazyRefreshTimer.Enabled = false;
            lazyRefreshTimer.Elapsed += lazyRefreshTimer_Tick;
            lazyRefreshCallback = new RefreshDelegateInternal(Refresh);

            // Helpers
            layoutManager = new ImageListViewLayoutManager(this);
            navigationManager = new ImageListViewNavigationManager(this);

            // Cache nabagers
            defaultAdaptor = new ImageListViewItemAdaptors.FileSystemAdaptor();
            thumbnailCache = new ImageListViewCacheThumbnail(this);
            shellInfoCache = new ImageListViewCacheShellInfo(this);
            metadataCache = new ImageListViewCacheMetadata(this);

            disposed = false;

            // Cache the current global palette setting
            _palette = KryptonManager.CurrentGlobalPalette;

            // Hook into palette events
            if (_palette != null)
                _palette.PalettePaint += new EventHandler<PaletteLayoutEventArgs>(OnPalettePaint);

            // We want to be notified whenever the global palette changes
            KryptonManager.GlobalPaletteChanged += new EventHandler(OnGlobalPaletteChanged);

            // Create redirection object to the base palette
            _paletteRedirect = new PaletteRedirect(_palette);

            // Create accessor objects for the back, border and content
            _paletteBack = new PaletteBackInheritRedirect(_paletteRedirect);
            _paletteBorder = new PaletteBorderInheritRedirect(_paletteRedirect);
            _paletteContent = new PaletteContentInheritRedirect(_paletteRedirect);

            this.Font = _palette.GetContentShortTextFont(PaletteContentStyle.ButtonStandalone, PaletteState.Normal);
        }
开发者ID:Cocotteseb,项目名称:imagelistview,代码行数:101,代码来源:ImageListView.cs


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