SideBarMenuButton.xaml.cs (1275B)
1 using System; 2 using System.Collections.Generic; 3 using System.IO; 4 using System.Linq; 5 using System.Runtime.InteropServices.WindowsRuntime; 6 using Windows.Foundation; 7 using Windows.Foundation.Collections; 8 using Windows.UI.Xaml; 9 using Windows.UI.Xaml.Controls; 10 using Windows.UI.Xaml.Controls.Primitives; 11 using Windows.UI.Xaml.Data; 12 using Windows.UI.Xaml.Input; 13 using Windows.UI.Xaml.Media; 14 using Windows.UI.Xaml.Navigation; 15 16 // The User Control item template is documented at http://go.microsoft.com/fwlink/?LinkId=234236 17 18 namespace File360 19 { 20 public sealed partial class SideBarMenuButton : Button 21 { 22 public SideBarMenuButton() 23 { 24 this.InitializeComponent(); 25 Width = (Window.Current.Bounds.Width*2)/3; 26 Height = Window.Current.Bounds.Height / 12; 27 } 28 public string ImageText 29 { 30 get { return TextImage.Text; } 31 set { TextImage.Text = value; } 32 } 33 public string ContentText 34 { 35 get { return Text.Text; } 36 set { Text.Text = value; } 37 } 38 public SolidColorBrush BackgroundColor 39 { 40 get { return (SolidColorBrush)LayoutGrid.Background; } 41 set { LayoutGrid.Background = value; } 42 } 43 } 44 }