當前位置: 首頁>>代碼示例>>C#>>正文


C# Xaml.SizeChangedEventArgs類代碼示例

本文整理匯總了C#中Windows.UI.Xaml.SizeChangedEventArgs的典型用法代碼示例。如果您正苦於以下問題:C# SizeChangedEventArgs類的具體用法?C# SizeChangedEventArgs怎麽用?C# SizeChangedEventArgs使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


SizeChangedEventArgs類屬於Windows.UI.Xaml命名空間,在下文中一共展示了SizeChangedEventArgs類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: ContentDisplay_SizeChanged

 private void ContentDisplay_SizeChanged(object sender, SizeChangedEventArgs e)
 {
     if (this.manager != null)
     {
         this.manager.SetRenderSize(new Size(this.ActualWidth, this.ActualHeight));
     }
 }
開發者ID:philipp2500,項目名稱:Remote-Content-Show,代碼行數:7,代碼來源:ContentDisplay.xaml.cs

示例2: OnWindowSizeChanged

 private void OnWindowSizeChanged(object sender, SizeChangedEventArgs e)
 {
     if (ShouldGoToWideState())
     {
         Frame.GoBack();
     }
 }
開發者ID:Anarh2404,項目名稱:TechNews,代碼行數:7,代碼來源:SwipeableDetailView.xaml.cs

示例3: MainHubPage_SizeChanged

        private void MainHubPage_SizeChanged(object sender, SizeChangedEventArgs e)
        {
            vm.Refresh();

            VehiclesHubSection_OnLoaded(this, null);
            FrameworkElement_OnLoaded(this, null);
        }
開發者ID:EmiiFont,項目名稱:MyShuttle_RC,代碼行數:7,代碼來源:MainHubPage.xaml.cs

示例4: pageRoot_SizeChanged

        private void pageRoot_SizeChanged(object sender, SizeChangedEventArgs e)
        {
            bool isPortrait = e.NewSize.Width < e.NewSize.Height;

            if (isPortrait)
            {
                hub.Orientation = Orientation.Vertical;
                //ScrollViewer.SetVerticalScrollMode(hub, ScrollMode.Enabled);
                //ScrollViewer.SetVerticalScrollBarVisibility(hub, ScrollBarVisibility.Auto);
                //ScrollViewer.SetHorizontalScrollMode(hub, ScrollMode.Disabled);
                //ScrollViewer.SetHorizontalScrollBarVisibility(hub, ScrollBarVisibility.Disabled);

                hub.Sections[2].Style = (Style)App.Current.Resources["FirstHubSectionStyle"];
                hub.Sections[3].Style = (Style)App.Current.Resources["FirstHubSectionStyle"];
            }
            else
            {
                hub.Orientation = Orientation.Horizontal;
                //ScrollViewer.SetVerticalScrollMode(hub, ScrollMode.Disabled);
                //ScrollViewer.SetVerticalScrollBarVisibility(hub, ScrollBarVisibility.Disabled);
                //ScrollViewer.SetHorizontalScrollMode(hub, ScrollMode.Enabled);
                //ScrollViewer.SetHorizontalScrollBarVisibility(hub, ScrollBarVisibility.Auto);

                hub.Sections[2].Style = null;
                hub.Sections[3].Style = null;
            }
        }
開發者ID:KonstantinKolesnik,項目名稱:EcosHub,代碼行數:27,代碼來源:LocomotivePage.xaml.cs

示例5: OnSizeChanged

        private async void OnSizeChanged(object sender, SizeChangedEventArgs sizeChangedEventArgs)
        {
            var x = Window.Current.Bounds.Width;
            var y = Window.Current.Bounds.Height;
            await Locator.PlayVideoVM.SetSizeVideoPlayer((uint)x, (uint)y);

            if (x == 320)
            {
                ControlsGrid.Height = 200;
                BackButton.Margin = new Thickness(5, 50, 0, 50);
                MainButtonsNormal.Visibility = Visibility.Collapsed;
                SecondaryButtonsNormalLeft.Visibility = Visibility.Collapsed;
                SecondaryButtonsNormalRight.Visibility = Visibility.Collapsed;

                MainButtonsSnapped.Visibility = Visibility.Visible;
                SecondaryButtonsSnapped.Visibility = Visibility.Visible;
            }
            else
            {
                ControlsGrid.Height = 165;
                BackButton.Margin = new Thickness(50, 50, 0, 50);
                MainButtonsNormal.Visibility = Visibility.Visible;
                SecondaryButtonsNormalLeft.Visibility = Visibility.Visible;
                SecondaryButtonsNormalRight.Visibility = Visibility.Visible;

                MainButtonsSnapped.Visibility = Visibility.Collapsed;
                SecondaryButtonsSnapped.Visibility = Visibility.Collapsed;
            }
        }
開發者ID:kusl,項目名稱:vlcwinrt,代碼行數:29,代碼來源:PlayVideo.xaml.cs

示例6: RefreshableListView_SizeChanged

 /// <summary>
 /// Handler for SizeChanged event, handles cliping
 /// </summary>
 private void RefreshableListView_SizeChanged(object sender, SizeChangedEventArgs e)
 {
     Clip = new RectangleGeometry()
     {
         Rect = new Rect(0, 0, e.NewSize.Width, e.NewSize.Height)
     };
 }
開發者ID:KooKiz,項目名稱:comet,代碼行數:10,代碼來源:PullToRefreshListView.cs

示例7: Page_SizeChanged

 private void Page_SizeChanged(object sender, SizeChangedEventArgs e)
 {
     if (ActualWidth >= 720)
     {
         baba.NavigatetoSettings((SettingsList.Items[0] as SettingOption).Option);
     }
 }
開發者ID:aurora-lzzp,項目名稱:Aurora-Weather,代碼行數:7,代碼來源:SettingsPage.xaml.cs

示例8: UserControl_SizeChanged

 private void UserControl_SizeChanged(object sender, SizeChangedEventArgs e)
 {
     if (e.NewSize.Width > e.NewSize.Height)
         demoPanel.Orientation = Orientation.Horizontal;
     else
         demoPanel.Orientation = Orientation.Vertical;
 }
開發者ID:jiatingxiu,項目名稱:Win2D,代碼行數:7,代碼來源:CustomControlExample.xaml.cs

示例9: LayoutrootSizeChanged

        private void LayoutrootSizeChanged(object sender, SizeChangedEventArgs e)
        {
            if (Layoutroot.ActualWidth > FullWidth)
            {
                btn_Back.Visibility = Visibility.Collapsed;

                ContentColumnDefinition1.Width = new GridLength(320, GridUnitType.Pixel);
                ContentColumnDefinition2.Width = new GridLength(1, GridUnitType.Star);

                Right.Visibility = Visibility.Visible;
            }
            else if (!RightEverShowed)
            {
                ContentColumnDefinition1.Width = new GridLength(1, GridUnitType.Star);
                ContentColumnDefinition2.Width = new GridLength(0, GridUnitType.Pixel);
                btn_Back.Visibility = Visibility.Collapsed;
                Right.Visibility = Visibility.Collapsed;
            }
            else
            {
                btn_Back.Visibility = Visibility.Visible;
                ContentColumnDefinition1.Width = new GridLength(0, GridUnitType.Pixel);
                ContentColumnDefinition2.Width = new GridLength(1, GridUnitType.Star);
                Right.Visibility = Visibility.Visible;
            }
        }
開發者ID:tianzhaodong,項目名稱:uwp_AiJianShu,代碼行數:26,代碼來源:UserCenterView.xaml.cs

示例10: OnSizeChanged

 public void OnSizeChanged(object sender, SizeChangedEventArgs e)
 {
     Clip = new RectangleGeometry()
     {
         Rect = new Rect(0, 0, e.NewSize.Width, e.NewSize.Height)
     };
 }
開發者ID:dolkensp,項目名稱:OTWB,代碼行數:7,代碼來源:ClipToBoundsControl.cs

示例11: CurrentGrid_SizeChanged

 private void CurrentGrid_SizeChanged(object sender, SizeChangedEventArgs e)
 {
     if (e.NewSize.Height > 0 && e.NewSize.Width > 0)
     {
         //UpdateItemsSize(e.NewSize);
     }
 }
開發者ID:antoinecronier,項目名稱:pokemon,代碼行數:7,代碼來源:GridManager.cs

示例12: Page_SizeChanged

        private void Page_SizeChanged(object sender, SizeChangedEventArgs e)
        {
            ViewState = ApplicationView.Value;
            if (ViewState == ApplicationViewState.Snapped)
            {
                if (Page.TopAppBar != null)
                {
                    topBar = Page.TopAppBar;
                    Page.TopAppBar = null;
                }
                if (Page.BottomAppBar != null)
                {
                    bottomBar = Page.BottomAppBar;
                    Page.BottomAppBar = null;
                }
            }
            else if (topBar != null || bottomBar != null)
            {
                Page.TopAppBar = topBar;
                Page.BottomAppBar = bottomBar;

                topBar = null;
                bottomBar = null;
            }

            OnApplicationViewStateChanged();
        }
開發者ID:stevehansen,項目名稱:vidyano_v1,代碼行數:27,代碼來源:VidyanoPage.cs

示例13: FrameworkElement_OnSizeChanged

        private void FrameworkElement_OnSizeChanged(object sender, SizeChangedEventArgs e)
        {
            var listview = sender as ListBox;
            if (listview == null) return;

            var scrollviewr = listview.GetFirstDescendantOfType<ScrollViewer>();
            if (scrollviewr!=null)
            {
                scrollviewr.HorizontalScrollMode = ScrollMode.Disabled;
                scrollviewr.VerticalScrollMode = ScrollMode.Disabled;

            }
            var panel = (VirtualizingStackPanel)(listview.ItemsPanelRoot);

            if (panel == null) throw new ArgumentNullException(nameof(panel));

            var width = e.NewSize.Width;

            var items = panel.Children;
            foreach (var item in  items)
            {
                var listBoxItem = item as ListBoxItem;
                if (listBoxItem != null) listBoxItem.Width = width/items.Count;
            }
            //panel.it = width/5;
        }
開發者ID:startewho,項目名稱:CnBetaUWA,代碼行數:26,代碼來源:MainPage.xaml.cs

示例14: ScrollViewer_SizeChanged

        private void ScrollViewer_SizeChanged(object sender, SizeChangedEventArgs e)
        {
            grid.Width = this.ActualWidth;
            grid.Height = this.ActualHeight;

            (DataContext as BookFixed2ViewModels.PageViewModel).UpdateSource();
        }
開發者ID:kurema,項目名稱:BookViewerApp,代碼行數:7,代碼來源:BookFixed2Page.xaml.cs

示例15: MainPage_SizeChanged

 /// <summary>
 /// Workaround to change the width of all items on changing the with of the window.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 public void MainPage_SizeChanged(object sender, SizeChangedEventArgs e)
 {
     foreach (var task in TaskList.Items.Cast<ITaskViewModel>())
     {
         task.ItemVisualWidth = this.ActualWidth;
     }
 }
開發者ID:nhammerl,項目名稱:TaskTimeRecorder,代碼行數:12,代碼來源:MainPage.xaml.cs


注:本文中的Windows.UI.Xaml.SizeChangedEventArgs類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。