本文整理汇总了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));
}
}
示例2: OnWindowSizeChanged
private void OnWindowSizeChanged(object sender, SizeChangedEventArgs e)
{
if (ShouldGoToWideState())
{
Frame.GoBack();
}
}
示例3: MainHubPage_SizeChanged
private void MainHubPage_SizeChanged(object sender, SizeChangedEventArgs e)
{
vm.Refresh();
VehiclesHubSection_OnLoaded(this, null);
FrameworkElement_OnLoaded(this, null);
}
示例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;
}
}
示例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;
}
}
示例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)
};
}
示例7: Page_SizeChanged
private void Page_SizeChanged(object sender, SizeChangedEventArgs e)
{
if (ActualWidth >= 720)
{
baba.NavigatetoSettings((SettingsList.Items[0] as SettingOption).Option);
}
}
示例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;
}
示例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;
}
}
示例10: OnSizeChanged
public void OnSizeChanged(object sender, SizeChangedEventArgs e)
{
Clip = new RectangleGeometry()
{
Rect = new Rect(0, 0, e.NewSize.Width, e.NewSize.Height)
};
}
示例11: CurrentGrid_SizeChanged
private void CurrentGrid_SizeChanged(object sender, SizeChangedEventArgs e)
{
if (e.NewSize.Height > 0 && e.NewSize.Width > 0)
{
//UpdateItemsSize(e.NewSize);
}
}
示例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();
}
示例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;
}
示例14: ScrollViewer_SizeChanged
private void ScrollViewer_SizeChanged(object sender, SizeChangedEventArgs e)
{
grid.Width = this.ActualWidth;
grid.Height = this.ActualHeight;
(DataContext as BookFixed2ViewModels.PageViewModel).UpdateSource();
}
示例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;
}
}