Exemplo n.º 1
0
        /// <summary>
        /// IsLockedProperty property changed handler.
        /// </summary>
        /// <param name="d">LockablePivot that changed its IsLocked.</param>
        /// <param name="e">Event arguments.</param>
        private static void OnIsLockedPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            LockablePivot source = d as LockablePivot;

            if (source != null)
            {
                source.OnIsLockedChanged((bool)e.NewValue);
            }
        }
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/CustomToolkit;component/PhoneToolkitSample/Samples/LockablePivotSample.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.pivot = ((Microsoft.Phone.Controls.LockablePivot)(this.FindName("pivot")));
     this.slider1 = ((System.Windows.Controls.Slider)(this.FindName("slider1")));
     this.slider2 = ((System.Windows.Controls.Slider)(this.FindName("slider2")));
     this.slider3 = ((System.Windows.Controls.Slider)(this.FindName("slider3")));
     this.slider4 = ((System.Windows.Controls.Slider)(this.FindName("slider4")));
     this.slider5 = ((System.Windows.Controls.Slider)(this.FindName("slider5")));
     this.slider6 = ((System.Windows.Controls.Slider)(this.FindName("slider6")));
     this.textBlock1 = ((System.Windows.Controls.TextBlock)(this.FindName("textBlock1")));
     this.lockButton = ((System.Windows.Controls.Button)(this.FindName("lockButton")));
 }
 public void InitializeComponent()
 {
     if (!this._contentLoaded)
     {
         this._contentLoaded = true;
         Application.LoadComponent(this, new Uri("/TinyMoneyManager;component/Pages/DialogBox/AccountInfoViewer.xaml", UriKind.Relative));
         this.LayoutRoot = (Grid) base.FindName("LayoutRoot");
         this.MainPivot = (LockablePivot) base.FindName("MainPivot");
         this.IncomeOrExpenseDetailsPivot = (PivotItem) base.FindName("IncomeOrExpenseDetailsPivot");
         this.NameEditor = (HyperlinkButton) base.FindName("NameEditor");
         this.NameBlock = (TextBlock) base.FindName("NameBlock");
         this.AccountCategoryEditor = (HyperlinkButton) base.FindName("AccountCategoryEditor");
         this.AccountCategoryBlock = (TextBlock) base.FindName("AccountCategoryBlock");
         this.MoneyCurrencyPanel = (HyperlinkButton) base.FindName("MoneyCurrencyPanel");
         this.MoneyCurrencyBlock = (TextBlock) base.FindName("MoneyCurrencyBlock");
         this.TransferingPoundageRatePanel = (HyperlinkButton) base.FindName("TransferingPoundageRatePanel");
         this.PoundageBlock = (TextBlock) base.FindName("PoundageBlock");
         this.RelatedItemsPivot = (PivotItem) base.FindName("RelatedItemsPivot");
         this.RelatedItemsListControl = (LongListSelector) base.FindName("RelatedItemsListControl");
     }
 }
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/Sketch%20and%20Shake;component/Main.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.pivot = ((Microsoft.Phone.Controls.LockablePivot)(this.FindName("pivot")));
     this.pivotDraw = ((Microsoft.Phone.Controls.PivotItem)(this.FindName("pivotDraw")));
     this.drawCanvas = ((System.Windows.Controls.Canvas)(this.FindName("drawCanvas")));
     this.pivotSettings = ((Microsoft.Phone.Controls.PivotItem)(this.FindName("pivotSettings")));
     this.brushSlider = ((System.Windows.Controls.Slider)(this.FindName("brushSlider")));
     this.btnBlack = ((System.Windows.Shapes.Rectangle)(this.FindName("btnBlack")));
     this.btnRed = ((System.Windows.Shapes.Rectangle)(this.FindName("btnRed")));
     this.btnBlue = ((System.Windows.Shapes.Rectangle)(this.FindName("btnBlue")));
     this.btnGreen = ((System.Windows.Shapes.Rectangle)(this.FindName("btnGreen")));
     this.btnWhite = ((System.Windows.Shapes.Rectangle)(this.FindName("btnWhite")));
     this.btnYellow = ((System.Windows.Shapes.Rectangle)(this.FindName("btnYellow")));
     this.btnPurple = ((System.Windows.Shapes.Rectangle)(this.FindName("btnPurple")));
     this.btnOrange = ((System.Windows.Shapes.Rectangle)(this.FindName("btnOrange")));
     this.penSample = ((System.Windows.Shapes.Ellipse)(this.FindName("penSample")));
     this.pivotAbout = ((Microsoft.Phone.Controls.PivotItem)(this.FindName("pivotAbout")));
     this.textBlock1 = ((System.Windows.Controls.TextBlock)(this.FindName("textBlock1")));
     this.lockButton = ((System.Windows.Controls.Button)(this.FindName("lockButton")));
     this.clearTextBlock = ((System.Windows.Controls.TextBlock)(this.FindName("clearTextBlock")));
 }