timheuer / callisto

A control toolkit for Windows 8 XAML applications. Contains some UI controls to make it easier to create Windows UI style apps for the Windows Store in accordance with Windows UI guidelines.
http://timheuer.com/blog/archive/2012/05/31/introducing-callisto-a-xaml-toolkit-for-metro-apps.aspx
Other
338 stars 108 forks source link

RatingControl: Binding does not work every time #87

Open ManuelRauber opened 12 years ago

ManuelRauber commented 12 years ago

I'm using the RatingControl as followed:

<callisto:Rating Grid.Column="1" Grid.Row="0" HorizontalAlignment="Left" Value="{Binding RatingOverall}" ItemCount="5" Foreground="{StaticResource RatingStarForegroundBrush}" IsHitTestVisible="False" FontSize="16" Margin="0" />

This control is embedded in a scrollviewer which has Visibility="Collapsed", because it's used for snapview.

When setting the scrollviewer visibility to visible the control gets not updated and does not show a value.

For testing I set Visibility of the scrollviewer to Visible and the control showed the value as I want.

What can I do to "repaint" the rating control when it's parent control's visibility changes?

timheuer commented 12 years ago

I'm confused by your statements as you say that setting the SV Visibility to Visible the control doesn't get updated, but then say for testing you set it to Visible and you see what you want.

Do you have a sample project showing the issue I can quickly examine. It might be a problem with the binding engine and not the control.

zaam commented 12 years ago

First of all congrats Tim, and thanks so much for the awesome controls!

I think I'm having the same issue with the Rating control: it's embedded in a Popup control which is not open by default. When the popup opens (at runtime) the Rating control's value is set in code, but it doesn't show up. If I hover the mouse on the control then it will correctly show up.

If, for testing purposes, I set IsOpen to true for the Popup in XAML, the Rating control's value is correctly shown right away.

I am seeing the same behaviour at times at design time. I will try to reproduce the issue in a sample project, thank you