0

I need to create a lot of buttons programmatically for my app.

I can do that, but I'd like to change their style to ButtonRevealStyle.
I searched for answers on internet, but they all concerned C#, and I can't get it to work with this, which may look like a C++ equivalent button->Style = (Windows::UI::Xaml::Style^)Application::Current->Resources["ButtonRevealStyle"];

So my question is, how can I set the style of a button programmatically in UWP with C++/CX ?

Thanks

4
  • You can't use C++/CLI in a UWP project. It does tend to be confused with the C++/CX extension syntax. So google "c++/cx casting" to find the docs. May 9, 2020 at 22:39
  • ty i rectified it
    – Jacques
    May 9, 2020 at 22:55
  • 2
    The FolderEnumeration sample has an example. May 10, 2020 at 2:38
  • ty that's what i needed
    – Jacques
    May 10, 2020 at 12:39

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.