protected override void GenerateChildren() { Button button = new Button(); ((ContentControl)button).Content = this._text; ((FrameworkElement)button).Style = (Application.Current.Resources["VKButtonSecondaryStyle"] as Style); TiltEffect.SetSuppressTilt((DependencyObject)button, true); ((FrameworkElement)button).Width = (this.Width + 24.0); ((FrameworkElement)button).Margin = (new Thickness(-12.0)); ((UIElement)button).Tap += (new EventHandler <System.Windows.Input.GestureEventArgs>(this.button_Tap)); this.Children.Add((FrameworkElement)button); }
protected override void GenerateChildren() { Button button = new Button(); button.Content = (object)this._text; button.Style = Application.Current.Resources["VKButtonSecondaryStyle"] as Style; TiltEffect.SetSuppressTilt((DependencyObject)button, true); button.Width = this.Width + 24.0; button.Margin = new Thickness(-12.0); button.Tap += new EventHandler <GestureEventArgs>(this.button_Tap); this.Children.Add((FrameworkElement)button); }
public void SetSingleSelectionMode(bool value, bool useTransitions) { _singleSelectionModeEnabled = value; if (_singleSelectionModeEnabled) { VisualStateManager.GoToState(this, "SingleSelectMode", useTransitions); } else { VisualStateManager.GoToState(this, "MultiSelectMode", useTransitions); } TiltEffect.SetSuppressTilt(SpeakerButton, !_singleSelectionModeEnabled); }
private static async System.Threading.Tasks.Task AuthorizePosition() { HyperlinkButton hyperlinkButton = new HyperlinkButton() { Content = "Déclaration de confidentialité", HorizontalAlignment = HorizontalAlignment.Left, Margin = new Thickness(0, 0, 0, 30), NavigateUri = new Uri("https://www.tan.fr/jsp/fiche_pagelibre.jsp?CODE=21852478&LANGUE=0&RH=ACCUEIL&RF=1373631635261", UriKind.Absolute) }; TiltEffect.SetSuppressTilt(hyperlinkButton, true); CustomMessageBox messageBox = new CustomMessageBox() { Caption = "Autorisez-vous l'application à accèder à votre position ?", Message = "Nantes Tram & Bus utilise votre position géographique pour déterminer les arrêts à proximité de vous.\n\n" + "Cependant, vos coordonnées géographique seront envoyées à la SEMITAN afin de faire fonctionner le service.", Content = hyperlinkButton, LeftButtonContent = "autoriser", RightButtonContent = "annuler", IsFullScreen = false }; switch (await messageBox.ShowAsync()) { case CustomMessageBoxResult.LeftButton: IsolatedStorageSettings.ApplicationSettings["LocationConsent"] = true; break; case CustomMessageBoxResult.RightButton: IsolatedStorageSettings.ApplicationSettings["LocationConsent"] = false; break; case CustomMessageBoxResult.None: IsolatedStorageSettings.ApplicationSettings["LocationConsent"] = false; break; } }