/// <summary>
 /// Translates <see cref="ApplicationViewState"/> values into strings for visual state
 /// management within the page.  The default implementation uses the names of enum values.
 /// Subclasses may override this method to control the mapping scheme used.
 /// </summary>
 /// <param name="viewState">View state for which a visual state is desired.</param>
 /// <returns>Visual state name used to drive the
 /// <see cref="VisualStateManager"/></returns>
 /// <seealso cref="InvalidateVisualState"/>
 private static string DetermineVisualState(ApplicationViewState viewState)
 {
     return viewState.ToString();
 }
 /// <summary>
 /// Translates <see cref="ApplicationViewState"/> values into strings for visual state
 /// management within the page.  The default implementation uses the names of enum values.
 /// Subclasses may override this method to control the mapping scheme used.
 /// </summary>
 /// <param name="viewState">View state for which a visual state is desired.</param>
 /// <returns>Visual state name used to drive the
 /// <see cref="VisualStateManager"/></returns>
 /// <seealso cref="InvalidateVisualState"/>
 protected virtual string DetermineVisualState(ApplicationViewState viewState)
 {
     return viewState.ToString();
 }
        public void MainPage_SizeChanged(object sender, SizeChangedEventArgs e)
        {
            ApplicationViewState Aps = ApplicationView.Value;

            VisualStateManager.GoToState(this, Aps.ToString(), false);
        }
Ejemplo n.º 4
0
 /// <summary>
 /// <see cref="ApplicationViewState"/> 値を、ページ内の表示状態管理で使用できる文字列に
 /// 変換します。既定の実装では列挙値の名前を使用します。
 /// サブクラスでこのメソッドをオーバーライドして、使用されているマップ スキームを制御する場合があります。
 /// </summary>
 /// <param name="viewState">表示状態が必要なビューステート。</param>
 /// <returns><see cref="VisualStateManager"/> の実行に使用される
 /// 表示状態の名前</returns>
 /// <seealso cref="InvalidateVisualState"/>
 protected virtual string DetermineVisualState(ApplicationViewState viewState)
 {
     return(viewState.ToString());
 }
Ejemplo n.º 5
0
        void WindowSizeChanged(object sender, WindowSizeChangedEventArgs e)
        {
            ApplicationViewState viewState = ApplicationView.Value;

            VisualStateManager.GoToState(this, viewState.ToString(), false);
        }
 /// <summary>
 /// Translates <see cref="ApplicationViewState"/> values into strings for visual state
 /// management within the page.  The default implementation uses the names of enum values.
 /// Subclasses may override this method to control the mapping scheme used.
 /// </summary>
 /// <param name="viewState">View state for which a visual state is desired.</param>
 /// <returns>Visual state name used to drive the
 /// <see cref="VisualStateManager"/></returns>
 /// <seealso cref="InvalidateLayoutVisualState"/>
 public virtual string GetLayoutVisualState(ApplicationViewState viewState)
 {
     return(viewState.ToString());
 }
Ejemplo n.º 7
0
 protected void SetState(ApplicationViewState state)
 {
     SetState(state.ToString());
 }
Ejemplo n.º 8
0
 private string DetermineVisualState(ApplicationViewState viewState)
 {
     return(viewState.ToString());
 }
Ejemplo n.º 9
0
 void OwningCalendarSizeChanged(object sender, SizeChangedEventArgs e)
 {
     _applicationViewState = ApplicationView.Value;
     VisualStateManager.GoToState(this, _applicationViewState.ToString(), false);    
 }