public ComboBox() { ResourceResolver.ApplyResource(this, LightDismissOverlayBackgroundProperty, "ComboBoxLightDismissOverlayBackground", isThemeResourceExtension: true); IsItemClickEnabled = true; DefaultStyleKey = typeof(ComboBox); }
public DatePicker() { DefaultStyleKey = typeof(DatePicker); ResourceResolver.ApplyResource(this, LightDismissOverlayBackgroundProperty, "DatePickerLightDismissOverlayBackground", isThemeResourceExtension: true); InitializePartial(); }
private void EnsurePopupCreated() { if (_popup == null) { ResourceResolver.ApplyResource(this, LightDismissOverlayBackgroundProperty, "FlyoutLightDismissOverlayBackground", isThemeResourceExtension: true, isHotReloadSupported: true); var child = CreatePresenter(); _popup = new Popup() { Child = child, IsLightDismissEnabled = _isLightDismissEnabled, AssociatedFlyout = this, }; SynchronizePropertyToPopup(Popup.TemplatedParentProperty, TemplatedParent); _popup.Opened += OnPopupOpened; _popup.Closed += OnPopupClosed; _popup.BindToEquivalentProperty(this, nameof(LightDismissOverlayMode)); _popup.BindToEquivalentProperty(this, nameof(LightDismissOverlayBackground)); InitializePopupPanel(); SynchronizePropertyToPopup(Popup.DataContextProperty, DataContext); SynchronizePropertyToPopup(Popup.AllowFocusOnInteractionProperty, AllowFocusOnInteraction); SynchronizePropertyToPopup(Popup.AllowFocusWhenDisabledProperty, AllowFocusWhenDisabled); } }
private void EnsurePopupCreated() { if (_popup == null) { ResourceResolver.ApplyResource(this, LightDismissOverlayBackgroundProperty, "FlyoutLightDismissOverlayBackground", isThemeResourceExtension: true); var child = CreatePresenter(); _popup = new Windows.UI.Xaml.Controls.Popup() { Child = child, IsLightDismissEnabled = _isLightDismissEnabled, }; SynchronizeTemplatedParent(); _popup.Opened += OnPopupOpened; _popup.Closed += OnPopupClosed; _popup.BindToEquivalentProperty(this, nameof(LightDismissOverlayMode)); _popup.BindToEquivalentProperty(this, nameof(LightDismissOverlayBackground)); InitializePopupPanel(); SynchronizeDataContext(); } }
public ContentDialog() : base() { _popup = new Popup() { LightDismissOverlayMode = LightDismissOverlayMode.On, }; ResourceResolver.ApplyResource(_popup, Popup.LightDismissOverlayBackgroundProperty, "ContentDialogLightDismissOverlayBackground", isThemeResourceExtension: true); _popup.PopupPanel = new ContentDialogPopupPanel(this); var thisRef = (this as IWeakReferenceProvider).WeakReference; _popup.Opened += (s, e) => { if (thisRef.Target is ContentDialog that) { that.Opened?.Invoke(that, new ContentDialogOpenedEventArgs()); VisualStateManager.GoToState(that, "DialogShowing", true); } }; this.KeyDown += OnPopupKeyDown; Loaded += (s, e) => RegisterEvents(); Unloaded += (s, e) => UnregisterEvents(); DefaultStyleKey = typeof(ContentDialog); }
private void Initialize() { InitializePartial(); ResourceResolver.ApplyResource(this, LightDismissOverlayBackgroundProperty, "PopupLightDismissOverlayBackground", isThemeResourceExtension: true); ApplyLightDismissOverlayMode(); }
public Hyperlink() : base("a") { UpdateNavigationProperties(null, _defaultNavigationTarget); PointerPressed += TextBlock.OnPointerPressed; PointerReleased += TextBlock.OnPointerReleased; PointerCaptureLost += TextBlock.OnPointerCaptureLost; ResourceResolver.ApplyResource(this, Hyperlink.ForegroundProperty, "SystemControlHyperlinkTextBrush", isThemeResourceExtension: true); }
public ContentDialog() : base() { _popup = new Popup() { LightDismissOverlayMode = LightDismissOverlayMode.On, }; ResourceResolver.ApplyResource(_popup, Popup.LightDismissOverlayBackgroundProperty, "ContentDialogLightDismissOverlayBackground", isThemeResourceExtension: true, isHotReloadSupported: true); _popup.PopupPanel = new ContentDialogPopupPanel(this); var thisRef = (this as IWeakReferenceProvider).WeakReference; _popup.Opened += (s, e) => { if (thisRef.Target is ContentDialog that) { that.Opened?.Invoke(that, new ContentDialogOpenedEventArgs()); that.UpdateVisualState(); } }; this.KeyDown += OnPopupKeyDown; var inputPane = InputPane.GetForCurrentView(); inputPane.Showing += (o, e) => { if (thisRef.Target is ContentDialog that) { that.UpdateVisualState(); } }; inputPane.Hiding += (o, e) => { if (thisRef.Target is ContentDialog that) { that.UpdateVisualState(); } }; Loaded += (s, e) => RegisterEvents(); Unloaded += (s, e) => UnregisterEvents(); DefaultStyleKey = typeof(ContentDialog); }
public TimePicker() { ResourceResolver.ApplyResource(this, LightDismissOverlayBackgroundProperty, "FlyoutLightDismissOverlayBackground", isThemeResourceExtension: true); DefaultStyleKey = typeof(TimePicker); }
public ComboBox() { ResourceResolver.ApplyResource(this, LightDismissOverlayBackgroundProperty, "ComboBoxLightDismissOverlayBackground", isThemeResourceExtension: true, isHotReloadSupported: true); DefaultStyleKey = typeof(ComboBox); }