www
Posted 彭二狗的牵引绳
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了www相关的知识,希望对你有一定的参考价值。
<Menu x:Name="menuTop" ItemsSource="Binding Path=QueryEditorMenu"> <Menu.ItemContainerStyle> <Style TargetType="MenuItem"> <Setter Property="Header" Value="Binding Title"></Setter> <Setter Property="Command" Value="Binding Command"></Setter> <Setter Property="CommandParameter" Value="Binding NameSpace"></Setter> <Setter Property="Tag" Value="Binding Tag"></Setter> <Setter Property="ItemsSource" Value="Binding SubItems"></Setter> <Setter Property="InputGestureText" Value="Binding ShortcutKey" /> </Style> </Menu.ItemContainerStyle> </Menu>
public class MenuBar:BindableBase private string _icon; public string Icon get return _icon; set SetProperty(ref _icon, value); private string _tag; public string Tag get return _tag; set SetProperty(ref _tag, value); private string title; /// <summary> /// 菜单标题 /// </summary> public string Title get return title; set title = value; private string shortcutKey; /// <summary> /// 菜单快捷键 /// </summary> public string ShortcutKey get return shortcutKey; set shortcutKey = value; private string nameSpace; /// <summary> /// 命名空间 /// </summary> public string NameSpace get return nameSpace; set nameSpace = value; private bool _isEnabled; public bool IsEnabled get return _isEnabled; set SetProperty(ref _isEnabled, value); private Visibility _mainViewButtonVisible; public Visibility MainViewButtonVisible get return _mainViewButtonVisible; set SetProperty(ref _mainViewButtonVisible, value); private ObservableCollection<MenuBar> subItems; public ObservableCollection<MenuBar> SubItems get return subItems; set subItems = value; this.RaisePropertyChanged(); private ICommand command; public ICommand Command get return command; set command = value; this.RaisePropertyChanged();
private void LoopItemsControl(object child)
ItemsControl itemsControl = child as ItemsControl;
for (int i = 0; i < itemsControl.Items.Count; i++)
DependencyObject dependencyObject = itemsControl.ItemContainerGenerator.ContainerFromIndex(i);
LoadControlsInXAMLContainer(dependencyObject);
LoopItemsControl(dependencyObject);
//if (child is ItemsControl)
//
// ItemsControl itemsControl = child as ItemsControl;
// for (int i = 0; i < itemsControl.Items.Count; i++)
//
// LoadControlsInXAMLContainer(itemsControl.ItemContainerGenerator.ContainerFromIndex(i));
// LoopItemsControl(itemsControl.ItemContainerGenerator.ContainerFromIndex(i));
//
//
foreach (object child in LogicalTreeHelper.GetChildren(dep))
if (child is ItemsControl)
LoopItemsControl(child);
//ItemsControl itemsControl = child as ItemsControl;
//for (int i = 0; i < itemsControl.Items.Count; i++)
//
// DependencyObject dependencyObject = itemsControl.ItemContainerGenerator.ContainerFromIndex(i);
// LoadControlsInXAMLContainer(dependencyObject);
//
//LoopItemsControl(child);
LoadControlsInXAMLContainer(child);
将非www重定向到www
Redirects to reduce duplicate content
RewriteEngine On RewriteCond %{HTTP_HOST} !~^www.example.com$ RewriteRule (.*) http://www.example.com/$1 [r=301,L]
以上是关于www的主要内容,如果未能解决你的问题,请参考以下文章
仅针对某些特定页面将非 www/http 强制为 www/https