• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Xaml.SizeChangedEventArgs类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Windows.UI.Xaml.SizeChangedEventArgs的典型用法代码示例。如果您正苦于以下问题:C# SizeChangedEventArgs类的具体用法?C# SizeChangedEventArgs怎么用?C# SizeChangedEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SizeChangedEventArgs类属于Windows.UI.Xaml命名空间,在下文中一共展示了SizeChangedEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: OnSizeChanged

        private void OnSizeChanged(object sender, SizeChangedEventArgs e)
        {
            // How much room do we have?
            double gridMargin = 20;
            double gridWidth = e.NewSize.Width - gridMargin;

            // How much do we allow for each item?
            const double itemWidth = 330;

            // We want at least 3 across
            if (itemWidth * 3 <= gridWidth)
            {
                if (currentVisualState != VisualState.Big)
                {
                    VisualStateManager.GoToState(this, "BigScreen", false);
                    currentVisualState = VisualState.Big;
                }
            }
            else
            {
                if (currentVisualState != VisualState.Small)
                {
                    VisualStateManager.GoToState(this, "SmallScreen", false);
                    currentVisualState = VisualState.Small;
                }
            }
        }
开发者ID:liuywg,项目名称:Win2D-Samples,代码行数:27,代码来源:MainPage.xaml.cs


示例17: Newsfeed_SizeChanged

 private void Newsfeed_SizeChanged(object sender, SizeChangedEventArgs e)
 {
     ItemsWrapGrid MyItemsPanel = (ItemsWrapGrid)Newsfeed.ItemsPanelRoot;
     var width = e.NewSize.Width / 2;
     MyItemsPanel.ItemWidth = width;
     Messenger.Default.Send(new WidthMessage() { Width = width });     
 }
开发者ID:Bernie-2016,项目名称:Connect-Windows,代码行数:7,代码来源:NewsPresenter.xaml.cs


示例18: Page_SizeChanged

        private void Page_SizeChanged(object sender, SizeChangedEventArgs e)
        {
          //  float taux=  this.MaxWidth/


            if (this.ActualWidth > 1000)
            { descriptionTextBox.Text = APPDESCRIPTION_XL;
                descriptionTextBox.FontSize = 14;

            }else
                   if (this.ActualWidth > 600)
            {
                descriptionTextBox.Text = APPDESCRIPTION_S;
                descriptionTextBox.FontSize = 16;

            }

            else
            {
                descriptionTextBox.Text = APPDESCRIPTION_S;
                descriptionTextBox.FontSize = 13;
            }

            float x = (float)(this.ActualHeight / 640.00);
            contentScroller.ChangeView(null, null, x);
            contentScroller.Height = this.ActualHeight-55;




        }
开发者ID:malikbenabda,项目名称:RestCoachWP,代码行数:31,代码来源:AboutPage.xaml.cs


示例19: MainPage_SizeChanged

 private void MainPage_SizeChanged(object sender, SizeChangedEventArgs e)
 {
     if ((ApplicationView.GetForCurrentView().Orientation == ApplicationViewOrientation.Landscape) == smallView)
     {
         AlignElements();
     }
 }
开发者ID:tomazio21,项目名称:DocFingerPrinterBeta,代码行数:7,代码来源:MainPage.xaml.cs


示例20: LayoutAwarePage_SizeChanged_1

 private void LayoutAwarePage_SizeChanged_1(object sender, SizeChangedEventArgs e)
 {
     if (ApplicationView.Value != ApplicationViewState.Snapped)
     {
         gridMembri.Height = gridWannabe.Height = gridAlumnus.Height = Window.Current.Bounds.Height - 260;
     }
 }
开发者ID:radu-ungureanu,项目名称:MSP,代码行数:7,代码来源:EchipaPage.xaml.cs



注:本文中的Windows.UI.Xaml.SizeChangedEventArgs类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Xaml.Style类代码示例发布时间:2022-05-26
下一篇:
C# Xaml.RoutedEventArgs类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap