/// <summary> /// The go to state core. /// </summary> /// <param name="control"> /// The control. /// </param> /// <param name="templateRoot"> /// The template root. /// </param> /// <param name="stateName"> /// The state name. /// </param> /// <param name="group"> /// The group. /// </param> /// <param name="state"> /// The state. /// </param> /// <param name="useTransitions"> /// The use transitions. /// </param> /// <returns> /// The <see cref="bool"/>. /// </returns> protected override bool GoToStateCore( Windows.UI.Xaml.Controls.Control control, FrameworkElement templateRoot, string stateName, VisualStateGroup group, VisualState state, bool useTransitions) { Debug.WriteLine( "Custom: {0} with template root {1} going to state {2}", control.GetType().FullName, templateRoot.GetType().FullName, stateName); return(base.GoToStateCore(control, templateRoot, stateName, group, state, useTransitions)); }
public object BindAndActiveViewModel(Windows.UI.Xaml.Controls.Control view) { var viewModel = ViewModelLocator.LocateForViewType(view.GetType()); if (viewModel == null) { return(null); } ViewModelBinder.Bind(viewModel, view, null); var activate = viewModel as IActivate; if (activate != null) { activate.Activate(); } return(viewModel); }