本文整理汇总了C#中System.Windows.VisualState类的典型用法代码示例。如果您正苦于以下问题:C# VisualState类的具体用法?C# VisualState怎么用?C# VisualState使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
VisualState类属于System.Windows命名空间,在下文中一共展示了VisualState类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: InitializeComponent
public void InitializeComponent()
{
if (!this._contentLoaded)
{
this._contentLoaded = true;
Application.LoadComponent(this, new Uri("/TWC.OVP;component/Views/Shell/OnDemandShellView.xaml", UriKind.Relative));
this.userControl = (UserControl) base.FindName("userControl");
this.LayoutRoot = (Grid) base.FindName("LayoutRoot");
this.AssetInfoStates = (VisualStateGroup) base.FindName("AssetInfoStates");
this.ShowAssetInfo = (VisualState) base.FindName("ShowAssetInfo");
this.InfoPanelIn = (Storyboard) base.FindName("InfoPanelIn");
this.HideAssetInfo = (VisualState) base.FindName("HideAssetInfo");
this.ShowSmallAssetInfoPopupBubble = (VisualState) base.FindName("ShowSmallAssetInfoPopupBubble");
this.CaptionSettingsStates = (VisualStateGroup) base.FindName("CaptionSettingsStates");
this.ShowCaptionSettings = (VisualState) base.FindName("ShowCaptionSettings");
this.HideCaptionSettings = (VisualState) base.FindName("HideCaptionSettings");
this.CaptionSettingsPopupStates = (VisualStateGroup) base.FindName("CaptionSettingsPopupStates");
this.ShowSettingsBubble = (VisualState) base.FindName("ShowSettingsBubble");
this.HideSettingsBubble = (VisualState) base.FindName("HideSettingsBubble");
this.BackgroundRectangle = (Rectangle) base.FindName("BackgroundRectangle");
this.AssetViewer = (ContentControl) base.FindName("AssetViewer");
this.ClickToggleControlBarAction = (ActionMessage) base.FindName("ClickToggleControlBarAction");
this.controller = (OnDemandController) base.FindName("controller");
this.assetInfoContentControl = (BubbleContentControl) base.FindName("assetInfoContentControl");
this.captionBubble = (BubbleContentControl) base.FindName("captionBubble");
this.CaptionSettings = (ContentControl) base.FindName("CaptionSettings");
this.Interaction = (ContentControl) base.FindName("Interaction");
}
}
示例2: GoToState
public bool GoToState(VisualState state, bool useTransitions)
{
if (state == CurrentState)
{
return true;
}
string currentStateName = CurrentState != null ? CurrentState.Name : String.Empty;
VisualTransition transition = useTransitions ? GetTransition(Transitions, currentStateName, state.Name) : null;
Storyboard transitionStoryboard = transition != null ? transition.Storyboard : null;
Storyboard storyboard;
if (transitionStoryboard != null && state.Storyboard != null)
{
// create a sequential animation with the transition storyboard first and then the state storyboard
SequentialTimeline sequentialTimeline = new SequentialTimeline();
sequentialTimeline.Children.Add(transitionStoryboard);
sequentialTimeline.Children.Add(state.Storyboard);
storyboard = new Storyboard();
storyboard.Children.Add(sequentialTimeline);
}
else
{
storyboard = transitionStoryboard ?? state.Storyboard;
}
StartNewStoryboard(storyboard);
CurrentState = state;
return true;
}
示例3: InitializeComponent
public void InitializeComponent()
{
if (!this._contentLoaded)
{
this._contentLoaded = true;
Application.LoadComponent(this, new Uri("/TWC.OVP;component/Views/Shell/SportsNetworkShellView.xaml", UriKind.Relative));
this.LayoutRoot = (Grid) base.FindName("LayoutRoot");
this.ControllerStates = (VisualStateGroup) base.FindName("ControllerStates");
this.ShowController = (VisualState) base.FindName("ShowController");
this.HideController = (VisualState) base.FindName("HideController");
this.WindowStates = (VisualStateGroup) base.FindName("WindowStates");
this.FullScreen = (VisualState) base.FindName("FullScreen");
this.Embedded = (VisualState) base.FindName("Embedded");
this.CaptionSettingsStates = (VisualStateGroup) base.FindName("CaptionSettingsStates");
this.ShowCaptionSettings = (VisualState) base.FindName("ShowCaptionSettings");
this.HideCaptionSettings = (VisualState) base.FindName("HideCaptionSettings");
this.BackgroundRectangle = (Rectangle) base.FindName("BackgroundRectangle");
this.AssetViewer = (ContentControl) base.FindName("AssetViewer");
this.Controller = (Grid) base.FindName("Controller");
this.volumeControl = (VolumeControl) base.FindName("volumeControl");
this.ClosedCaptioning = (ToggleButton) base.FindName("ClosedCaptioning");
this.FullScreenGrid = (Grid) base.FindName("FullScreenGrid");
this.FullScreenButton = (Button) base.FindName("FullScreenButton");
this.ExitFullScreenGrid = (Grid) base.FindName("ExitFullScreenGrid");
this.ExitFullScreenButton = (Button) base.FindName("ExitFullScreenButton");
this.Interaction = (ContentControl) base.FindName("Interaction");
}
}
示例4: VisualStateChangedEventArgs
internal VisualStateChangedEventArgs(VisualState oldState, VisualState newState, FrameworkElement control, FrameworkElement stateGroupsRoot)
{
_oldState = oldState;
_newState = newState;
_control = control;
_stateGroupsRoot = stateGroupsRoot;
}
示例5: InitializeComponent
public void InitializeComponent()
{
if (!this._contentLoaded)
{
this._contentLoaded = true;
Application.LoadComponent(this, new Uri("/TWC.OVP;component/Controls/ErrorMessageBox.xaml", UriKind.Relative));
this.LayoutRoot = (Grid) base.FindName("LayoutRoot");
this.DetailsEnabledStates = (VisualStateGroup) base.FindName("DetailsEnabledStates");
this.ErrorMessageDetailDisabled = (VisualState) base.FindName("ErrorMessageDetailDisabled");
this.ErrorMessageDetailEnabled = (VisualState) base.FindName("ErrorMessageDetailEnabled");
this.DetailsStates = (VisualStateGroup) base.FindName("DetailsStates");
this.DetailsVisible = (VisualState) base.FindName("DetailsVisible");
this.DetailsNotVisible = (VisualState) base.FindName("DetailsNotVisible");
this.BackgroundRectangle = (Rectangle) base.FindName("BackgroundRectangle");
this.InnerDialogGrid = (Grid) base.FindName("InnerDialogGrid");
this.DialogRectangle = (Rectangle) base.FindName("DialogRectangle");
this.CloseButton = (Button) base.FindName("CloseButton");
this.ErrorMessageTitleTextBlock = (TextBlock) base.FindName("ErrorMessageTitleTextBlock");
this.ErrorMessageTextBlock = (TextBlock) base.FindName("ErrorMessageTextBlock");
this.ButtonOK = (Button) base.FindName("ButtonOK");
this.Icon = (TextBlock) base.FindName("Icon");
this.SimpleErrorDetails = (Grid) base.FindName("SimpleErrorDetails");
this.ShowDetailsToggle = (TextToggleButton) base.FindName("ShowDetailsToggle");
this.DetailsTextBox = (TextBox) base.FindName("DetailsTextBox");
}
}
示例6: VisualStateAnimation
public VisualStateAnimation(Control Control, VisualState State, TimeSpan AnimationLength)
: base(null, AnimationLength)
{
this.Control = Control;
this.State = State;
Storyboard = new Storyboard();
Storyboard.Duration = new Duration(AnimationLength);
}
示例7: OnVisualStateChanged
void OnVisualStateChanged(Action doAfterChange, VisualState state) {
if(state == null) {
doAfterChange();
} else {
stopStateChanges = true;
state.Storyboard.Completed += (s, e) => doAfterChange();
VisualStateManager.GoToState(this, state.Name, true);
}
}
示例8: InitializeComponent
public void InitializeComponent() {
if (_contentLoaded) {
return;
}
_contentLoaded = true;
System.Windows.Application.LoadComponent(this, new System.Uri("/Conversion%20App;component/CustomUserControl.xaml", System.UriKind.Relative));
this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
this.CommonStates = ((System.Windows.VisualStateGroup)(this.FindName("CommonStates")));
this.Normal = ((System.Windows.VisualState)(this.FindName("Normal")));
this.Selected = ((System.Windows.VisualState)(this.FindName("Selected")));
this.textBlock = ((System.Windows.Controls.TextBlock)(this.FindName("textBlock")));
}
示例9: InitializeComponent
public void InitializeComponent() {
if (_contentLoaded) {
return;
}
_contentLoaded = true;
System.Windows.Application.LoadComponent(this, new System.Uri("/WorkReport;component/OrderList.xaml", System.UriKind.Relative));
this.ShowList = ((System.Windows.VisualState)(this.FindName("ShowList")));
this.ShowReport = ((System.Windows.VisualState)(this.FindName("ShowReport")));
this.qulityReport = ((System.Windows.Controls.Grid)(this.FindName("qulityReport")));
this.orderList = ((System.Windows.Controls.BusyIndicator)(this.FindName("orderList")));
this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
}
示例10: InitializeComponent
public void InitializeComponent() {
if (_contentLoaded) {
return;
}
_contentLoaded = true;
System.Windows.Application.LoadComponent(this, new System.Uri("/WindowsPhonePrototype1.Screens;component/Baby_Stages.xaml", System.UriKind.Relative));
this.PhoneChrome = ((Microsoft.Expression.Prototyping.WindowsPhone.Mockups.WindowsPhoneChrome)(this.FindName("PhoneChrome")));
this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
this.CommonStates = ((System.Windows.VisualStateGroup)(this.FindName("CommonStates")));
this.Portrait = ((System.Windows.VisualState)(this.FindName("Portrait")));
this.Landscape = ((System.Windows.VisualState)(this.FindName("Landscape")));
}
示例11: OnApplyTemplate
// Summary:
// Builds the visual tree for the System.Windows.Controls.Slider control when
// a new template is applied.
public override void OnApplyTemplate()
{
base.OnApplyTemplate();
_contentControl = GetTemplateChild(ContentContainer) as ContentControl;
if (_contentControl != null)
_contentControl.Content = Content;
_flip = GetTemplateChild(Flip) as VisualState;
if (_flip != null)
_flip.Storyboard.Completed += OnFlipComplete;
}
示例12: InitializeComponent
public void InitializeComponent()
{
if (!this._contentLoaded)
{
this._contentLoaded = true;
Application.LoadComponent(this, new Uri("/TWC.OVP;component/Views/InteractionView.xaml", UriKind.Relative));
this.LayoutRoot = (Grid) base.FindName("LayoutRoot");
this.ErrorStates = (VisualStateGroup) base.FindName("ErrorStates");
this.ErrorMessageShown = (VisualState) base.FindName("ErrorMessageShown");
this.ErrorMessageNotShown = (VisualState) base.FindName("ErrorMessageNotShown");
this.ErrorMessage = (ErrorMessageBox) base.FindName("ErrorMessage");
}
}
示例13: GoToStateCore
protected override bool GoToStateCore(Control control, FrameworkElement templateRoot, string stateName, VisualStateGroup group, VisualState state, bool useTransitions)
{
if (_isSuspended)
{
//_states.Enqueue(stateName);
// return true;
return false;
}
else
{
return base.GoToStateCore(control, templateRoot, stateName, group, state, useTransitions);
}
}
示例14: InitializeComponent
public void InitializeComponent() {
if (_contentLoaded) {
return;
}
_contentLoaded = true;
System.Windows.Application.LoadComponent(this, new System.Uri("/homework.Screens;component/Screen_2.xaml", System.UriKind.Relative));
this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
this._SketchFlowAnimation_SketchFlowAnimation = ((System.Windows.VisualStateGroup)(this.FindName("_SketchFlowAnimation_SketchFlowAnimation")));
this.holdtimes = ((System.Windows.VisualState)(this.FindName("holdtimes")));
this.SketchFlowAnimationFrame = ((System.Windows.VisualState)(this.FindName("SketchFlowAnimationFrame")));
this._SketchFlowAnimation_base = ((System.Windows.VisualState)(this.FindName("_SketchFlowAnimation_base")));
this.button = ((System.Windows.Controls.Button)(this.FindName("button")));
}
示例15: InitializeComponent
public void InitializeComponent() {
if (_contentLoaded) {
return;
}
_contentLoaded = true;
System.Windows.Application.LoadComponent(this, new System.Uri("/EFI;component/Views/MainPage.xaml", System.UriKind.Relative));
this.Container = ((System.Windows.Controls.Grid)(this.FindName("Container")));
this.SettingsPane = ((System.Windows.Controls.Grid)(this.FindName("SettingsPane")));
this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
this.SettingsStates = ((System.Windows.VisualStateGroup)(this.FindName("SettingsStates")));
this.ShowSettings = ((System.Windows.VisualState)(this.FindName("ShowSettings")));
this.HideSettings = ((System.Windows.VisualState)(this.FindName("HideSettings")));
}