popup button image sometimes missing

WPF Studio, Themes, and Shared Library for WPF Forum

Posted 10 years ago by karhong
Version: 11.2.0552
Avatar
Hi,

I have below in my xaml.

<actipro:PopupButton.PopupIndicator>
<Viewbox Height="16" Width="16">
<Path Fill="{x:Null}" Width="13" Height="13.5" Stretch="Fill" StrokeStartLineCap="Round" StrokeEndLineCap="Round" StrokeLineJoin="Round" Stroke="{Binding Foreground,ElementName=showCalendar}" Data="M 445.225,139.428L 446.441,139.113L 447.522,139.46C 447.792,139.691 447.927,139.987 447.927,140.348C" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Viewbox>
</actipro:PopupButton.PopupIndicator>

Not always reproducible, sometimes the Image (Viewbox) is blank..
Is there any problem on my code above ? I saw someone else is using Image instead of viewbox.

Any help is appreciated.

Thanks,
KarHong

Comments (4)

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hello,

What you have looks fine, as long as the showCalendar element is within scope. Otherwise, your path would not render anything as it would not have a Fill or Stroke brush. You can try using a fixed brush, say Red, and try to reproduce the issue you are seeing.

If that doesn't help please put together a small and complete sample project that reproduces your issue and email it over then we can take a closer look. Be sure to remove any executables or change the extension of the zip file to ensure it gets past our email filters.


Actipro Software Support

Posted 10 years ago by karhong
Avatar
Thank you for your responce.
I hardly can reproduce it. Just randomly saw it happen.
Will it help if call a InvalidateVisual ?
Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hello,

I doubt that would help. You can try UpdateLayout, but I'm not sure that would help either.


Actipro Software Support

Posted 10 years ago by karhong
Avatar
ohh... i finally i'm able to reproduce the problem..
I created a style based path

<Style x:Key="calendarPath" TargetType="{x:Type Path}">


<actipro:PopupButton.PopupIndicator>
<Viewbox Height="16" Width="16" Stretch="None">
<Path Style="{DynamicResource calendarPath}"/>
</Viewbox>
</actipro:PopupButton.PopupIndicator>

somehow that solve my problem.
Thanks !
The latest build of this product (v21.1.3) was released 20 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.