Exemplo n.º 1
0
        private Widget CreateTogglePreviewButton()
        {
            ToolbarButton b  = null;
            var           up = view.RootWidget.Components.Get <ViewNodeComponent>().ViewNode as FSViewNode;

            return(b = new ToolbarButton(IconPool.GetTexture("Filesystem.Preview"))
            {
                Checked = up.ShowSelectionPreview,
                Clicked = () => {
                    view.TogglePreview();
                    up.ShowSelectionPreview = b.Checked = !b.Checked;
                }
            });
        }