コード例 #1
0
        private static void CreateRenderers()
        {
            ScrollBarRenderer scrollBarRenderer;
            ListViewRenderer  listViewRenderer;
            HeaderRenderer    headerRenderer;
            TreeViewRenderer  treeViewRenderer;

            _renderers = new ThemeRenderer[]
            {
                scrollBarRenderer = new ScrollBarRenderer(),
                listViewRenderer  = new ListViewRenderer(),
                headerRenderer    = new HeaderRenderer(),
                treeViewRenderer  = new TreeViewRenderer(),
                new EditRenderer(),
                new SpinRenderer(),
                new ComboBoxRenderer(),
                new ButtonRenderer(),
                new TooltipRenderer(),
            };

            var editorHandle   = new ICSharpCode.TextEditor.TextEditorControl().Handle;
            var listViewHandle = new NativeListView().Handle;
            var treeViewHandle = new NativeTreeView().Handle;

            scrollBarRenderer.AddThemeData(editorHandle);
            scrollBarRenderer.AddThemeData(listViewHandle);
            headerRenderer.AddThemeData(listViewHandle);
            listViewRenderer.AddThemeData(listViewHandle);
            treeViewRenderer.AddThemeData(treeViewHandle);
        }
コード例 #2
0
        public static void LoadThemeData()
        {
            foreach (ThemeRenderer renderer in _renderers)
            {
                renderer.AddThemeData(IntPtr.Zero);
            }

            var editorHandle   = new ICSharpCode.TextEditor.TextEditorControl().Handle;
            var listViewHandle = new NativeListView().Handle;
            var treeViewHandle = new NativeTreeView().Handle;

            _scrollBarRenderer.AddThemeData(editorHandle);
            _scrollBarRenderer.AddThemeData(listViewHandle);
            _headerRenderer.AddThemeData(listViewHandle);
            _listViewRenderer.AddThemeData(listViewHandle);
            _treeViewRenderer.AddThemeData(treeViewHandle);
            _tabRenderer.AddThemeData(new TabControl().Handle);
        }