Consider an app where the ModernTheme is included but is overridden by another theme. How would you apply the theme for a flyout from what has been included in ModernTheme? I have not found a sample of this.
Consider an app where the ModernTheme is included but is overridden by another theme. How would you apply the theme for a flyout from what has been included in ModernTheme? I have not found a sample of this.
Hi Magnus,
Flyouts themselves are not controls. But the presenters used for them are.
If you wanted to include a ControlTheme for a specific control, like a MenuFlyoutPresenter, you could add a ControlTheme whose key is the control type, targets the same type, and is BasedOn one of our predefined ControlThemes. Our "actipro:ControlTheme" markup extension helps find those.
For example:
<ControlTheme x:Key="{x:Type MenuFlyoutPresenter}" TargetType="MenuFlyoutPresenter"
BasedOn="{actipro:ControlTheme MenuFlyoutPresenter}">
I see, I wasn't aware of the "actipro:ControlTheme" markup extension.
Can I do something like:
<Button Theme="{actipro:ControlTheme Button}" /> even though the default theme for the Button is tied to another theme than ModernTheme?
Yes, you can do that as long as the "kind" you indicate after actipro:ControlTheme is a valid member of our ControlThemeKind enumeration. For instance we don't have a "Button" value there, but have things like "ButtonOutline", "ButtonSolid", etc. VS Intellisense may offer the options when typing.
Got it! That's just what I was looking for. Thanks!
Please log in to a validated account to post comments.