using MultiLayout.UiModule;
using System.Windows.Media;
using Unity;

namespace MultiLayout.CustomMenu
{
    public class MainEditMenu : IMenu
    {
        public string Title => "界面布局";

        public Brush Brush { get; set; }



        IUnityContainer container;
        FlyLayoutManager manager;
        public MainEditMenu(IUnityContainer container, FlyLayoutManager manager)
        {
            this.container = container;
            this.manager = manager;

            Brush = new ImageBrush()
            {
                ImageSource = (new ImageSourceConverter()).ConvertFromString("pack://application:,,,/MultiLayout;component/Images/buildingblock.jpg") as ImageSource,
                Stretch = Stretch.UniformToFill
            };


        }

        public void OnClick()
        {
            MainEdit.PgMainEdit p = new MainEdit.PgMainEdit();
            p.Init(manager);
            FlyLayoutManager.NavigationService.Navigate(p);
        }
    }
}
