当前位置: 首页>>代码示例>>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;未经允许,请勿转载。