Posted 15 years ago by DANIEL GUILLERMO
Version: 4.5.0470
Avatar
I am trying to style a PopupButton to match our other controls and am 90% there. My only remaining issue, is that once the button is clicked (IsPopupOpen=true) a black border appears around the control and the icon seems to shift down to look pressed. I cant figure out how to resolve this.

Here is my code:

<Actipro:PopupButton x:Name="mFavoritesViewCtrl" 
    Style="{DynamicResource ActiproPopupButton}"
    IsTransparencyModeEnabled="True"
    DisplayMode="PopupOnly" ToolTip="View Favorites"
    PopupOpening="popupButtonMenuRuntime_PopupOpening">
    <Actipro:PopupButton.PopupIndicator>
        <Image Source="/Project;component/Images/favb.png" Height="20" />
    </Actipro:PopupButton.PopupIndicator>
</Actipro:PopupButton>

<Style x:Key="ActiproPopupButton" TargetType="{x:Type Actipro:PopupButton}">
    <Style.Triggers>
        <Trigger Property="IsMouseOver" Value="true">
            <Setter Property="BorderBrush" Value="{DynamicResource MouseOverBrush}" />
            <Setter Property="Background" Value="{DynamicResource MouseOverBrush}" />
        </Trigger>
        <Trigger Property="IsPopupOpen" Value="true">
            <Setter Property="BorderBrush" Value="{DynamicResource PressedBrush}" />
            <Setter Property="Background" Value="{DynamicResource PressedBrush}" />
        </Trigger>
    </Style.Triggers>
</Style>
Thanks!
Jon

[Modified at 01/12/2009 10:18 AM]

[Modified at 01/12/2009 10:19 AM]

[Modified at 01/12/2009 10:20 AM]

Comments (4)

Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Jon,

We were unable to reproduce the issue you described. If you can put together a sample project that shows the issue and send it over to our support address, then we can take another look.

Other useful information would be what Operating System and theme you are running (e.g. Vista with Aero, or XP with Classic, etc.).

I suspect that would need to retemplate th control to remove the "black", but I'm unsure what you are referring to there.


Actipro Software Support

Posted 15 years ago by DANIEL GUILLERMO
Avatar
You are on the right track. I am using Windows XP for my dev machine and was using the Microsoft "Zune" theme. If I put it back to XP Default (Blue). The black border isnt there but there are other issues.

Is there an easier way to style this control that will be consistent across OS's / Themes? I tried the "Custom Theme" route but couldnt find a good example in the documentation or forums.

Thanks!
Posted 15 years ago by DANIEL GUILLERMO
Avatar
Another solution would be for you to just post the XAML code for the Style that PopupButton uses by default, then I could customize it to my needs...
Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
We are happy to provide the Styles and control templates for our components to existing customers. If you send over a request to our support address, we can provide the XAML files.


Actipro Software Support

The latest build of this product (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.