Пример #1
0
 void WireUpFormsVsm()
 {
     if (Element.UseFormsVsm())
     {
         InterceptVisualStateManager.Hook(Control.GetFirstDescendant <global::Windows.UI.Xaml.Controls.Grid>(), Control, Element);
     }
 }
Пример #2
0
        void WireUpFormsVsm()
        {
            if (!Element.UseFormsVsm())
            {
                return;
            }

            InterceptVisualStateManager.Hook(Control.GetFirstDescendant <StackPanel>(), Control, Element);

            // We also have to intercept the VSM changes on the TimePicker's button
            var button = Control.GetDescendantsByName <global::Windows.UI.Xaml.Controls.Button>("FlyoutButton").FirstOrDefault();

            if (button != null)
            {
                InterceptVisualStateManager.Hook(button.GetFirstDescendant <global::Windows.UI.Xaml.Controls.Grid>(), button, Element);
            }
        }