public override void Run(Window window) { Conformant conformant = new Conformant(window); conformant.Show(); Box box = new Box(window) { BackgroundColor = Color.White, }; conformant.SetContent(box); box.Show(); MNavigationView nv = new MNavigationView(window); var paddingbox = new Box(window) { AlignmentX = -1, AlignmentY = -1, MinimumWidth = 32, }; paddingbox.Show(); var paddingbox1 = new Box(window) { AlignmentX = -1, AlignmentY = -1, MinimumWidth = 32, }; paddingbox1.Show(); var paddingbox2 = new Box(window) { AlignmentX = -1, AlignmentY = -1, MinimumHeight = 30, }; paddingbox2.Show(); var paddingbox3 = new Box(window) { AlignmentX = -1, AlignmentY = -1, MinimumHeight = 10, }; paddingbox3.Show(); var name = new Label(window) { AlignmentX = -1, AlignmentY = -1, WeightX = 1, WeightY = 1, Text = "<span font_weight=bold font_size=50>Tizen</span>", MinimumHeight = 80 }; name.Show(); var namebox = new Box(window) { AlignmentX = -1, AlignmentY = -1, WeightX = 1, WeightY = 1, IsHorizontal = true, }; namebox.Show(); namebox.PackEnd(paddingbox); namebox.PackEnd(name); var email = new Label(window) { AlignmentX = -1, AlignmentY = -1, WeightX = 1, WeightY = 1, Text = "<span font_size=35>[email protected]<span>", }; email.Show(); var emailbox = new Box(window) { AlignmentX = -1, AlignmentY = -1, WeightX = 1, WeightY = 1, IsHorizontal = true, }; emailbox.Show(); emailbox.PackEnd(paddingbox1); emailbox.PackEnd(email); var header = new Box(window) { MinimumHeight = 200, BackgroundColor = Color.White }; header.PackEnd(paddingbox2); header.PackEnd(namebox); header.PackEnd(emailbox); header.PackEnd(paddingbox3); header.Show(); nv.Header = header; var items1 = new List <MItem>(); items1.Add(new MItem("My Files", "icon.png")); items1.Add(new MItem("Shared with me", "icon.png")); items1.Add(new MItem("Starred", "icon.png")); items1.Add(new MItem("Recent", "icon.png")); items1.Add(new MItem("Offline", "icon.png")); var items2 = new List <MItem>(); items2.Add(new MItem("Uploads", "icon.png")); items2.Add(new MItem("Backup", "icon.png")); items2.Add(new MItem("Movie", "icon.png")); items2.Add(new MItem("Music", "icon.png")); items2.Add(new MItem("Play", "icon.png")); var group1 = new MGroup(items1, "Account"); var group2 = new MGroup(items2); var groups = new List <MGroup>(); groups.Add(group1); groups.Add(group2); nv.GroupMenu = groups; var main1 = new MButton(window) { Text = "Open NavigationView", AlignmentX = 0, AlignmentY = 0, MinimumWidth = 720, MinimumHeight = 300 }; main1.Show(); var nd = new MNavigationDrawer(window) { AlignmentX = -1, AlignmentY = -1, WeightX = 1, WeightY = 1, }; nd.Main = main1; nd.NavigationView = nv; main1.Clicked += (s, e) => { nd.IsOpen = true; }; nd.Show(); box.PackEnd(nd); }
public override void Run(Window window) { Conformant conformant = new Conformant(window); conformant.Show(); Box box = new Box(window) { AlignmentX = -1, AlignmentY = -1, WeightX = 1, WeightY = 1, }; conformant.SetContent(box); box.Show(); #region ThemeButton Box hbox = new Box(window) { IsHorizontal = true, WeightX = 1, WeightY = 0.1, AlignmentX = -1, AlignmentY = -1, }; hbox.Show(); box.PackEnd(hbox); var defaultColor = new MButton(window) { Text = "default", MinimumWidth = 200, WeightY = 1, AlignmentY = 0.5 }; var light = new MButton(window) { Text = "light", MinimumWidth = 200, WeightY = 1, AlignmentY = 0.5 }; var dark = new MButton(window) { Text = "Dark", MinimumWidth = 200, WeightY = 1, AlignmentY = 0.5 }; defaultColor.Show(); light.Show(); dark.Show(); hbox.PackEnd(defaultColor); hbox.PackEnd(light); hbox.PackEnd(dark); defaultColor.Clicked += (s, e) => MColors.Current = MColors.Default; light.Clicked += (s, e) => MColors.Current = MColors.Light; dark.Clicked += (s, e) => MColors.Current = MColors.Dark; #endregion MNavigationView nv = new MNavigationView(window) { AlignmentX = -1, AlignmentY = -1, WeightX = 1, WeightY = 1, }; var btn1 = new Button(window) { Text = "Chage Header", AlignmentX = -1, AlignmentY = -1, WeightX = 1, WeightY = 1, MinimumHeight = 300, }; btn1.Show(); var btn2 = new Button(window) { Text = "Chage Header", AlignmentX = -1, AlignmentY = -1, WeightX = 1, WeightY = 1, BackgroundColor = Color.Blue }; btn2.Show(); var btn3 = new Button(window) { Text = "Button", AlignmentX = -1, AlignmentY = -1, WeightX = 1, WeightY = 1, }; btn3.Show(); var header = new Box(window) { AlignmentX = -1, AlignmentY = -1, WeightX = 1, WeightY = 1, BackgroundColor = Color.White }; header.PackEnd(btn2); header.PackEnd(btn3); header.Show(); nv.Header = btn1; btn1.Clicked += (s, e) => { nv.Header = header; }; btn2.Clicked += (s, e) => { nv.Header = btn1; }; var items = new List <MItem>(); items.Add(new MItem("My Files", "icon.png")); items.Add(new MItem("Shared with me", "icon.png")); items.Add(new MItem("Starred", "icon.png")); items.Add(new MItem("Recent", "icon.png")); items.Add(new MItem("Offline", "icon.png")); items.Add(new MItem("Uploads", "icon.png")); items.Add(new MItem("Backup", "icon.png")); items.Add(new MItem("Movie", "icon.png")); items.Add(new MItem("Music", "icon.png")); items.Add(new MItem("Play", "icon.png")); var items1 = new List <MItem>(); for (int i = 0; i < 20; i++) { items1.Add(new MItem("Change Item", "icon.png")); } nv.Menu = items; var dividers = new List <int>(); dividers.Add(1); dividers.Add(3); dividers.Add(5); nv.MenuItemSelected += (s, e) => { if (nv.Menu == items) { nv.Menu = items1; } else { nv.Menu = items; } }; nv.Show(); box.PackEnd(nv); }
public override void Run(Window window) { Conformant conformant = new Conformant(window); conformant.Show(); Box box = new Box(window) { AlignmentX = -1, AlignmentY = -1, WeightX = 1, WeightY = 1, }; conformant.SetContent(box); box.Show(); MNavigationView nv = new MNavigationView(window) { AlignmentX = -1, AlignmentY = -1, WeightX = 1, WeightY = 1, }; var btn1 = new Button(window) { Text = "Chage Header", AlignmentX = -1, AlignmentY = -1, WeightX = 1, WeightY = 1, MinimumHeight = 300, }; btn1.Show(); var btn2 = new Button(window) { Text = "Chage Header", AlignmentX = -1, AlignmentY = -1, WeightX = 1, WeightY = 1, BackgroundColor = Color.Blue }; btn2.Show(); var btn3 = new Button(window) { Text = "Button", AlignmentX = -1, AlignmentY = -1, WeightX = 1, WeightY = 1, }; btn3.Show(); var header = new Box(window) { AlignmentX = -1, AlignmentY = -1, WeightX = 1, WeightY = 1, BackgroundColor = Color.White }; header.PackEnd(btn2); header.PackEnd(btn3); header.Show(); nv.Header = btn1; btn1.Clicked += (s, e) => { nv.Header = header; }; btn2.Clicked += (s, e) => { nv.Header = btn1; }; var items = new List <MItem>(); items.Add(new MItem("My Files", "icon.png")); items.Add(new MItem("Shared with me", "icon.png")); items.Add(new MItem("Starred", "icon.png")); items.Add(new MItem("Recent", "icon.png")); items.Add(new MItem("Offline", "icon.png")); items.Add(new MItem("Uploads", "icon.png")); items.Add(new MItem("Backup", "icon.png")); items.Add(new MItem("Movie", "icon.png")); items.Add(new MItem("Music", "icon.png")); items.Add(new MItem("Play", "icon.png")); var items1 = new List <MItem>(); for (int i = 0; i < 20; i++) { items1.Add(new MItem("Change Item", "icon.png")); } nv.Menu = items; var dividers = new List <int>(); dividers.Add(1); dividers.Add(3); dividers.Add(5); nv.MenuItemSelected += (s, e) => { if (nv.Menu == items) { nv.Menu = items1; } else { nv.Menu = items; } }; nv.Show(); box.PackEnd(nv); }
public override EvasObject CreateContent(EvasObject parent) { Box box = new ColoredBox(parent); box.Show(); MNavigationView nv = new MNavigationView(parent); var paddingbox = new Box(parent) { AlignmentX = -1, AlignmentY = -1, MinimumWidth = 32, }; paddingbox.Show(); var paddingbox1 = new Box(parent) { AlignmentX = -1, AlignmentY = -1, MinimumWidth = 32, }; paddingbox1.Show(); var paddingbox2 = new Box(parent) { AlignmentX = -1, AlignmentY = -1, MinimumHeight = 30, }; paddingbox2.Show(); var paddingbox3 = new Box(parent) { AlignmentX = -1, AlignmentY = -1, MinimumHeight = 10, }; paddingbox3.Show(); var name = new Label(parent) { AlignmentX = -1, AlignmentY = -1, WeightX = 1, WeightY = 1, Text = "<span font_weight=bold font_size=50>Tizen</span>", MinimumHeight = 80 }; name.Show(); var namebox = new Box(parent) { AlignmentX = -1, AlignmentY = -1, WeightX = 1, WeightY = 1, IsHorizontal = true, }; namebox.Show(); namebox.PackEnd(paddingbox); namebox.PackEnd(name); var email = new Label(parent) { AlignmentX = -1, AlignmentY = -1, WeightX = 1, WeightY = 1, Text = "<span font_size=35>[email protected]<span>", }; email.Show(); var emailbox = new Box(parent) { AlignmentX = -1, AlignmentY = -1, WeightX = 1, WeightY = 1, IsHorizontal = true, }; emailbox.Show(); emailbox.PackEnd(paddingbox1); emailbox.PackEnd(email); var header = new Box(parent) { MinimumHeight = 200, BackgroundColor = Color.White }; header.PackEnd(paddingbox2); header.PackEnd(namebox); header.PackEnd(emailbox); header.PackEnd(paddingbox3); header.Show(); nv.Header = header; var items = new List <MItem>(); items.Add(new MItem("My Files", "icon.png")); items.Add(new MItem("Shared with me", "icon.png")); items.Add(new MItem("Starred", "icon.png")); items.Add(new MItem("Recent", "icon.png")); items.Add(new MItem("Offline", "icon.png")); items.Add(new MItem("Uploads", "icon.png")); items.Add(new MItem("Backup", "icon.png")); items.Add(new MItem("Movie", "icon.png")); items.Add(new MItem("Music", "icon.png")); items.Add(new MItem("Play", "icon.png")); nv.Menu = items; var main1 = new MButton(parent) { Text = "Open NavigationView", AlignmentX = 0, AlignmentY = 0, MinimumWidth = 720, MinimumHeight = 300 }; main1.Show(); var nd = new MNavigationDrawer(parent) { AlignmentX = -1, AlignmentY = -1, WeightX = 1, WeightY = 1, }; nd.Main = main1; nd.NavigationView = nv; main1.Clicked += (s, e) => { nd.IsOpen = true; }; nd.Show(); box.PackEnd(nd); return(box); }
public override EvasObject CreateContent(EvasObject parent) { Box box = new ColoredBox(parent); box.Show(); MNavigationView nv = new MNavigationView(parent) { AlignmentX = -1, AlignmentY = -1, WeightX = 1, WeightY = 1, }; var btn1 = new Button(parent) { Text = "Chage Header / Background", AlignmentX = -1, AlignmentY = -1, WeightX = 1, WeightY = 1, MinimumHeight = 300, }; btn1.Show(); var btn2 = new Button(parent) { Text = "Chage Header / Background", AlignmentX = -1, AlignmentY = -1, WeightX = 1, WeightY = 1, BackgroundColor = Color.Blue }; btn2.Show(); var btn3 = new Button(parent) { Text = "Button", AlignmentX = -1, AlignmentY = -1, WeightX = 1, WeightY = 1, }; btn3.Show(); var header = new Box(parent) { AlignmentX = -1, AlignmentY = -1, WeightX = 1, WeightY = 1, BackgroundColor = Color.White }; header.PackEnd(btn2); header.PackEnd(btn3); header.Show(); nv.Header = btn1; btn1.Clicked += (s, e) => { nv.Header = header; var img = new Image(parent); var path = Path.Combine(Tizen.Applications.Application.Current.DirectoryInfo.Resource, "photo.jpg"); img.LoadAsync(path); img.IsFixedAspect = false; img.CanFillOutside = true; nv.BackgroundImage = img; }; btn2.Clicked += (s, e) => { nv.Header = btn1; nv.BackgroundImage = null; }; var items = new List <MItem>(); items.Add(new MItem("My Files", "icon.png")); items.Add(new MItem("Shared with me", "icon.png")); items.Add(new MItem("Starred", "icon.png")); items.Add(new MItem("Recent", "icon.png")); items.Add(new MItem("Offline", "icon.png")); items.Add(new MItem("Uploads", "icon.png")); items.Add(new MItem("Backup", "icon.png")); items.Add(new MItem("Movie", "icon.png")); items.Add(new MItem("Music", "icon.png")); items.Add(new MItem("Play", "icon.png")); var items1 = new List <MItem>(); for (int i = 0; i < 20; i++) { items1.Add(new MItem("Change Item", "icon.png")); } nv.Menu = items; var dividers = new List <int>(); dividers.Add(1); dividers.Add(3); dividers.Add(5); nv.MenuItemSelected += (s, e) => { if (nv.Menu == items) { nv.Menu = items1; } else { nv.Menu = items; } }; nv.Show(); box.PackEnd(nv); return(box); }