public NavMenuListView() { SelectionMode = ListViewSelectionMode.Single; SingleSelectionFollowsFocus = false; IsItemClickEnabled = true; ItemClick += (o, e) => OnItemClicked(e.ClickedItem as NavPageItem); // Locate the hosting SplitView control Loaded += (s, a) => { var parent = VisualTreeHelper.GetParent(this); while (parent != null && !(parent is SplitView)) parent = VisualTreeHelper.GetParent(parent); if (parent != null) { host = parent as SplitView; host.RegisterPropertyChangedCallback(SplitView.IsPaneOpenProperty, (sender, args) => { OnPaneToggled(); }); host.RegisterPropertyChangedCallback(SplitView.DisplayModeProperty, (sender, args) => { OnPaneToggled(); }); // Call once to ensure we're in the correct state OnPaneToggled(); } }; }
public NavMenuListView() { this.SelectionMode = ListViewSelectionMode.Single; this.IsItemClickEnabled = true; this.ItemClick += ItemClickedHandler; // Locate the hosting SplitView control this.Loaded += (s, a) => { var parent = VisualTreeHelper.GetParent(this); while (parent != null && !(parent is SplitView)) { parent = VisualTreeHelper.GetParent(parent); } if (parent != null) { this.splitViewHost = parent as SplitView; splitViewHost.RegisterPropertyChangedCallback(SplitView.IsPaneOpenProperty, (sender, args) => { this.OnPaneToggled(); }); // Call once to ensure we're in the correct state this.OnPaneToggled(); } }; }
public PaneToggleCommand(SplitView rootSplitView) { if (rootSplitView == null) throw new ArgumentNullException(nameof(rootSplitView)); _rootSplitView = rootSplitView; }
public NavigationMenuListView() { this.SelectionMode = ListViewSelectionMode.Single; this.IsItemClickEnabled = true; this.ItemClick += ItemClickedHandler; this.Loaded += (s, a) => { var parent = VisualTreeHelper.GetParent(this); while (parent != null && !(parent is SplitView)) { parent = VisualTreeHelper.GetParent(parent); } if (parent != null) { this._parentSplitView = parent as SplitView; _parentSplitView.RegisterPropertyChangedCallback(SplitView.IsPaneOpenProperty, (sender, args) => { this.OnPaneToggled(); }); } }; }
internal static void SetSplitViewContent(SplitView rootSplitView, Type destPage, bool push) { if (push) { var type = rootSplitView.Content?.GetType(); if (destPage != type) { AddToBackStack(type); rootSplitView.Content = (UserControl) Activator.CreateInstance(destPage); } } else { rootSplitView.Content = (UserControl) Activator.CreateInstance(RemoveFromBackStack()); } }
protected override void OnApplyTemplate() { _splitView = base.GetTemplateChild("splitView") as SplitView; _toggle = base.GetTemplateChild("toggle") as Button; _exitFS = base.GetTemplateChild("exitFS") as Button; _headerContainer = base.GetTemplateChild("headerContainer") as Panel; _commandBarContainer = base.GetTemplateChild("commandBarContainer") as ContentControl; _paneHeaderContainer = base.GetTemplateChild("paneHeaderContainer") as ContentControl; _lview = base.GetTemplateChild("lview") as ListView; _lviewSub = base.GetTemplateChild("lviewSub") as ListView; _container = base.GetTemplateChild("container") as Panel; _content = base.GetTemplateChild("content") as Panel; _topPane = base.GetTemplateChild("topPane") as ContentControl; _rightPane = base.GetTemplateChild("rightPane") as ContentControl; if (ListViewItemContainerStyle != null) { _lview.ItemContainerStyleSelector = new NavigationStyleSelector(ListViewItemContainerStyle, this.SeparatorStyle); _lviewSub.ItemContainerStyleSelector = new NavigationStyleSelector(ListViewItemContainerStyle, this.SeparatorStyle); } else { _lview.ItemContainerStyleSelector = new NavigationStyleSelector(_lview.ItemContainerStyle, this.SeparatorStyle); _lviewSub.ItemContainerStyleSelector = new NavigationStyleSelector(_lview.ItemContainerStyle, this.SeparatorStyle); } _lview.ItemContainerStyle = null; _lviewSub.ItemContainerStyle = null; _toggle.Click += OnToggleClick; _exitFS.Click += OnExitFSClick; _splitView.PaneClosed += OnPaneClosed; _lview.ItemClick += OnItemClick; _lviewSub.ItemClick += OnItemClick; _lview.SelectionChanged += OnSelectionChanged; _isInitialized = true; this.SelectFirstNavigationItem(); SetDisplayMode(this.DisplayMode); SetCommandBar(_commandBar); SetCommandBarVerticalAlignment(this.CommandBarVerticalAlignment); SetPaneHeader(_paneHeader); base.OnApplyTemplate(); }
private void OnLoaded(object o, RoutedEventArgs e) { var parent = VisualTreeHelper.GetParent(this); while (parent != null && !(parent is SplitView)) { parent = VisualTreeHelper.GetParent(parent); } if (parent == null) return; _splitViewHost = (SplitView) parent; _splitViewHost.RegisterPropertyChangedCallback(SplitView.IsPaneOpenProperty, (_, __) => { OnPaneToggled(); }); OnPaneToggled(); }
internal static void SplitViewPaneHandler(EventMainPage page, SplitView rootSplitView, ToggleButton togglePaneButton) { if (rootSplitView.DisplayMode == SplitViewDisplayMode.Inline || rootSplitView.DisplayMode == SplitViewDisplayMode.Overlay) { var transform = togglePaneButton.TransformToVisual(page); var rect = transform.TransformBounds(new Rect(0, 0, togglePaneButton.ActualWidth, togglePaneButton.ActualHeight)); page.TogglePaneButtonRect = rect; } else { page.TogglePaneButtonRect = new Rect(); } }
protected override void OnApplyTemplate() { base.OnApplyTemplate(); _split = GetTemplateChild("SplitView") as SplitView; if (_split == null) { return; } var paneToggle = GetTemplateChild("PaneTogglePane") as Windows.UI.Xaml.Controls.Button; if (paneToggle != null) { paneToggle.Click += OnToggleClicked; } var contentToggle = GetTemplateChild("ContentTogglePane") as Windows.UI.Xaml.Controls.Button; if (contentToggle != null) { contentToggle.Click += OnToggleClicked; } _masterPresenter = GetTemplateChild("MasterPresenter") as FrameworkElement; _detailPresenter = GetTemplateChild("DetailPresenter") as FrameworkElement; _commandBar = GetTemplateChild("CommandBar") as CommandBar; _toolbarPlacementHelper.Initialize(_commandBar, () => ToolbarPlacement, GetTemplateChild); UpdateMode(); if (_commandBarTcs != null) { _commandBarTcs.SetResult(_commandBar); } }
protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); splitter = (SplitView)e.Parameter; //CommandBar topBar = (CommandBar)e.Parameter; /*topBar.PrimaryCommands.Add(new AppBarButton * { * Template=(ControlTemplate)this.Resources["AddFolderButton"] * });*/ //topBar.PrimaryCommands.Add((AppBarButton)this.Resources["AddFolderButton"]); /*topBar.PrimaryCommands.Add(new AppBarButton * { * Icon = new SymbolIcon(Symbol.Add), * Flyout = new MenuFlyout * { * Items = * { * (new MenuFlyoutItem{ Text="Add local folder"}).Click += PickALocalFolder(object sender, RoutedEventArgs e), * new MenuFlyoutItem{ Text="Add SMB shared folder" }, * new MenuFlyoutItem{ Text="Add FTP server folder" }, * new MenuFlyoutItem{ Text="Add new HTTP directory index folder" }, * new MenuFlyoutItem{ Text="Add new OneDrive folder" }, * new MenuFlyoutItem{ Text="Add new Google Drive folder" }, * } * } * });*/ /*AppBarButton editButton = new AppBarButton(); * editButton.Icon = new SymbolIcon(Symbol.Add); * //editButton. * topBar.PrimaryCommands.Add(editButton);*/ //topBar.PrimaryCommands.Add((MenuFlyout)this.Resources["DropDown"]); //topBar.PrimaryCommands.Add() //System.Diagnostics.Debug.WriteLine("Navigated to!"); }
private async void EditLocationClicked(object sender, EventArgs e) { try { if (Device.OS == TargetPlatform.Android) { FullMapView.PointOnMapView = new AndroidMapView(); } else { FullMapView.PointOnMapView = new WindowsMapView(); } if (Device.OS == TargetPlatform.Android) { await SplitView.Instace().PopRightContent(); } await SplitView.Instace().PushRightContent(EditLocInstance = new EditLocationMapView(FullMapView.PointOnMapView, _casePosition)); } catch (Exception ex) { LogTracking.LogTrace(ex.ToString()); } }
public MainMenuListView() { SelectionMode = ListViewSelectionMode.Single; SingleSelectionFollowsFocus = false; IsItemClickEnabled = true; ItemClick += OnItemClicked; Loaded += (s, a) => { var parent = VisualTreeHelper.GetParent(this); while (parent != null && !(parent is SplitView)) { parent = VisualTreeHelper.GetParent(parent); } if (parent != null && parent is SplitView sv) { splitView = sv; splitView.RegisterPropertyChangedCallback(SplitView.IsPaneOpenProperty, (sender, args) => OnPaneToggled()); splitView.RegisterPropertyChangedCallback(SplitView.DisplayModeProperty, (sender, args) => OnPaneToggled()); OnPaneToggled(); } }; }
public void Split_WithLocalhostClient_WhenNameIsTestingSplitOnlyWl_ReturnsSplit() { // Arrange. var splitViewExpected = new SplitView { name = "testing_split_only_wl", treatments = new List <string> { "whitelisted" }, }; var configurationOptions = new ConfigurationOptions { LocalhostFilePath = "split.yaml", Ready = 500 }; _blockUntilReadyService .Setup(mock => mock.IsSdkReady()) .Returns(true); var factory = new SplitFactory("localhost", configurationOptions); var manager = factory.Manager(); manager.BlockUntilReady(1000); // Act. var splitViewResult = manager.Split("testing_split_only_wl"); // Assert. Assert.AreEqual(splitViewExpected.name, splitViewResult.name); Assert.IsFalse(splitViewResult.killed); Assert.IsNull(splitViewResult.configs); Assert.IsNull(splitViewResult.trafficType); Assert.AreEqual(splitViewExpected.treatments.Count, splitViewResult.treatments.Count); }
private void ShellSplitView_PaneClosing(SplitView sender, SplitViewPaneClosingEventArgs args) { user.Visibility = Visibility.Collapsed; }
private void DuanSplitView_PaneClosed(SplitView sender, object args) { CommentControl.ClearResponse(); }
/// <summary> /// Fired when the subreddit panel is closed. /// </summary> /// <param name="sender"></param> /// <param name="args"></param> private void SplitView_PaneClosing(SplitView sender, SplitViewPaneClosingEventArgs args) { // Hide the loading screen. HideFullScreenLoading(); }
private void SplitView_PaneClosed(SplitView sender, object args) { comment.ClearComment(); repost.dynamicRepostVM.Clear(); }
void MenuListviewLoaded(object sender, RoutedEventArgs e) { var folder = Package.Current.InstalledLocation; var files = folder.GetFilesAsync().AsTask(); foreach (var file in files.Result) { if ((file.FileType != ".dll" && file.FileType != ".exe") || file.DisplayName.StartsWith("CLR", StringComparison.OrdinalIgnoreCase) || file.DisplayName.StartsWith("Microsoft", StringComparison.OrdinalIgnoreCase) || file.DisplayName.StartsWith("System", StringComparison.OrdinalIgnoreCase) || file.DisplayName.StartsWith("UCRT", StringComparison.OrdinalIgnoreCase)) continue; userAssemblies.Add(Assembly.Load(new AssemblyName(file.DisplayName))); } var parent = VisualTreeHelper.GetParent(this); while (parent != null && !(parent is SplitView)) parent = VisualTreeHelper.GetParent(parent); if (parent != null) { splitViewHost = parent as SplitView; splitViewHost.RegisterPropertyChangedCallback(SplitView.IsPaneOpenProperty, (s, a) => OnPaneToggled()); OnPaneToggled(); } }
private void RootSplitView_PaneClosed(SplitView sender, object args) { var eventHandler = PaneClosed; if (eventHandler != null) { eventHandler(this, EventArgs.Empty); } }
/// <summary> /// Panel closed event /// </summary> /// <param name="sender"></param> /// <param name="args"></param> private void SplitView_PaneClosed(SplitView sender, object args) { AnimateTargetToHamburger(); PaneClosed?.Invoke(sender, args); }
private void Pane_Opened(SplitView sender, object e) { paneOpenCheckbox.IsChecked = true; }
private void sideMenu_PaneClosed(SplitView sender, object args) { closeSideMenu(); }
//If the Remove Media SplitView is open when the PlayList is Closed then we Close the Remove Media SplitView private void Splitter_PaneClosing(SplitView sender, SplitViewPaneClosingEventArgs args) { if (Remove_Media_SplitView.IsPaneOpen == true) { Button_Remove_Close_Click(null, null); } }
/// <summary> /// Hides divider when nav pane is closed. /// </summary> /// <param name="sender"></param> /// <param name="args"></param> private void RootSplitView_PaneClosed(SplitView sender, object args) { NavPaneDivider.Visibility = Visibility.Collapsed; }
private void MainSplitView_PaneClosed(SplitView sender, object args) { }
private async void settingview_PaneClosing(SplitView sender, SplitViewPaneClosingEventArgs args) { Windows.Storage.ApplicationDataContainer localSettings = Windows.Storage.ApplicationData.Current.LocalSettings; Windows.Storage.StorageFolder localFolder = Windows.Storage.ApplicationData.Current.LocalFolder; //localSettings.Values["filekey"] = filetext.Text; if (themetoggle.IsOn) { localSettings.Values["themekey"] = "Dark"; } else { localSettings.Values["themekey"] = "Light"; } localSettings.Values["pathkey"] = pathtext.Text; if (search.SelectedIndex == 0) { localSettings.Values["search"] = "Google"; } if (search.SelectedIndex == 1) { localSettings.Values["search"] = "Bing"; } if (search.SelectedIndex == 2) { localSettings.Values["search"] = "Wikipedia"; } Object themet = localSettings.Values["themetoggle"]; if (themet != null) { if(themet.ToString() != themetoggle.IsOn.ToString()) { MessageDialog m = new MessageDialog("Restart the app to apply new settings."); m.Commands.Add(new Windows.UI.Popups.UICommand("Close", (command) => { Application.Current.Exit(); } )); await m.ShowAsync(); } else { } } else { } }
private void MySplitView_PaneClosing(SplitView sender, SplitViewPaneClosingEventArgs args) { Search.Visibility = Visibility.Visible; }
protected override void OnApplyTemplate() { base.OnApplyTemplate(); _split = GetTemplateChild("SplitView") as SplitView; if (_split == null) return; var paneToggle = GetTemplateChild("PaneTogglePane") as Windows.UI.Xaml.Controls.Button; if (paneToggle != null) paneToggle.Click += OnToggleClicked; var contentToggle = GetTemplateChild("ContentTogglePane") as Windows.UI.Xaml.Controls.Button; if (contentToggle != null) contentToggle.Click += OnToggleClicked; _masterPresenter = GetTemplateChild("MasterPresenter") as FrameworkElement; _detailPresenter = GetTemplateChild("DetailPresenter") as FrameworkElement; _commandBar = GetTemplateChild("CommandBar") as CommandBar; UpdateMode(); TaskCompletionSource<CommandBar> tcs = _commandBarTcs; if (tcs != null) { _commandBarTcs = null; tcs.SetResult(_commandBar); } }
public SubMenuPage(LayoutDataGroup dGroup, SplitView MainSplitView) { this.InitializeComponent(); ItemsView.ItemsSource = dGroup.Items; defaultViewModel = dGroup.Items; }
private void SplitView_OnPaneClosing(SplitView sender, SplitViewPaneClosingEventArgs args) { SecondaryButtonGroup.Orientation = Orientation.Vertical; }
private void MySplitView_PaneClosed(SplitView sender, object args) { // chanelListView.Visibility = Visibility.Collapsed; }
protected override void OnApplyTemplate() { base.OnApplyTemplate(); _splitView = (SplitView)GetTemplateChild("SplitView"); _splitView.Tag = new RelayCommand<HamburgerItem>(RaiseItemChanged); _hamburgerButton = (RadioButton)GetTemplateChild("HamburgerButton"); _hamburgerButton.Click += OnTogglePane; }
protected override void OnApplyTemplate() { base.OnApplyTemplate(); _splitView = (SplitView)GetTemplateChild("SplitView"); _splitView.PaneClosed += (sender, args) => { if (IsPaneOpen) IsPaneOpen = false; }; _hamburgerButton = (Button)GetTemplateChild("HamburgerButton"); _hamburgerButton.Click += OnTogglePane; }
private void splitHam_PaneClosing(SplitView sender, SplitViewPaneClosingEventArgs args) { listHam.SelectedIndex = -1; }
private void MySplitView_PaneClosing(SplitView sender, SplitViewPaneClosingEventArgs args) { }
private void MySplitView_PaneClosed(SplitView sender, object args) { MySplitView.Content.Opacity = 1; }
private void RootSplitView_PaneClosing(SplitView sender, SplitViewPaneClosingEventArgs args) { var eventHandler = PaneClosing; if (eventHandler != null) { eventHandler(this, args); } }
public void Initialize(Frame shellFrame, SplitView splitView, Frame rightFrame, IList <KeyboardAccelerator> keyboardAccelerators) { NavigationService.Frame = shellFrame; MenuNavigationHelper.Initialize(splitView, rightFrame); _keyboardAccelerators = keyboardAccelerators; }
private void OnLoaded(object sender, RoutedEventArgs e) { var splitView = this.GetParentByType<SplitView>(); if (splitView == null) { throw new InvalidOperationException( "SplitViewPaneMenu cannot be applied to a control that is not of type SplitView"); } this._parent = splitView; this._parent.RegisterPropertyChangedCallback( SplitView.IsPaneOpenProperty, (control, args) => { this.OnPaneToggled(); }); this.OnPaneToggled(); ; }
private void sp_View_PaneClosed(SplitView sender, object args) { }
/// <summary> /// Fired when the panel is closed. /// </summary> /// <param name="sender"></param> /// <param name="args"></param> private void SplitView_PaneClosed(SplitView sender, object args) { // Make sure all panels are closed. CloseAllPanels(); }
private void OnPaneClosed(SplitView sender, object args) { this.ViewModel.ActiveFolderView.VisiblePanel = PanelType.None; }
private void SplitViewPaneClosed(SplitView sender, object args) { PanelButton.Background = ClosedBrush; }
private void DisplayLogin_PaneClosed(SplitView sender, object args) { Arrow.Content = "5"; }
private void Root_PaneClosed(SplitView sender, object args) { NowPanelClose.Begin(); NowPanelPointerOut.Begin(); nowPanel_Open = false; }
private void Pane_Closed(SplitView sender, object e) { paneOpenCheckbox.IsChecked = false; }
public static void Initialize(SplitView splitView, Frame rightFrame) { _splitView = splitView; _rightFrame = rightFrame; }
/// <summary> /// When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate. /// </summary> protected override void OnApplyTemplate() { if (_rootSplitView != null) { _rootSplitView.PaneClosing -= RootSplitView_PaneClosing; _rootSplitView.PaneClosed -= RootSplitView_PaneClosed; } base.OnApplyTemplate(); _rootGrid = (Grid)this.GetTemplateChild("RootGrid"); _rootSplitView = (SplitView)this.GetTemplateChild("RootSplitView"); _paneBorder = (Border)this.GetTemplateChild("PaneBorder"); if (_rootSplitView != null) { _rootSplitView.PaneClosing += RootSplitView_PaneClosing; _rootSplitView.PaneClosed += RootSplitView_PaneClosed; } ResetApplicationViewVisibleMargin(ApplicationView.GetForCurrentView()); }
private void RootSplitView_OnPaneClosed(SplitView sender, object args) { FocusOnSelectedTextEditor(); }
/// <summary> /// Panel closing event /// </summary> /// <param name="sender"></param> /// <param name="args"></param> private void SplitView_PaneClosing(SplitView sender, SplitViewPaneClosingEventArgs args) { PaneClosing?.Invoke(sender, args); }
private void RootSplitView_OnPaneOpening(SplitView sender, object args) { SettingsFrame.Navigate(typeof(SettingsPage), null, new SuppressNavigationTransitionInfo()); }
private void Pane_Opening(SplitView sender, object args) { }
private void mySplitView_PaneClosed(SplitView sender, object args) { SearchText.Visibility = Visibility.Collapsed; OrderText.Visibility = Visibility.Collapsed; InventoryText.Visibility = Visibility.Collapsed; }
private void Pane_Closing(SplitView sender, SplitViewPaneClosingEventArgs args) { }
private void MainMenu_PaneClosed(SplitView sender, object args) { HamburgerPane.PaneClosed(); }
internal abstract void Write(SplitView split);
/// <summary> /// Hides divider when nav pane is closed. /// </summary> /// <param name="sender"></param> /// <param name="args"></param> private void RootSplitView_PaneClosed(SplitView sender, object args) => NavPaneDivider.Visibility = Visibility.Collapsed;