1

Here's the definition of a WinRt button.

Why can't I find the TemplateVisualStateAttribute?

If it's not tagged on the class itself, how can I possibly discover what visual states and groupings are available to me when implementing a custom button style?

There are some examples for what they are, but I would like to be able to discover what they are on other controls as well - how can I do so if the classes aren't tagged properly?

// Type: Windows.UI.Xaml.Controls.Button
// Assembly: Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null
// Assembly location: C:\Program Files (x86)\Windows Kits\8.0\References\CommonConfiguration\Neutral\Windows.winmd

using System.Runtime.CompilerServices;
using Windows.Foundation.Metadata;
using Windows.UI.Xaml.Controls.Primitives;

namespace Windows.UI.Xaml.Controls
{
  /// <summary>
  /// Represents a templated button control that interprets a Click user interaction.
  /// </summary>
  [MarshalingBehavior(MarshalingType.Agile)]
  [Composable(typeof (IButtonFactory), CompositionType.Public, 100794368)]
  [WebHostHidden]
  [Threading(ThreadingModel.Both)]
  [Version(100794368)]
  public class Button : ButtonBase, IButton
  {
    /// <summary>
    /// Initializes a new instance of the Button class.
    /// </summary>
    [MethodImpl]
    public Button();
  }
}
Alwyn
  • 8,079
  • 12
  • 59
  • 107

1 Answers1

2

how can I possibly discover what visual states and groupings are available

Presumably you have to look at the default styles and templates for the control. For WPF/Silverlight, they are published on MSDN, but for WinRT it seems you have to look in the SDK: generic.xaml under c:\Program Files\Windows Kits\8.0\Include\winrt\xaml\design\.

Community
  • 1
  • 1
McGarnagle
  • 101,349
  • 31
  • 229
  • 260
  • Gotcha thanks, yeah the winrt visual states are similar but there is enough differences that I couldn't use the WPF/Silverlight document. This is odd - I don't have that folder on my PC >.< Why can't they make this easier? – Alwyn Jul 19 '13 at 20:48